query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Gets the value of the idVozilo property. | public long getIdVozilo() {
return idVozilo;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setIdVozilo(long value) {\n this.idVozilo = value;\n }",
"public int getVaoID() {\n\t\treturn vaoID;\n\t}",
"public String getIdVille() {\r\n\t\treturn idVille;\r\n\t}",
"public String getIdVenta() {\n return idVenta;\n }",
"public Long getIdVieSociale() {\r\n\t\treturn idVieSociale.get();\r\n\t}",
"public int getId_servico() {\n return id_servico;\n }",
"public int getIdproducto() {\r\n\t\treturn idproducto;\r\n\t}",
"int getVida()\n\t{\n\t\treturn vida;\n\t}",
"public static int getVelocidade() {\n return velocidade;\n }",
"@Override\n\tpublic int getId() {\n\t\treturn _keHoachKiemDemNuoc.getId();\n\t}",
"public String getViveId()\n\t{\n\t\treturn viveId;\n\t}",
"public int getVonalAzonosito()\r\n\t{\r\n\t\treturn vonalAzonosito;\r\n\t}",
"Videogioco findVideogiocoById(int id);",
"public int getIdServicio() {\n return idServicio;\n }",
"public Integer getId_inventario() {\r\n return id_inventario;\r\n }",
"public Integer getIdProfilo() {\n\t\treturn idProfilo;\n\t}",
"public int getvID() {\n return vID;\n }",
"public long getIdViaje() {\n\t\treturn idViaje;\n\t}",
"public Vediotape getVedio () {\n\t\treturn vedio;\n\t}",
"public String getIdAeroporto()\n {\n return this.idAeroporto;\n }",
"public String getIdEvento() {\r\n return idEvento;\r\n }",
"public String getLovId() {\r\n\t\treturn lovId;\r\n\t}",
"public int getVie() {\n\t\treturn vie;\n\t}",
"public long getVocubalaryId();",
"public java.lang.String getIdcliente() {\n return idcliente;\n }",
"public Long getVoucherId() {\n\t\treturn voucherId;\n\t}",
"public int getIdPreventivo() {\n return idPreventivo;\n }",
"public long getIdPessoa() {\n\t\treturn idPessoa;\n\t}",
"public int getPesoV() \r\n\t\t{\r\n\t\t\treturn PesoV;\r\n\t\t}",
"public int getId_coodinador() {\n return id_coodinador;\n }",
"@Override\n\tpublic Integer getId() {\n\t\treturn ofertaOpexId;\n\t}",
"public Integer getId_movimiento() {\r\n return id_movimiento;\r\n }",
"public String getVehID() {\r\n\t\treturn vehID;\r\n\t}",
"public String getVatId()\n {\n return vatId;\n }",
"public Integer getIdCurso() {\r\n return idCurso;\r\n }",
"public Integer getVehicleId() {\n return vehicleId;\n }",
"public int getId()\r\n/* 53: */ {\r\n/* 54: 79 */ return this.idDetalleComponenteCosto;\r\n/* 55: */ }",
"public int getIva() {\n\t\treturn producto.getIva();\n\t}",
"public String getNumeroId() {\r\n return NumeroId;\r\n }",
"public String getIdTurno() {\n return idTurno;\n }",
"public Integer getVenuesId() {\n return venuesId;\n }",
"private String vylozZvieraZVozidla() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz index zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Zivocich ziv = zoo.vylozZivocicha(pozicia-1);\r\n if (ziv == null) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n }\r\n zoo.pridajZivocicha(ziv);\r\n return \"Zviera \" + ziv\r\n + \"\\n\\tbolo vylozene z prepravneho vozidla\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nie je na vozidle\\n\\t\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"public int getIdProducto() {\n return idProducto;\n }",
"public java.lang.Long getId_tecnico();",
"public Number getIdbultoOri()\n {\n return (Number)getAttributeInternal(IDBULTOORI);\n }",
"public int getIdDetalle_Ventaf() {\n return idDetalle_Ventaf;\n }",
"@Override\n\tpublic int getIdNguoiTao() {\n\t\treturn _keHoachKiemDemNuoc.getIdNguoiTao();\n\t}",
"@Override\r\n\tpublic Integer getId() {\n\t\treturn codigoCliente;\r\n\t}",
"public BigDecimal getIdContrato() {\r\n return idContrato;\r\n }",
"public String getIdProducto() {\n\t\treturn idProducto;\n\t}",
"public String getVehicleId() {\n return vehicleId;\n }",
"public String getVehicleId() {\n return vehicleId;\n }",
"public String getProductoId() {\n\t\treturn productoId;\n\t}",
"public int getId()\r\n/* 208: */ {\r\n/* 209:381 */ return this.idCargaEmpleado;\r\n/* 210: */ }",
"public Integer getIdModelo() {\n\t\treturn idModelo;\n\t}",
"public Integer getId() {\n return aao.getId();\n }",
"public int getIdentificador() {\r\n\t\treturn identificador;\r\n\t}",
"public Integer getIdLibro() {\n return idLibro;\n }",
"public java.lang.Integer getVaccinId () {\n\t\treturn vaccinId;\n\t}",
"public String getIdProcuratore() {\n return idProcuratore;\n }",
"public int getIdPedido() {\r\n\t\treturn idPedido;\r\n\t}",
"public Long getId() {\r\n return idComentario;\r\n }",
"public int getIdEstatusObjeto() {\r\n\t\treturn idEstatusObjeto;\r\n\t}",
"public int getIdLibro()\n {\n return id;\n }",
"public static long getVersionId(Object o) {\r\n checkVersionable(o);\r\n return ((Versionable) o).getVersionId();\r\n }",
"public Integer getDistanciaVivienda() {\n return distanciaVivienda;\n }",
"public int getId_cabecera_pedido() {\n return id_cabecera_pedido;\n }",
"public String getIdProduto() {\r\n\t\treturn idProduto;\r\n\t}",
"public java.lang.Integer getId_rango();",
"@JsonIgnore\n public String getWVId() {\n if (wvm == null || wvm == WVM.Microversion) {\n return null;\n }\n switch (wvm) {\n case Workspace:\n return workspaceId;\n default:\n return versionId;\n }\n }",
"@Override\n\tpublic int getIdNguoiDong() {\n\t\treturn _keHoachKiemDemNuoc.getIdNguoiDong();\n\t}",
"public java.lang.Long getIdentificador()\r\n {\r\n return this.identificador;\r\n }",
"public String obtemValor(String id) {\n return obtemValor(By.id(id));\n }",
"public int getVehicleId() {\n return vehicleId;\n }",
"public int getVelocidadBala() {\n return velocidadBala;\n }",
"public String getCompoId() {\n\t return compoId;\r\n\t }",
"public BigDecimal getIdTipoServicio() {\r\n return idTipoServicio;\r\n }",
"public Integer getIdAluguel() {\n\t\treturn idAluguel;\n\t}",
"@JsonIgnore\n public String getVMId() {\n if (wvm == null || wvm == WVM.Workspace) {\n return null;\n }\n switch (wvm) {\n case Version:\n return versionId;\n default:\n return microversionId;\n }\n }",
"@Override\n\tpublic int getKiemDemVienId() {\n\t\treturn _keHoachKiemDemNuoc.getKiemDemVienId();\n\t}",
"public Integer getIdHotel() {\r\n return idHotel;\r\n }",
"public Integer getIdLocacion();",
"public Ville getVille() {\n\t\treturn ville;\n\t}",
"public String darTipoVehiculo() {\n\t\treturn tipoVehiculo;\n\t}",
"public Integer getIdInstituicao() {\n\t\treturn idInstituicao;\n\t}",
"public int getParametroIdParametroHijo() {\r\n\t\treturn parametroIdParametroHijo;\r\n\t}",
"public Integer getIdExperienciaEducativa() {\r\n return idExperienciaEducativa;\r\n }",
"public ObjetoVida getObjeto(){\r\n\t\treturn objeto;\r\n\t}",
"@JsonProperty(\"id\")\n@ApiModelProperty(example = \"123e4567-e89b-12d3-a456-556642440000\", value = \"Unique identifier for virtual instance.\")\n public String getId() {\n return id;\n }",
"Vehiculo findVehiculoById(long vehiculo_id) throws BusinessException;",
"public Integer getIdDispositivo() {\n\t\treturn idDispositivo;\n\t}",
"public int getObjId() {\n return instance.getObjId();\n }",
"public int getObjId() {\n return instance.getObjId();\n }",
"public int getObjId() {\n return instance.getObjId();\n }",
"public int getObjId() {\n return instance.getObjId();\n }",
"public int getObjId() {\n return instance.getObjId();\n }",
"public int getObjId() {\n return instance.getObjId();\n }",
"public Long getLeagueId() {\n return (this.leagueId);\n }",
"public Integer getCzId() {\r\n return czId;\r\n }",
"public String getInoId();"
] | [
"0.7002821",
"0.69584364",
"0.65932465",
"0.65309143",
"0.6426284",
"0.6336875",
"0.6252656",
"0.6128727",
"0.60958165",
"0.60705924",
"0.5943725",
"0.59426105",
"0.5939942",
"0.5939759",
"0.5931853",
"0.5927035",
"0.5921903",
"0.58935994",
"0.58922046",
"0.58859944",
"0.58768165",
"0.58605665",
"0.5854616",
"0.58321273",
"0.58093005",
"0.58087164",
"0.580454",
"0.58022684",
"0.5790368",
"0.57892805",
"0.5782214",
"0.5780568",
"0.57714015",
"0.5771112",
"0.5767676",
"0.5761591",
"0.5745905",
"0.57286847",
"0.5724499",
"0.5712497",
"0.5684756",
"0.56563383",
"0.5652745",
"0.56492466",
"0.5646602",
"0.56456906",
"0.56385285",
"0.56181467",
"0.5616132",
"0.561229",
"0.55952716",
"0.55952716",
"0.55841446",
"0.5580804",
"0.5572677",
"0.55715543",
"0.5566413",
"0.55647457",
"0.55564994",
"0.5545887",
"0.55311805",
"0.55279416",
"0.5526517",
"0.55239284",
"0.5522023",
"0.55148894",
"0.5508774",
"0.55077475",
"0.55060726",
"0.55030304",
"0.55029416",
"0.5502201",
"0.5501027",
"0.55002695",
"0.54983956",
"0.5497449",
"0.54970485",
"0.54963565",
"0.54955053",
"0.54928887",
"0.5470306",
"0.54587144",
"0.54572207",
"0.5444643",
"0.5439611",
"0.5426116",
"0.54241467",
"0.54134536",
"0.54096216",
"0.54081744",
"0.5407756",
"0.5403827",
"0.5403827",
"0.5403827",
"0.5403827",
"0.5403827",
"0.5403827",
"0.539901",
"0.539848",
"0.53982556"
] | 0.86994445 | 0 |
Sets the value of the idVozilo property. | public void setIdVozilo(long value) {
this.idVozilo = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public long getIdVozilo() {\n return idVozilo;\n }",
"public void setIdVenta(String idVenta) {\n this.idVenta = idVenta;\n }",
"public void setIdproducto(int idproducto) {\r\n\t\tthis.idproducto = idproducto;\r\n\t}",
"public void setIdAeroporto(String idAeroporto)\n {\n this.idAeroporto = idAeroporto;\n }",
"@Override\n\tpublic void setId(int id) {\n\t\t_keHoachKiemDemNuoc.setId(id);\n\t}",
"public void setIdcliente(java.lang.String idcliente) {\n this.idcliente = idcliente;\n }",
"public void setIdventa( Integer idventa ) {\n this.idventa = idventa ;\n }",
"public void setVedio (Vediotape vedio) {\n\t\tthis.vedio = vedio;\n\t}",
"@Override\n\tpublic void votaRisposta(Integer id, int voto) {\n\t\t\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\tlong hashCode = id.hashCode();\n\t\tRisposta risposta = risposte.get(hashCode);\n\t\trisposta.setVoto(voto);\n\t\trisposte.put(hashCode, risposta);\n\t\tdb.commit();\n\t}",
"public void setIdPreventivo(int idPreventivo) {\n this.idPreventivo = idPreventivo;\n }",
"public void setObjeto(ObjetoVida o){\r\n\t\tobjeto = o;\r\n\t}",
"public void setIdPtoServicio(String idPtoServicio);",
"public void setIdProfilo(Integer idProfilo) {\n\t\tthis.idProfilo = idProfilo;\n\t}",
"public void setIdProducto(int value) {\n this.idProducto = value;\n }",
"public void setIdModelo(Integer idModelo) {\n\t\tthis.idModelo = idModelo;\n\t}",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"public void setIdCliente(Integer id_cliente){\n this.id_cliente=id_cliente;\n }",
"@Override\r\n\tpublic void setOstatu_id(int ostatu_id) {\n\t\tsuper.setOstatu_id(ostatu_id);\r\n\t}",
"public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }",
"public void setIdLibro(Integer idLibro) {\n this.idLibro = idLibro;\n }",
"public void setId_movimiento(Integer id_movimiento) {\r\n this.id_movimiento = id_movimiento;\r\n }",
"public void setId_inventario(Integer id_inventario) {\r\n this.id_inventario = id_inventario;\r\n }",
"public void setId(Common1LevelLOVHeaderPK id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setNumeroId(String NumeroId) {\r\n this.NumeroId = NumeroId;\r\n }",
"public void setIdCurso(Integer idCurso) {\r\n this.idCurso = idCurso;\r\n }",
"public void setIdCaracterizacion(java.lang.Integer idCaracterizacion) {\n this.idCaracterizacion = idCaracterizacion;\n }",
"void setVida(int vida)\n\t{\n\t\t// variable declarada anteriormente igual a la declarada en el set\n\t\tthis.vida = vida;\n\t}",
"private void setPoId(Long id) {\r\n this.poId = id;\r\n }",
"public static void dodajVozilo(Vozilo v) {\n\t\tMain.getVozilaAll().add(v);\n\t}",
"public void setIdInstituicao(Integer idInstituicao) {\n\t\tthis.idInstituicao = idInstituicao;\n\t}",
"public void setId(Object id) {\n this.id = id;\n }",
"public void setId(Object id) {\n this.id = id;\n }",
"@Override\n public void definirId(Endereco objeto, int id) {\n objeto.setId(id);\n }",
"public void setIdPerfil(Integer idPerfil) {\n this.idPerfil = idPerfil;\n }",
"public void setIdacesso(int pIdacesso){\n this.idacesso = pIdacesso;\n }",
"public void setIdCliente(int value) {\n this.idCliente = value;\n }",
"public void setIdEstatusObjeto(int idEstatusObjeto) {\r\n\t\tthis.idEstatusObjeto = idEstatusObjeto;\r\n\t}",
"public void setIdTipoServicio(BigDecimal idTipoServicio) {\r\n this.idTipoServicio = idTipoServicio;\r\n }",
"public void setIdUsuario(int value) {\n this.idUsuario = value;\n }",
"public void setIva(int iva) {\n\t\tproducto.setIva(iva);\n\t}",
"public void setIdbultoOri(Number value)\n {\n setAttributeInternal(IDBULTOORI, value);\n }",
"public void setIdGrupo(String idGrupo) {\n\t\tthis.idGrupo = idGrupo;\n\t}",
"public void setIdHotel(Integer idHotel) {\r\n this.idHotel = idHotel;\r\n }",
"void setId(int id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setIdUsuario(Integer idUsuario) {\n this.idUsuario = idUsuario;\n }",
"public void setIdRichiesta(int idRichiesta) {\n this.idRichiesta = idRichiesta;\n }",
"public void setIdDetalleComponenteCosto(int idDetalleComponenteCosto)\r\n/* 63: */ {\r\n/* 64: 87 */ this.idDetalleComponenteCosto = idDetalleComponenteCosto;\r\n/* 65: */ }",
"public void setKullaniciId(java.lang.Integer value) {\n this.kullanici_id = value;\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setId(Integer id) {\r\n this.id = id;\r\n }",
"public void setIdExperienciaEducativa(Integer idExperienciaEducativa) {\r\n this.idExperienciaEducativa = idExperienciaEducativa;\r\n }",
"void setID(int val)\n throws RemoteException;",
"public void setId(int id){\r\n this.id = id;\r\n }",
"public void setHotelId(int value) {\n this.hotelId = value;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }",
"public void setId(Integer id) {\n this.id = id;\n }"
] | [
"0.7157627",
"0.6591611",
"0.62409985",
"0.623949",
"0.6110203",
"0.61035407",
"0.59811646",
"0.59787023",
"0.59589094",
"0.59404284",
"0.59308594",
"0.5920798",
"0.5851775",
"0.58491874",
"0.58456033",
"0.5841683",
"0.5841683",
"0.5841683",
"0.5841683",
"0.5841683",
"0.5841683",
"0.58166695",
"0.5807846",
"0.58022606",
"0.57954705",
"0.5790696",
"0.57610524",
"0.57312596",
"0.5729947",
"0.56943166",
"0.5677142",
"0.56734204",
"0.5670006",
"0.5647312",
"0.56416714",
"0.5630088",
"0.5630088",
"0.5628848",
"0.5618973",
"0.56126606",
"0.56063473",
"0.5597256",
"0.5585597",
"0.5577025",
"0.5538349",
"0.55367106",
"0.5533595",
"0.5520519",
"0.55171156",
"0.55109763",
"0.5501866",
"0.5498825",
"0.5485272",
"0.5477452",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.5473869",
"0.54719126",
"0.5464277",
"0.5458726",
"0.5458209",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915",
"0.5451915"
] | 0.80077285 | 0 |
Gets the value of the predjenaKilometraza property. | public double getPredjenaKilometraza() {
return predjenaKilometraza;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPredjenaKilometraza(double value) {\n this.predjenaKilometraza = value;\n }",
"public double getKilometraza() {\r\n return kilometraza;\r\n }",
"public double getPreco() {\n\t\treturn this.preco;\n\t}",
"public CatPredio getPredio(BigInteger idPredio) {\n if (idPredio != null) {\n return catastroServices.getPredioId(idPredio.longValue());\n }\n return null;\n }",
"public double getPreco() {\n\t\treturn preco;\n\t}",
"public String getKakarinm() {\r\n return kakarinm;\r\n }",
"public double getPreco(){\n return pagamento.getPreco();\n }",
"public String getNamaKlinik() {\n return namaKlinik;\r\n }",
"public double getMozePreciKM() {\r\n return mozePreciKM;\r\n }",
"public String getTorihikisakinm() {\r\n return torihikisakinm;\r\n }",
"public int getDatossolicitudBfmarcaPreaprobado() {\n return datossolicitudBfmarcaPreaprobado;\n }",
"public Prestamo getPrestamo() {\r\n return prestamo;\r\n }",
"public double getMatkojenKeskinopeus() {\n return getMatkojenpituus() / (getMatkojenkesto() / 60);\n }",
"public Value getPred(Key key) {\r\n return root.getPred(key);\r\n }",
"public double getOcjena() {\r\n return ocjena;\r\n }",
"public double getCijena() {\r\n return cijena;\r\n }",
"public String getKazeikbn() {\r\n return kazeikbn;\r\n }",
"public String getKorisnik() {\r\n\t\treturn korisnik;\r\n\t}",
"public double getPreco();",
"public double getPreco();",
"public String getKorisnik() {\r\n\treturn korisnik;\r\n\t}",
"public String getKorisnik() {\r\n\treturn korisnik;\r\n\t}",
"public String getKorisnik() {\r\n\treturn korisnik;\r\n\t}",
"public int koko() {\n return this.arvoja;\n }",
"public Float getPreco() { return this.preco; }",
"public java.lang.Integer getKONO() {\n return KONO;\n }",
"public double getNajmensie() {\n\t\tif ((cislo1 <= cislo2) && (cislo1 <= cislo3)) {\n\t\t\ttretie = cislo1;\n\t\t} else if ((cislo2 <= cislo1) && (cislo2 <= cislo3)) {\n\t\t\ttretie = cislo2;\n\t\t} else if ((cislo3 <= cislo1) && (cislo3 <= cislo2)) {\n\t\t\ttretie = cislo3;\n\t\t}\n\t\treturn tretie;\n\t}",
"public int getKMSelanjutnya(){\n\t\treturn (getDistance() - N * 1000) * costPerKm / 1000;\n\t}",
"public Long getKinkenriyou03() {\r\n return kinkenriyou03;\r\n }",
"public long getKlasaAutomobilaID() {\r\n return klasaAutomobilaID;\r\n }",
"public long getTipMjenjacaID() {\r\n return tipMjenjacaID;\r\n }",
"public String getprenom() {\n return prenom;\n }",
"public it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CedentePrestatoreType getCedentePrestatore()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CedentePrestatoreType target = null;\r\n target = (it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CedentePrestatoreType)get_store().find_element_user(CEDENTEPRESTATORE$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }",
"public double getCena() {\r\n\t\treturn cena;\r\n\t}",
"public Klinik getKlinik() {\r\n return klinik;\r\n }",
"public double getProcenatOtkazivanje() {\n return procenatOtkazivanje;\n }",
"public String getPrecoProduto() {\r\n\t\treturn precoProduto;\r\n\t}",
"public String getPrenom() {\r\n return prenom;\r\n }",
"public String getPrenom() {\n return prenom;\n }",
"public String getPrenom() {\n\t\treturn this.prenom;\n\t}",
"public String getTieteellinenNimi() {\n return this.tieteellinen_nimi;\n }",
"public String annaNimi()\n\t{\n\t\treturn this.nimi;\n\t}",
"public double getSaldoKoperasi() {\n return this.saldoKoperasi;\n }",
"public String getKm() {\n return km;\n }",
"@JsonProperty(\"valore\") \n \n public String getValore() {\n return valore;\n }",
"public String getPrenom() {\n\t\treturn prenom;\n\t}",
"public double getPromedio() {\r\n return promedio;\r\n }",
"public java.lang.Integer getHariKe() {\n return hari_ke;\n }",
"@Column(name = \"C_PRIMER_APELLIDO\")\n public String getPrimerApellido() {\n return primerApellido;\n }",
"public double getTotalKoperasi() {\n return this.totalKoperasi;\n }",
"public java.lang.Double getMontoPropinaAnulacion() {\r\n return montoPropinaAnulacion;\r\n }",
"public KoncepteParaula getKoncept() {\n\t\treturn koncept;\n\t}",
"public java.lang.Integer getHariKe() {\n return hari_ke;\n }",
"public java.lang.CharSequence getNamaKelas() {\n return nama_kelas;\n }",
"public BigDecimal getPreis() {\n\t\treturn this.preis;\n\t}",
"public final int getRiippumatonMuuttuja() {\r\n return riippumatonMuuttuja;\r\n }",
"public float getPreis() {\r\n\t\treturn preis;\r\n\t}",
"public float getPrezzo() {\n\t\treturn prezzo;\n\t}",
"@Override\r\n\tpublic double getPrezzo() {\n\t\treturn prezzo;\r\n\t}",
"public int vrniStanje(String izdelek)\r\n {\r\n \tif(izdelki.containsKey(izdelek))\r\n \t\treturn izdelki.get(izdelek);\r\n \telse\r\n \t\treturn -1;\r\n }",
"@Override\n\tpublic java.lang.String getMoTa() {\n\t\treturn _keHoachKiemDemNuoc.getMoTa();\n\t}",
"public Double getNzyl() {\n return nzyl;\n }",
"public int getOcena() {\n return ocena;\n }",
"public java.lang.CharSequence getNamaKelas() {\n return nama_kelas;\n }",
"public Valore getValore() {\n\t\treturn valore;\n\t}",
"public double getPeluangFK(){\n return fakultas[0];\n }",
"public ArrayList<ArrayList<Float>> predykcjaCenNaRynkuLokalnym()\n\t{\n\t\tfloat cenaMinimalnaNaRynkuLokalnym= Stale.cenaMinimalnaNaRynkuLokalnym;\n\t\tfloat cenaMaksymalnaNaRynkuLokalnym = Stale.cenaDystrybutoraZewnetrznego;\n\t\t\n\t\t//tu siedzi to rozroznienie czy z generatora czy predykcja z poprzendiej symualcji\n\t\tArrayList<Float> normalnaPredykcja = pierwszaPredykcja();\n\t\tpriceVectorsList.add(normalnaPredykcja);\n\t\t\n\t\tArrayList<ArrayList<Float>> listaPredykcjiCen= new ArrayList<ArrayList<Float>>();\n\t\t\n\t\t\n\t\t//nizsza \n\t\tArrayList<Float> predykcjaZNizszaCena=new ArrayList<Float>(normalnaPredykcja);\t\t\n\t\tArrayList<Float> predykcjaZWyzszaCena=new ArrayList<Float>(normalnaPredykcja);\n\t\t\n\t\tfloat nizszaCena =(normalnaPredykcja.get(0)+cenaMinimalnaNaRynkuLokalnym)/2 ;\n\t\tfloat wyzszaCena=(normalnaPredykcja.get(0)+cenaMaksymalnaNaRynkuLokalnym)/2;\n\t\t\n\t\tpredykcjaZNizszaCena.set(0, nizszaCena);\n\t\tpredykcjaZWyzszaCena.set(0, wyzszaCena);\n\t\t\n\t\tlistaPredykcjiCen.add(predykcjaZNizszaCena);\n\t\tlistaPredykcjiCen.add(normalnaPredykcja);\n\t\tlistaPredykcjiCen.add(predykcjaZWyzszaCena);\n\t\t\n\t\t//reporting - zapisz zadeklarowan cene\n\t\trynekHistory.dodajZadeklarowanaCene(normalnaPredykcja.get(0));\n\t\t\n\t\t\n\t\treturn listaPredykcjiCen;\t\n\t}",
"public int getComuneResidenzaCod() {\r\n return comuneResidenzaCod;\r\n }",
"public String getKontaktai() {\r\n\t\treturn kontaktai;\r\n\t}",
"public String getMn003() {\n return mn003;\n }",
"public String getKleur() {\n return kleur;\n }",
"public double getTotalElektroPokok() {\n return this.totalElektroPokok;\n }",
"public String getLaji() {\n return this.laji;\n }",
"private float obtenerPrecioOrdenador(String codigo) {\n\t\tfloat resultado = 0;\n\t\ttry {\n\t\t\tXPathQueryService consulta = \n\t\t\t\t\t(XPathQueryService) \n\t\t\t\t\tcol.getService(\"XPathQueryService\", \"1.0\");\n\t\t\tResourceSet r = consulta.query(\"string(//ordenador[@codigo='\"+\n\t\t\t\t\tcodigo+\"']/precio)\");\n\t\t\tResourceIterator i = r.getIterator();\n\t\t\tif(i.hasMoreResources()) {\n\t\t\t\tString numero =i.nextResource().getContent().toString();\n\t\t\t\tif(!numero.equals(\"\"))\n\t\t\t\t\tresultado = Float.parseFloat(numero);\n\t\t\t}\n\t\t} catch (XMLDBException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultado;\n\t}",
"public double getParidadCliente() {\r\n return paridadCliente;\r\n }",
"public String getFk_klant() {\n\t\treturn fk_klant;\n\t}",
"public final Rule getPredecessor() {\n //ELM: in again\n//\t\treturn null; // TODO by m.zopf: because of performance reasons return here just null\n return m_pred;\n }",
"public Long getKinkenriyou01() {\r\n return kinkenriyou01;\r\n }",
"private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }",
"public String getPoruka() {\r\n\treturn poruka;\r\n\t}",
"@JsonProperty(\"nomePontoCadastramento\")\n\tpublic String getNomePontoCadastramento() {\n\t\treturn nomePontoCadastramento;\n\t}",
"@Override\n\tpublic int getNam() {\n\t\treturn _keHoachKiemDemNuoc.getNam();\n\t}",
"public double calcKa() {\n return 0;\n }",
"public int getkValue() {\n return kValue;\n }",
"public Set<Prenotazione> getPrenotazione() {\n return prenotazione;\n }",
"public Number getTramo() {\n return (Number) getAttributeInternal(TRAMO);\n }",
"public int get_thema() {\n\t\treturn this.thema;\n\t}",
"public double getCenaSmestaja() {\n return cenaSmestaja;\n }",
"public int getTilaa() {\r\n return maara - matkustajia;\r\n }",
"public int getTipoPriori() {\r\n return tipoPriori;\r\n }",
"float getKeliling() {\n\t\treturn super.sisi * 3;\n\t}",
"public String getIdKlinik() {\n return idKlinik;\r\n }",
"public double getNajvacsie() {\n\t\tif ((cislo1 >= cislo2) && (cislo1 >= cislo3)) {\n\t\t\tprve = cislo1;\n\t\t} else if ((cislo2 >= cislo1) && (cislo2 >= cislo3)) {\n\t\t\tprve = cislo2;\n\t\t} else if ((cislo3 >= cislo1) && (cislo3 >= cislo2)) {\n\t\t\tprve = cislo3;\n\t\t}\n\t\treturn prve;\n\n\t}",
"public double get_knot_at_segment(int i) {\n return u[i];\n }",
"private int obliczDowoz() {\n int x=this.klient.getX();\n int y=this.klient.getY();\n double odl=Math.sqrt((Math.pow((x-189),2))+(Math.pow((y-189),2)));\n int kilometry=(int)(odl*0.5); //50 gr za kilometr\n return kilometry;\n }",
"public double getPredictedDistance() {\r\n return predictedDistance;\r\n }",
"public ModeloTablaPrecioAcciones getModeloPrecios() {\n\t\treturn modeloPrecios;\n\t}",
"public String getProblema() {\n return problema;\n }",
"public java.lang.String getNrContrato() {\n return nrContrato;\n }",
"public ValoreA getValore() {\r\n\t\treturn valore;\r\n\t}"
] | [
"0.6521934",
"0.58892184",
"0.57366675",
"0.569428",
"0.56598794",
"0.56576735",
"0.5522416",
"0.54659504",
"0.54433024",
"0.5384626",
"0.53757644",
"0.536257",
"0.5337933",
"0.5322583",
"0.5322318",
"0.5301692",
"0.5289762",
"0.5277284",
"0.52748495",
"0.52748495",
"0.5274522",
"0.5274522",
"0.5274522",
"0.5273387",
"0.5244549",
"0.52421427",
"0.5240743",
"0.51610816",
"0.51483434",
"0.5147685",
"0.51400924",
"0.5124776",
"0.5102639",
"0.5101118",
"0.5089543",
"0.5073427",
"0.50711733",
"0.5070162",
"0.505373",
"0.5053092",
"0.50419974",
"0.50020444",
"0.49967384",
"0.4983286",
"0.49768752",
"0.49747825",
"0.49700832",
"0.49622825",
"0.4948087",
"0.49335897",
"0.49300173",
"0.49190181",
"0.49153227",
"0.49145645",
"0.49034667",
"0.49034116",
"0.49024308",
"0.48941416",
"0.48931497",
"0.4891634",
"0.48908138",
"0.48866457",
"0.48806965",
"0.48760805",
"0.48732555",
"0.48732322",
"0.4867362",
"0.485047",
"0.4848887",
"0.48423603",
"0.483777",
"0.48285943",
"0.48274517",
"0.4820066",
"0.48193485",
"0.4818178",
"0.48166388",
"0.4815922",
"0.48156318",
"0.4806548",
"0.4801344",
"0.4794127",
"0.4793724",
"0.47818053",
"0.477589",
"0.47720614",
"0.47719303",
"0.4758798",
"0.4758349",
"0.475182",
"0.47454876",
"0.47388446",
"0.4734529",
"0.47339806",
"0.47338468",
"0.47301242",
"0.47272334",
"0.47264728",
"0.4723738",
"0.4722182"
] | 0.8127905 | 0 |
Sets the value of the predjenaKilometraza property. | public void setPredjenaKilometraza(double value) {
this.predjenaKilometraza = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getPredjenaKilometraza() {\n return predjenaKilometraza;\n }",
"synchronized public void setPredKey(int predKey) {\n this.predKey = predKey;\n }",
"public final void setPredecessor(final Rule r) {\n //ELM: in again!\n m_pred = r;\n }",
"public void setPreco(double preco) {\n\t\tthis.preco = preco;\n\t}",
"public void setKlinik(Klinik klinik) {\r\n // variabel klinik sama dengan variabel lokal klinik\r\n this.klinik = klinik;\r\n }",
"public void setMozePreciKM(double value) {\r\n this.mozePreciKM = value;\r\n }",
"public void setKilometraza(double value) {\r\n this.kilometraza = value;\r\n }",
"public void setPolaznik(Polaznik polaznik) {\n this.polaznik = polaznik;\n }",
"public void setDatossolicitudBfmarcaPreaprobado(int value) {\n this.datossolicitudBfmarcaPreaprobado = value;\n }",
"public void setKakarinm(String kakarinm) {\r\n this.kakarinm = kakarinm;\r\n }",
"private void poczatkowe_zmienne()\n {\n konfiguracja.loadProperties();\n predkosc_wroga=Integer.parseInt(konfiguracja.properties.getProperty(\"predkosc_wroga\"));\n czas_watku=Integer.parseInt(konfiguracja.properties.getProperty(\"czas_watku\"));\n punkty_poziomu=Integer.parseInt(konfiguracja.properties.getProperty(\"punkty_poziomu\"));\n zmienne_poziomu(poziom);\n }",
"public void przestaw(int ktoraRamkaKurwa){ //0 nic, 1 korwin, 2 nosacz\n\n\t\tthis.ktoraRamkaKurwa = ktoraRamkaKurwa;\n\t\tktoraRamka++; \n\t}",
"public void setPreco(Double preco);",
"public void setKorisnik(String korisnik) {\r\n\tif (korisnik==null || korisnik == \"\")\r\n\t\tthrow new RuntimeException(\"Ime korisnika mora biti uneto\");\r\n\tthis.korisnik = korisnik;\r\n\t}",
"public void setKorisnik(String korisnik) {\r\n\tif (korisnik==null || korisnik == \"\")\r\n\tthrow new RuntimeException(\r\n\t\"Ime korisnika mora biti uneto\");\r\n\tthis.korisnik = korisnik;\r\n\t}",
"public void setKorisnik(String korisnik) {\r\n\tif (korisnik==null || korisnik.isEmpty())\r\n\tthrow new RuntimeException(\r\n\t\"Ime korisnika mora biti uneto\");\r\n\tthis.korisnik = korisnik;\r\n\t}",
"public void setModeloPrecios(ModeloTablaPrecioAcciones modeloPrecios) {\n\t\tthis.modeloPrecios = modeloPrecios;\n\t}",
"public void setORM_KatPovkatPov(orm.KatPov value) {\r\n\t\tthis.katPovkatPov = value;\r\n\t}",
"public void setPredictedDistance(double val) {\r\n predictedDistance = val;\r\n }",
"protected void podesiIDPredstave(String nazivPredstave) {\n\t\tfor (Predstave p:Kontroler.getInstanca().vratiRepertoar())\r\n\t\t\tif(p.getNazivPredstave().equals(nazivPredstave))\r\n\t\t\t\tID_Pred=p.getId();\r\n\t}",
"public CatPredio getPredio(BigInteger idPredio) {\n if (idPredio != null) {\n return catastroServices.getPredioId(idPredio.longValue());\n }\n return null;\n }",
"public KalkulacijaNabavneCene(int id, String _brojKalkulacije,Artikal artikal, Date datumKalkulacije, double dodatniTroskovi, double marza, double pdv, double rabat) {\n this.id = id;\n this.brojKalkulacije=_brojKalkulacije;\n this.datumKalkulacije = datumKalkulacije;\n this.dodatniTroskovi = dodatniTroskovi;\n this.marzaDouble = marza;\n this.pdv = pdv;\n this.rabat = rabat;\n this.artikal = artikal;\n }",
"public void pretraziPoslovneKorisnike() throws BazaPodatakaException {\r\n\t\tString naziv = nazivTF.getText().toLowerCase();\r\n\t\tString web = webTF.getText().toLowerCase();\r\n\t\tString email = emailTF.getText().toLowerCase();\r\n\t\tString telefon = telefonTF.getText();\r\n\r\n\t\tList<PoslovniKorisnik> listaKorisnika = BazaPodataka.dohvatiPoslovnogKorisnikaPremaKriterijima(email, telefon,\r\n\t\t\t\tnaziv, web);\r\n\t\ttablicaPoslovnihKorisnika.setItems(FXCollections.observableArrayList(listaKorisnika));\r\n\r\n\t}",
"public void setKoncept(KoncepteParaula koncept) {\n\t\tthis.koncept = koncept;\n\t}",
"@Override\r\n\tpublic void setGela_kop(int gela_kop) {\n\t\tsuper.setGela_kop(gela_kop);\r\n\t}",
"public void setPrenotazione(Set<Prenotazione> aPrenotazione) {\n prenotazione = aPrenotazione;\n }",
"public void setPrenom(String prenom) {\r\n this.prenom = prenom;\r\n }",
"@Generated(hash = 1672594394)\n public void setContrato(Contrato contrato) {\n synchronized (this) {\n this.contrato = contrato;\n contratoId = contrato == null ? null : contrato.getId();\n contrato__resolvedKey = contratoId;\n }\n }",
"public void setNamaKlinik(String namaKlinik) {\n this.namaKlinik = namaKlinik;\r\n }",
"public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}",
"public void setTorihikisakinm(String torihikisakinm) {\r\n this.torihikisakinm = torihikisakinm;\r\n }",
"public void setOcjena(double value) {\r\n this.ocjena = value;\r\n }",
"public final void setN(final int koko) {\r\n this.n = koko;\r\n }",
"public void setMn003(String mn003) {\n this.mn003 = mn003 == null ? null : mn003.trim();\n }",
"public void setCijena(double value) {\r\n this.cijena = value;\r\n }",
"public void setPrenom(final String prenom) {\n\t\tthis.prenom = prenom;\n\t}",
"public void setPreco(Float preco) { this.preco = preco; }",
"public void setPrecoProduto(String precoProduto) {\r\n\t\tthis.precoProduto = precoProduto;\r\n\t}",
"public ArrayList<ArrayList<Float>> predykcjaCenNaRynkuLokalnym()\n\t{\n\t\tfloat cenaMinimalnaNaRynkuLokalnym= Stale.cenaMinimalnaNaRynkuLokalnym;\n\t\tfloat cenaMaksymalnaNaRynkuLokalnym = Stale.cenaDystrybutoraZewnetrznego;\n\t\t\n\t\t//tu siedzi to rozroznienie czy z generatora czy predykcja z poprzendiej symualcji\n\t\tArrayList<Float> normalnaPredykcja = pierwszaPredykcja();\n\t\tpriceVectorsList.add(normalnaPredykcja);\n\t\t\n\t\tArrayList<ArrayList<Float>> listaPredykcjiCen= new ArrayList<ArrayList<Float>>();\n\t\t\n\t\t\n\t\t//nizsza \n\t\tArrayList<Float> predykcjaZNizszaCena=new ArrayList<Float>(normalnaPredykcja);\t\t\n\t\tArrayList<Float> predykcjaZWyzszaCena=new ArrayList<Float>(normalnaPredykcja);\n\t\t\n\t\tfloat nizszaCena =(normalnaPredykcja.get(0)+cenaMinimalnaNaRynkuLokalnym)/2 ;\n\t\tfloat wyzszaCena=(normalnaPredykcja.get(0)+cenaMaksymalnaNaRynkuLokalnym)/2;\n\t\t\n\t\tpredykcjaZNizszaCena.set(0, nizszaCena);\n\t\tpredykcjaZWyzszaCena.set(0, wyzszaCena);\n\t\t\n\t\tlistaPredykcjiCen.add(predykcjaZNizszaCena);\n\t\tlistaPredykcjiCen.add(normalnaPredykcja);\n\t\tlistaPredykcjiCen.add(predykcjaZWyzszaCena);\n\t\t\n\t\t//reporting - zapisz zadeklarowan cene\n\t\trynekHistory.dodajZadeklarowanaCene(normalnaPredykcja.get(0));\n\t\t\n\t\t\n\t\treturn listaPredykcjiCen;\t\n\t}",
"public final void setRiippumatonMuuttuja(final int muuttuja) {\r\n this.riippumatonMuuttuja = muuttuja;\r\n }",
"public Kolo(double promien) {\n\t\tthis.promien = promien;\n\t}",
"public void setCena(double cena) {\r\n\t\tthis.cena = cena;\r\n\t}",
"public void setPredeterminado(boolean predeterminado)\r\n/* 159: */ {\r\n/* 160:274 */ this.predeterminado = predeterminado;\r\n/* 161: */ }",
"public void setKredietLimiet(double kredietlimiet) {\n // method body omitted\n this.kredietlimiet = kredietlimiet;\n }",
"public void setKazeikbn(String kazeikbn) {\r\n this.kazeikbn = kazeikbn;\r\n }",
"public void setPrenom(String prenom) {\n\t\tthis.prenom = prenom;\n\t}",
"public void setPrecioc(int p){\n this.precioc=p;\n \n }",
"public void setKoernerImMaul(int n)\n {\n koernerImMaul=n;\n }",
"public FilmePremioRecord(Integer filmeId, Integer premioId) {\n super(FilmePremio.FILME_PREMIO);\n\n set(0, filmeId);\n set(1, premioId);\n }",
"public void setKlasaAutomobilaID(long value) {\r\n this.klasaAutomobilaID = value;\r\n }",
"public Value.Builder setKdKelas(java.lang.CharSequence value) {\n validate(fields()[0], value);\n this.kd_kelas = value;\n fieldSetFlags()[0] = true;\n return this;\n }",
"public void setParentezco(Parentezco parentezco)\r\n/* 158: */ {\r\n/* 159:290 */ this.parentezco = parentezco;\r\n/* 160: */ }",
"public int setKeff(String keff) {\r\n return setAttribute(MEConstants.keff, keff);\r\n }",
"public void setIzquierdo(Nodo<T> izquierdo) {\n\t\tthis.izquierdo = izquierdo;\n\t}",
"public void setPrimerApellido(String primerApellido) {\n this.primerApellido = primerApellido;\n }",
"public void setPozycja(PozycjaZamowienia pozycja){\n\t\tthis.pozycja = pozycja;\n\t}",
"public Prestamo getPrestamo() {\r\n return prestamo;\r\n }",
"public Set<Prenotazione> getPrenotazione() {\n return prenotazione;\n }",
"public void setIdKlinik(String idKlinik) {\n this.idKlinik = idKlinik;\r\n }",
"public void setCedentePrestatore(it.gov.agenziaentrate.ivaservizi.docs.xsd.fatture.v12.CedentePrestatoreType cedentePrestatore)\r\n {\r\n generatedSetterHelperImpl(cedentePrestatore, CEDENTEPRESTATORE$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\r\n }",
"public void setNodoIzquierdo(Nodo nodo){\n izq = nodo;\n }",
"@Override\r\n\tpublic void setIzena(String izena) {\n\t\tsuper.setIzena(izena);\r\n\t}",
"protected void podesiRaspUlaznice(String nazivPredstave) {\n\t\tfor (Predstave p:Kontroler.getInstanca().vratiRepertoar())\r\n\t\t\tif(p.getNazivPredstave().equals(nazivPredstave))\r\n\t\t\t\tnoviBrRasUl=p.getBrojRaspolozivihUlaznica();\r\n\t}",
"private void dodajEpsilonPrijelaz(int pocetno, int sljedece) {\n String key = pocetno + \",$$\";\n if (!prijelazi.containsKey(key)) {\n prijelazi.put(key, new Integer(sljedece).toString());\n } else {\n String value = prijelazi.get(key) + \",\" + new Integer(sljedece).toString();\n prijelazi.put(key, value);\n }\n }",
"public void setKONO(java.lang.Integer KONO) {\n this.KONO = KONO;\n }",
"@Override\n\tpublic void setMoTa(java.lang.String moTa) {\n\t\t_keHoachKiemDemNuoc.setMoTa(moTa);\n\t}",
"public void aenderePreisAllerArtikel(double prozent){\n Validator.check(prozent < -100, MSG_PREIS);\n for (Map.Entry<Integer, Artikel> integerArtikelEntry : lager.entrySet()) {\n integerArtikelEntry.getValue().aenderePreis(prozent);\n }\n }",
"protected static void setKroky(float ikroky) {\n krokyMain = (int) ikroky;\n tv_steps.setText(\"\" + krokyMain);\n den.setText(aktualnyDatum);\n vypocitajKcal(krokyMain);\n }",
"public void setPrezzo (float prezzo) {\r\n\t\tthis.prezzo=prezzo;\r\n\t}",
"public void setNOficina (Integer pNOficina)\r\n {\r\n this.nOficina=pNOficina;\r\n }",
"public void setAtNeutral(Kingdom relatingKingdom) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s.setInt(1, this.id);\n s.setInt(2, relatingKingdom.getID());\n ResultSet res = s.executeQuery();\n\n java.sql.PreparedStatement s1 = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s1.setInt(1, relatingKingdom.getID());\n s1.setInt(2, this.id);\n ResultSet res1 = s1.executeQuery();\n\n if (res.next()) {\n java.sql.PreparedStatement s2 = QuartzKingdoms.DBKing.prepareStatement(\"DELETE FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s2.setInt(1, relatingKingdom.getID());\n s2.setInt(2, this.id);\n s2.executeUpdate();\n } else if (res1.next()) {\n\n } else {\n return;\n }\n } catch (SQLException e) {\n KUtil.printException(\"Could not set kingdoms at neutral\", e);\n }\n }",
"public void setKdKelas(java.lang.CharSequence value) {\n this.kd_kelas = value;\n }",
"protected void obrisiPoljePretraga() {\n\t\ttfPretraga.setText(\"\");\r\n\t}",
"public void ukloniPredmetSaProfesora(Profesor profesor) {\n\t\t\n\t\tUpitPotvrdeDialog dialog = new UpitPotvrdeDialog(\"Ukloni Nepolozeni predmet\",\n\t\t\t\t\"Da li ste sigurni da želite da uklonite predmet?\");\n\t\tif (dialog.isYes() == true) {\n\t\t\n\t\t\tPredmet predmet = BazaPredmeta.getInstance().getRow(IzmeniProfesoraDialog.tabelaPredmetaProfesora.getCurrentSelectedRow());\n\t\t\t\n\t\t\t BazaProfesora.getInstance().izbrisiPredmetSaP(profesor, predmet);\n\t\t\t IzmeniProfesoraDialog.tabelaPredmetaProfesora.azurirajPrikaz();\n\t\t\n\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public void setRaiz(Nodo raiz) {\r\n\t\tRaiz = raiz;\r\n\t}",
"public void setNEval (int value) {\r\n n_eval = value; }",
"public void setPoistumisaika(double poistumisaika) {\n\t\tthis.poistumisaika = poistumisaika + ThreadLocalRandom.current().nextDouble(1, 10);\n\t}",
"public void setProprietaire(SystemeAmendesInt.Personne proprietaire) {\n this.proprietaire = proprietaire;\n }",
"public double getKilometraza() {\r\n return kilometraza;\r\n }",
"public void setKinkenriyou03(Long kinkenriyou03) {\r\n this.kinkenriyou03 = kinkenriyou03;\r\n }",
"public String getNamaKlinik() {\n return namaKlinik;\r\n }",
"public String getKakarinm() {\r\n return kakarinm;\r\n }",
"public void setPrev(Node prev) {\n this.prev = prev;\n }",
"public void setOcena(int value) {\n this.ocena = value;\n }",
"@Test\r\n public void testSetKlient() {\r\n System.out.println(\"setKlient\");\r\n Klient klient = null;\r\n Faktura instance = new Faktura();\r\n instance.setKlient(klient);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"public SenzorTlakaZraka(String mjernaJedinica, byte preciznost, String opis) {\r\n\t\tsuper(mjernaJedinica, preciznost);\r\n\t\tthis.opis = opis;\r\n\r\n\t}",
"public int getDatossolicitudBfmarcaPreaprobado() {\n return datossolicitudBfmarcaPreaprobado;\n }",
"public void setKontaktai(String kontaktai) {\r\n\t\tthis.kontaktai = kontaktai;\r\n\t}",
"public void testKumulatifIstatistikCercevesiEkle() {\n System.out.println(\"kumulatifIstatistikCercevesiEkle\");\n IstatistikAlici istatistikAlici = null;\n Yakalayici instance = new Yakalayici();\n instance.kumulatifIstatistikCercevesiEkle(istatistikAlici);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public void setNrQtdPrestacao(int nrQtdPrestacao) {\n this.nrQtdPrestacao = nrQtdPrestacao;\n }",
"public void setClienteFK(Integer clienteFK) {\n\t\tthis.clienteFK.set(clienteFK);\n\t}",
"public Value.Builder setHariKe(int value) {\n validate(fields()[1], value);\n this.hari_ke = value;\n fieldSetFlags()[1] = true;\n return this;\n }",
"public void setMn007(String mn007) {\n this.mn007 = mn007 == null ? null : mn007.trim();\n }",
"public int vrniStanje(String izdelek)\r\n {\r\n \tif(izdelki.containsKey(izdelek))\r\n \t\treturn izdelki.get(izdelek);\r\n \telse\r\n \t\treturn -1;\r\n }",
"@Override\n\tpublic void setProvincia(String provincia) {\n\t\tmodel.setProvincia(provincia);\n\t}",
"public double getMozePreciKM() {\r\n return mozePreciKM;\r\n }",
"public void setORM_Markamarca1(orm.Marka value) {\r\n\t\tthis.markamarca1 = value;\r\n\t}",
"public void setKm(String km) {\n this.km = km == null ? null : km.trim();\n }",
"@Override\r\n\tpublic void setErreserba_kop(int erreserba_kop) {\n\t\tsuper.setErreserba_kop(erreserba_kop);\r\n\t}",
"public void setErjiguanlianzd(String erjiguanlianzd) {\n this.erjiguanlianzd = erjiguanlianzd;\n }"
] | [
"0.648187",
"0.5789014",
"0.5091283",
"0.5078192",
"0.50313807",
"0.5016354",
"0.49645802",
"0.49625838",
"0.48854783",
"0.4882801",
"0.48547974",
"0.47899473",
"0.47712886",
"0.47683635",
"0.47536334",
"0.4716266",
"0.47076392",
"0.46914804",
"0.46830785",
"0.46791136",
"0.4674586",
"0.46552104",
"0.46348643",
"0.4625089",
"0.46046236",
"0.4602324",
"0.45946482",
"0.45843396",
"0.4580453",
"0.45560992",
"0.45371425",
"0.45172697",
"0.4505511",
"0.44835314",
"0.4479191",
"0.4474818",
"0.44639084",
"0.44568932",
"0.44320843",
"0.44229588",
"0.44209635",
"0.44150966",
"0.4401776",
"0.44016376",
"0.43744466",
"0.43614691",
"0.43291956",
"0.43275023",
"0.43243802",
"0.43088427",
"0.42926767",
"0.42646965",
"0.42623",
"0.425123",
"0.4247892",
"0.422945",
"0.42029426",
"0.41996798",
"0.41738135",
"0.41725117",
"0.41714367",
"0.41622388",
"0.41620436",
"0.41604552",
"0.41602924",
"0.41597053",
"0.4150086",
"0.4138067",
"0.41173798",
"0.41117278",
"0.4109375",
"0.41013715",
"0.40986055",
"0.40981704",
"0.40961653",
"0.40921724",
"0.40911043",
"0.4091076",
"0.4084973",
"0.40829492",
"0.4082926",
"0.40778077",
"0.40766966",
"0.40753785",
"0.40721774",
"0.40718547",
"0.40532413",
"0.40504256",
"0.4047495",
"0.40287638",
"0.40282556",
"0.40210247",
"0.40197206",
"0.4018157",
"0.4012388",
"0.40123722",
"0.4009057",
"0.40016487",
"0.39960578",
"0.39941642"
] | 0.7394389 | 0 |
Get Values for Custom Control Register Type of Files of the CustomControl | @SuppressWarnings("unchecked")
public List<FileHelper> getValue(Object obj, String strFieldName, String strCcId, HashMap<String, FileHelper> valueFields) {
List<FileHelper> values;
try {
Method mt = obj.getClass().getMethod("get" + strFieldName);
values = (List<FileHelper>) mt.invoke(obj);
if (values == null)
return null;
for (FileHelper fh : values) {
valueFields.put(strCcId + "|" + fh.getId(), fh);
}
return values;
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void initializeControlFile(){\n\t\tinitializeControlFile(\"Control.xml\");\n\t}",
"public java.util.List<Object> generateControlVars();",
"private void initControlList() {\n this.controlComboBox.addItem(CONTROL_PANELS);\n //this.controlComboBox.addItem(PEER_TEST_CONTROL);\n //this.controlComboBox.addItem(DISAGGREGATION_CONTROL);\n this.controlComboBox.addItem(AXIS_CONTROL);\n this.controlComboBox.addItem(DISTANCE_CONTROL);\n this.controlComboBox.addItem(SITES_OF_INTEREST_CONTROL);\n this.controlComboBox.addItem(CVM_CONTROL);\n this.controlComboBox.addItem(X_VALUES_CONTROL);\n }",
"private void initComponentsCustom() {\n SGuiUtils.setWindowBounds(this, 480, 300);\n\n moTextUnitSymbol.setTextSettings(jlUnitSymbol.getText(), 15, 1);\n moTextUnitName.setTextSettings(jlName.getText(), 150, 1);\n moTextShortName.setTextSettings(SGuiUtils.getLabelName(jlAnalysisShortName.getText()), 10, 1);\n moTextName.setTextSettings(SGuiUtils.getLabelName(jlName.getText()), 100, 1);\n moKeyAnalysisType.setKeySettings(miClient, SGuiUtils.getLabelName(jlAnalysisType), true);\n\n moFields.addField(moTextUnitSymbol);\n moFields.addField(moTextUnitName);\n \n moFields.addField(moTextShortName);\n moFields.addField(moTextName);\n \n moFields.addField(moKeyAnalysisType);\n\n moFields.setFormButton(jbSave);\n }",
"public Enumeration getControlHandlerNames();",
"public List<String> getlococtrltype(){\n\t\t\tList<String> lococtrl= new ArrayList<>();\n\t\t\tobj_uncleansedcommonrepo.findctrltype()\n\t\t\t.forEach(lococtrl::add);\n\t\t\treturn lococtrl;\n\t\t}",
"private void populateSpecialEvent() {\n try {\n vecSpecialEventKeys = new Vector();\n vecSpecialEventLabels = new Vector();\n StringTokenizer stk = null;\n //MSB -09/01/05 -- Changed configuration file and Keys\n // config = new ConfigMgr(\"customer.cfg\");\n // String strSubTypes = config.getString(\"SPECIAL_EVENT_TYPES\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"SPECIAL_EVT_TYPE\");\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecSpecialEventKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecSpecialEventLabels.add(value);\n }\n cbxSpcEvt.setModel(new DefaultComboBoxModel(vecSpecialEventLabels));\n } catch (Exception e) {}\n }",
"public Template_Label(String name, String description, ArrayList<CustomizerControl> controls, JTextComponent target) {\n\n initComponents();\n\n this.customizerName = name;\n this.controls = controls;\n this.controlMap = new HashMap<>();\n ;\n\n //this.descriptionLabel.setText(description);\n //Create a layout for this form\n this.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n\n JLabel formLabel = new JLabel(description);\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridy = 0;\n c.ipady = 10;\n\n this.add(formLabel, c);\n\n int row = 0;\n for (CustomizerControl control : controls) {\n\n if (control.getClass().isAssignableFrom(CustomizerTextField.class)) {\n //Text Control\n row += 1;\n\n //Add the label first.\n JLabel newLabel = new JLabel(control.getLabel());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridwidth = 1;\n c.gridy = row;\n c.ipady = 10;\n this.add(newLabel, c);\n\n JTextField newTextField = new JTextField((String) control.getValue());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 1;\n c.gridwidth = 2;\n c.gridy = row;\n controlMap.put(control.getName(), newTextField);\n this.add(newTextField, c);\n\n } else if (control.getClass().isAssignableFrom(CustomizerComboField.class)) {\n //Combo Control\n row += 1;\n //Add the label first.\n JLabel newLabel = new JLabel(control.getLabel());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridwidth = 1;\n c.gridy = row;\n c.ipady = 10;\n this.add(newLabel, c);\n\n //Convert ArrayList to Array\n ArrayList<String> controlValues = (ArrayList<String>) control.getValue();\n String[] valueArray = new String[controlValues.size()];\n valueArray = controlValues.toArray(valueArray);\n\n JComboBox newComboField = new JComboBox(valueArray);\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 1;\n c.gridwidth = 2;\n c.gridy = row;\n controlMap.put(control.getName(), newComboField);\n this.add(newComboField, c);\n\n } else if (control.getClass().isAssignableFrom(CustomizerVariableField.class)) {\n //Variable Field\n\n //Populate variables from code if it hasn't been done already\n if (variableList == null) {\n String code = target.getText();\n JEditorPane codeEditor = (JEditorPane) target;\n String language = codeEditor.getContentType();\n CodeParser parser = new CodeParser(code, language);\n variableList = parser.getVariableList();\n }\n\n //Build the control, it is just a dropdown with the variable list\n //Combo Control\n row += 1;\n //Add the label first.\n JLabel newLabel = new JLabel(control.getLabel());\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 0;\n c.gridwidth = 1;\n c.gridy = row;\n c.ipady = 10;\n this.add(newLabel, c);\n\n //Convert ArrayList to Array\n String[] valueArray = new String[variableList.size()];\n valueArray = variableList.toArray(valueArray);\n\n JComboBox newComboField = new JComboBox(valueArray);\n newComboField.setEditable(true);\n c = new GridBagConstraints(); //Reset constraints\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weightx = 0.5;\n c.gridx = 1;\n c.gridwidth = 2;\n c.gridy = row;\n controlMap.put(control.getName(), newComboField);\n this.add(newComboField, c);\n\n } else if (control.getClass().isAssignableFrom(CustomizerExpressionField.class)) {\n\n }\n }\n\n //Check if we can assign the target JTextComponent to a JEditorPane.\n //row += 1;\n //int lineNum = getRow(target.getCaretPosition(), target);\n //int columnNum = getColumn(target.getCaretPosition(), target);\n this.validate();\n this.repaint();\n\n }",
"private void register()\n {\n ScControlRegistry r = getRegistry();\n\n _key = r.getNextKey();\n r.register(this);\n }",
"private LinkedHashMap<String, String> loadFeatureUnitControl() {\n\t\tLinkedHashMap<String, String> featurUnitControl = new LinkedHashMap<String, String>();\n\t\tfor (String propertyField : UACSettingFieldConstants.FEATURE_UNIT_CONTROLS_FIELDS) {\n\t\t\tfeaturUnitControl.put(propertyField, \"Disable\");\n\t\t}\n\t\treturn featurUnitControl;\n\t}",
"public com.commercetools.api.models.type.CustomFields getCustom() {\n return this.custom;\n }",
"public com.commercetools.api.models.type.CustomFields getCustom() {\n return this.custom;\n }",
"public JComboBox<?> getFileTypesCombo() {\n return getCombo(1);\n }",
"@Override\r\n public void initControl() {\n \r\n }",
"@Override\n\tprotected void createAdditionalControls(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout containerLayout = new GridLayout(2, false);\n\t\tcontainerLayout.marginWidth = 0;\n\t\tcontainer.setLayout(containerLayout);\n\t\t\n\t\tLabel comboLabel = new Label(container, SWT.NONE);\n\t\tcomboLabel.setText(Messages.common_calculation);\n\t\t\n\t\tcalculationTypeCombo = new Combo(container, SWT.READ_ONLY);\n\t\tcalculationTypeCombo.setItems(NamedEnumPropertyDescriptor.getEnumItems(calculationTypes, NullEnum.NOTNULL));\n\t\tcalculationTypeCombo.select(0);\n\t\tcalculationTypeCombo.addSelectionListener(new SelectionAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint selectedIndex = calculationTypeCombo.getSelectionIndex();\n\t\t\t\tselectedEnum = (CalculationEnum)calculationTypes[selectedIndex];\n\t\t\t}\n\t\t});\n\t}",
"protected void initControl() {\n\t\t\r\n\t}",
"Control getControl(String controlType);",
"private void initComponentsCustom() {\n SGuiUtils.setWindowBounds(this, 480, 300);\n\n moIntYear.setIntegerSettings(SGuiUtils.getLabelName(jlYear.getText()), SGuiConsts.GUI_TYPE_INT_CAL_YEAR, true);\n moDateDate.setDateSettings(miClient, SGuiUtils.getLabelName(jlDate.getText()), true);\n moTextCode.setTextSettings(SGuiUtils.getLabelName(jlCode.getText()), 10);\n moTextName.setTextSettings(SGuiUtils.getLabelName(jlName.getText()), 50);\n\n moFields.addField(moIntYear);\n moFields.addField(moDateDate);\n moFields.addField(moTextCode);\n moFields.addField(moTextName);\n\n moFields.setFormButton(jbSave);\n }",
"private static void readCitProperties(String fileName) {\n/* */ try {\n/* 91 */ ResourceLocation e = new ResourceLocation(fileName);\n/* 92 */ InputStream in = Config.getResourceStream(e);\n/* */ \n/* 94 */ if (in == null) {\n/* */ return;\n/* */ }\n/* */ \n/* */ \n/* 99 */ Config.dbg(\"CustomItems: Loading \" + fileName);\n/* 100 */ Properties props = new Properties();\n/* 101 */ props.load(in);\n/* 102 */ in.close();\n/* 103 */ useGlint = Config.parseBoolean(props.getProperty(\"useGlint\"), true);\n/* */ }\n/* 105 */ catch (FileNotFoundException var4) {\n/* */ \n/* */ return;\n/* */ }\n/* 109 */ catch (IOException var5) {\n/* */ \n/* 111 */ var5.printStackTrace();\n/* */ } \n/* */ }",
"public void addControls() {\n }",
"public abstract Class<?>[] getFormRegions();",
"public ScControl()\n {\n register();\n install();\n }",
"private void loadData(com.sun.star.awt.XWindow aWindow)\n throws com.sun.star.uno.Exception\n {\n // Determine the name of the window. This serves two purposes. First, if this\n // window is supported by this handler and second we use the name two locate\n // the corresponding data in the registry.\n String sWindowName = getWindowName(aWindow);\n if (sWindowName == null)\n throw new com.sun.star.lang.IllegalArgumentException(\n \"The window is not supported by this handler\", this, (short) -1);\n\n // To acces the separate controls of the window we need to obtain the\n // XControlContainer from window implementation\n XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(\n XControlContainer.class, aWindow);\n if (xContainer == null)\n throw new com.sun.star.uno.Exception(\n \"Could not get XControlContainer from window.\", this);\n\n // This is an implementation which will be used for several options pages\n // which all have the same controls. m_arStringControls is an array which\n // contains the names.\n for (int i = 0; i < ControlNames.length; i++)\n {\n // load the values from the registry\n // To access the registry we have previously created a service instance\n // of com.sun.star.configuration.ConfigurationUpdateAccess which supports\n // com.sun.star.container.XNameAccess. We obtain now the section\n // of the registry which is assigned to this options page.\n XPropertySet xLeaf = (XPropertySet) UnoRuntime.queryInterface(\n XPropertySet.class, this.accessLeaves.getByName(sWindowName));\n if (xLeaf == null)\n throw new com.sun.star.uno.Exception(\"XPropertySet not supported.\", this);\n\n // The properties in the registry have the same name as the respective\n // controls. We use the names now to obtain the property values.\n Object aValue = xLeaf.getPropertyValue(ControlNames[i]);\n\n // Now that we have the value we need to set it at the corresponding\n // control in the window. The XControlContainer, which we obtained earlier\n // is the means to get hold of all the controls.\n XControl xControl = xContainer.getControl(ControlNames[i]);\n\n // This generic handler and the corresponding registry schema support\n // up to five text controls. However, if a options page does not use all\n // five controls then we will not complain here.\n if (xControl == null)\n continue;\n\n // From the control we get the model, which in turn supports the\n // XPropertySet interface, which we finally use to set the data at the\n // control\n XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(\n XPropertySet.class, xControl.getModel());\n\n if (xProp == null)\n throw new com.sun.star.uno.Exception(\"Could not get XPropertySet from control.\", this);\n\n // Some default handlings: you can freely adapt the behaviour to your\n // needs, this is only an example.\n // For text controls we set the \"Text\" property.\n if(ControlNames[i].startsWith(\"txt\"))\n {\n xProp.setPropertyValue(\"Text\", aValue);\n }\n // The available properties for a checkbox are defined in file\n // offapi/com/sun/star/awt/UnoControlCheckBoxModel.idl\n else if(ControlNames[i].startsWith(\"chk\"))\n {\n xProp.setPropertyValue(\"State\", aValue);\n }\n // The available properties for a checkbox are defined in file\n // offapi/com/sun/star/awt/UnoControlListBoxModel.idl\n else if(ControlNames[i].startsWith(\"lst\"))\n {\n xProp.setPropertyValue(\"StringItemList\", aValue);\n \n aValue = xLeaf.getPropertyValue(ControlNames[i] + \"Selected\");\n xProp.setPropertyValue(\"SelectedItems\", aValue);\n }\n }\n }",
"public void setControls() {\r\n System.out.println(\"wire data is \" + this.controllerWire.getData());\r\n String operation = this.controlMemory.get(this.controllerWire.getData());\r\n System.out.println(\"Setting the controls for \" + operation);\r\n if (operation.equalsIgnoreCase(\"add\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n //aluMUX.setSelect(0);\r\n //regMUX.setSelect(0);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"addi\")) {\r\n //alu.setControl(1);\r\n this.ALUControl.setData(1);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sub\")) {\r\n //alu.setControl(2);\r\n this.ALUControl.setData(2);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"lw\")) {\r\n// alu.setControl(8); // TODO \r\n this.ALUControl.setData(8);\r\n this.REG_MUXControl.setData(1);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.readWire.setData(1);\r\n memory.setReadWire(this.readWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sw\")) {\r\n //alu.setControl(9); // TODO\r\n this.ALUControl.setData(9);\r\n //regMUX.setSelect(1);\r\n this.writeWire.setData(1);\r\n memory.setWriteWire(writeWire);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"sll\")) {\r\n //alu.setControl(6);\r\n this.ALUControl.setData(6);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"srl\")) {\r\n //alu.setControl(5);\r\n this.ALUControl.setData(5);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"and\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"andi\")) {\r\n //alu.setControl(4);\r\n this.ALUControl.setData(4);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"or\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"ori\")) {\r\n //alu.setControl(3);\r\n this.ALUControl.setData(3);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"nor\")) {\r\n //alu.setControl(7);\r\n this.ALUControl.setData(7);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(10);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"bne\")) {\r\n this.PC_MUXControl.setData(0);\r\n this.ALUControl.setData(11);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jr\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"j\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(12);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"jal\")) {\r\n this.PC_MUXControl.setData(1);\r\n this.ALUControl.setData(16);\r\n this.PC_MUXControl.setData(1);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.ALU_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.REG_MUXControl.setData(0);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n\r\n } else if (operation.equalsIgnoreCase(\"slt\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n } else if (operation.equalsIgnoreCase(\"slti\")) {\r\n this.ALUControl.setData(13);\r\n this.ALU_MUXControl.setData(1);\r\n this.REG_MUXControl.setData(0);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltu\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(0);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"sltui\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n this.registerWrite.setData(1);\r\n registers.setRegWriteControl(this.registerWrite);\r\n this.REG_MUXControl.setData(0);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n regMUX.setSelect(this.REG_MUXControl);\r\n this.PC_MUXControl.setData(0);\r\n this.pcMUX.setSelect(this.PC_MUXControl);\r\n } else if (operation.equalsIgnoreCase(\"beq\")) {\r\n this.ALUControl.setData(14);\r\n this.ALU_MUXControl.setData(1);\r\n aluMUX.setSelect(this.ALU_MUXControl);\r\n this.registerWrite.setData(0);\r\n registers.setRegWriteControl(this.registerWrite);\r\n }\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU CONTROL: \" + this.ALUControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"ALU MUX CONTROL: \" + this.ALU_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"PC MUX CONTROL: \" + this.PC_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REG MUX CONTROL: \" + this.REG_MUXControl.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY READ: \" + this.readWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"MEMORY WRITE: \" + this.writeWire.toString());\r\n instructionMemory.wiresLog.get(instructionMemory.COMMANDS_COUNTER).get(1).add(\"REGISTER WRITE: \" + this.registerWrite.toString());\r\n this.setRegisterWriteControl();\r\n }",
"@Override\r\n\tprotected Control createContents(Composite parent) {\n\t\tIProject project = (IProject) getElement().getAdapter(IProject.class);\r\n\t\tdfc = new DeepFileChanger(project.getLocation()\t+ \"/\" + project.getName() + \".deep\");\r\n\r\n\t\tlibPath = dfc.getContent(\"libpath\");\r\n\t\tif (!libPath.equals(\"not available\")) libPath = libPath.substring(1, libPath.length()-1);\r\n\t\tboard = dfc.getContent(\"boardtype\");\r\n\t\tprogrammer = dfc.getContent(\"programmertype\");\r\n\t\tos = dfc.getContent(\"ostype\");\r\n\t\trootclasses = dfc.getContent(\"rootclasses\");\r\n\t\timglocation = dfc.getContent(\"imgfile\");\r\n\t\timgformat = dfc.getContent(\"imgformat\");\r\n\t\tif(imglocation.equalsIgnoreCase(\"not available\") && imgformat.equalsIgnoreCase(\"not available\")){\r\n\t\t\tcreateImgFile = false;\r\n\t\t\tlastImgPathChoice = project.getLocation().toString();\r\n\t\t\tlastImgPathChoice = lastImgPathChoice.replace('/', '\\\\');\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcreateImgFile = true;\r\n\t\t\tlastImgPathChoice = imglocation.replace('/', '\\\\');\r\n\t\t\tlastImgPathChoice = lastImgPathChoice.substring(1,lastImgPathChoice.length() -1 );\r\n\t\t\tint indexOfProjectName = lastImgPathChoice.lastIndexOf(\"\\\\\");\r\n\t\t\tlastImgPathChoice = lastImgPathChoice.substring(0, indexOfProjectName);\r\n\t\t\tlastImgFormatChoice = imgformat;\r\n\t\t}\r\n\t\t\r\n//\t\tSystem.out.println(dfc.fileContent.toString());\t\t\r\n//\t\tSystem.out.println(libPath);\r\n//\t\tSystem.out.println(board);\r\n//\t\tSystem.out.println(programmer);\r\n//\t\tSystem.out.println(os);\r\n//\t\tSystem.out.println(rootclasses);\r\n//\t\tSystem.out.println(lastImgPathChoice);\r\n//\t\tSystem.out.println(lastImgFormatChoice);\r\n//\t\tSystem.out.println(\"\");\r\n\r\n\t\t// read project preferences\r\n\t\tpref = getPref();\r\n\t\t\r\n\t\t// build control\r\n\t\tComposite composite = new Composite(parent, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\t\r\n\t\tGroup groupLib = new Group(composite, SWT.NONE);\r\n\t\tgroupLib.setText(\"Target Library\");\r\n\t\tGridLayout gridLayout2 = new GridLayout(2, false);\r\n\t\tgroupLib.setLayout(gridLayout2);\r\n\t\tGridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);\r\n\t\tgridData.horizontalSpan = 2;\r\n\t\tgroupLib.setLayoutData(gridData);\r\n\t\tLabel label1 = new Label(groupLib,SWT.NONE);\r\n\t\tlabel1.setText(\"Pleace specify the target library you want to use for this project.\");\r\n\t\tlabel1.setLayoutData(gridData);\r\n\t\tLabel dummy = new Label(groupLib, SWT.NONE);\r\n\t\tdummy.setLayoutData(gridData);\r\n\t\tcheck = new Button(groupLib, SWT.CHECK);\r\n\t\tcheck.setText(\"Use default library path\");\r\n\t\tcheck.setSelection(libPath.equals(defaultPath));\r\n\t\tcheck.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tif (e.widget.equals(check)) {\r\n\t\t\t\t\tif (check.getSelection()) {\r\n\t\t\t\t\t\tpath.setEnabled(false);\r\n\t\t\t\t\t\tpath.setText(defaultPath);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpath.setEnabled(true);\r\n\t\t\t\t\t\tpath.setText(lastChoice);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlibPath = path.getText();\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tcheck.setLayoutData(gridData);\r\n\t\tpath = new Text(groupLib, SWT.SINGLE | SWT.BORDER);\r\n\t\tGridData gridData2 = new GridData();\r\n\t\tgridData2.horizontalAlignment = SWT.FILL;\r\n\t\tgridData2.grabExcessHorizontalSpace = true;\r\n\t\tpath.setLayoutData(gridData2);\r\n\t\tpath.setText(libPath);\r\n\t\tpath.setEnabled(!libPath.equals(defaultPath));\r\n\t\tpath.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\tlibPath = path.getText();\r\n\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbrowse = new Button(groupLib, SWT.PUSH);\r\n\t\tbrowse.setText(\"Browse...\");\r\n\t\tbrowse.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tif (!check.getSelection()){\t\r\n\t\t\t\t\topenDirectoryDialog();\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tlibState = new Label(groupLib,SWT.NONE);\r\n\t\tlibState.setLayoutData(gridData);\r\n\r\n//\t\tGroup groupBoard = new Group(composite, SWT.BOTTOM);\r\n\t\tGroup groupBoard = new Group(composite, SWT.NONE);\r\n\t\tgroupBoard.setText(\"Board configuration\");\r\n\t\tGridLayout groupLayout1 = new GridLayout(2, false);\r\n\t\tgroupBoard.setLayout(groupLayout1);\r\n\t\tGridData gridData3 = new GridData();\r\n\t\tgridData3.horizontalAlignment = SWT.FILL;\r\n\t\tgridData3.grabExcessHorizontalSpace = true;\r\n\t\tgridData3.horizontalSpan = 2;\r\n\t\tgroupBoard.setLayoutData(gridData3);\r\n\t\tLabel boardLabel = new Label(groupBoard, SWT.NONE);\r\n\t\tboardLabel.setText(\"Select a board\");\r\n\t\tboardCombo = new Combo(groupBoard, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\tboardCombo.addSelectionListener(listener);\r\n\t\tLabel progLabel = new Label(groupBoard, SWT.NONE);\r\n\t\tprogLabel.setText(\"Select a programmer\");\r\n\t\tprogrammerCombo = new Combo(groupBoard, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\tprogrammerCombo.addSelectionListener(listener);\r\n\r\n//\t\tGroup groupOS = new Group(composite, SWT.BOTTOM);\r\n\t\tGroup groupOS = new Group(composite, SWT.NONE);\r\n\t\tgroupOS.setText(\"Runtime system\");\r\n\t\tGridLayout groupLayout2 = new GridLayout(2, false);\r\n\t\tgroupOS.setLayout(groupLayout2);\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.horizontalAlignment = SWT.FILL;\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 2;\r\n\t\tgroupOS.setLayoutData(gridData4);\r\n\t\tLabel osLabel = new Label(groupOS,SWT.NONE);\r\n\t\tosLabel.setText(\"Select a operating system\");\r\n\t\tosCombo = new Combo(groupOS, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\tosCombo.addSelectionListener(listener);\r\n\r\n\t\tGroup groupImg = new Group(composite, SWT.NONE);\r\n\t\tgroupImg.setText(\"Image file creation\");\r\n\t\tGridLayout gridLayoutImg = new GridLayout(2,false);\r\n\t\tgroupImg.setLayout(gridLayoutImg);\r\n\t\tGridData gridDataImg = new GridData(SWT.FILL, SWT.CENTER, true, false);\r\n\t\tgridDataImg.horizontalSpan = 2;\t\t\r\n\t\tcheckImg = new Button(groupImg, SWT.CHECK);\r\n\t\tcheckImg.setText(\"Create image file\");\r\n\t\tcheckImg.setSelection(false);\r\n\t\tcheckImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tif(e.widget.equals(checkImg)) {\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t\tif(checkImg.getSelection()) {\r\n\t\t\t\t\t\tpathImg.setEnabled(true);\r\n\t\t\t\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\t\t\t\tbrowseImg.setEnabled(true);\r\n\t\t\t\t\t\timgFormatCombo.setEnabled(true);\r\n\t\t\t\t\t\tindexImgFormat = 0;\r\n\t\t\t\t\t\tfor (int i = 0; i < Configuration.formatMnemonics.length; i++) {\r\n\t\t\t\t\t\t\tif (lastImgFormatChoice.equalsIgnoreCase(Configuration.formatMnemonics[i])) indexImgFormat = i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\timgFormatCombo.select(indexImgFormat);\r\n\t\t\t\t\t\tcreateImgFile = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tpathImg.setEnabled(false);\r\n\t\t\t\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\t\t\t\tbrowseImg.setEnabled(false);\r\n\t\t\t\t\t\timgFormatCombo.setEnabled(false);\r\n\t\t\t\t\t\tindexImgFormat = 0;\r\n\t\t\t\t\t\tfor (int i = 0; i < Configuration.formatMnemonics.length; i++) {\r\n\t\t\t\t\t\t\tif (lastImgFormatChoice.equalsIgnoreCase(Configuration.formatMnemonics[i])) indexImgFormat = i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\timgFormatCombo.select(indexImgFormat);\r\n\t\t\t\t\t\tcreateImgFile = false;\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\tcheckImg.setLayoutData(gridDataImg);\r\n\t\t\r\n\t\tGridData gridDataImg2 = new GridData(SWT.FILL, SWT.FILL, true, false);\r\n\t\tpathImg = new Text(groupImg, SWT.SINGLE | SWT.BORDER);\r\n\t\tpathImg.setLayoutData(gridDataImg2);\r\n\t\tpathImg.setEnabled(false);\r\n\t\tpathImg.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\timglocation = pathImg.getText();\r\n\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbrowseImg = new Button(groupImg, SWT.PUSH);\r\n\t\tbrowseImg.setText(\"Browse...\");\r\n\t\tbrowseImg.setEnabled(false);\r\n\t\tbrowseImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e){\r\n\t\t\t\tif (checkImg.getSelection()) {\t\r\n\t\t\t\t\topenImgDirectoryDialog();\r\n\t\t\t\t\tif (checkLibPath()) readLib();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\t\r\n\t\tGridData gridDataImg3 = new GridData(SWT.FILL, SWT.FILL, true, false);\r\n\t\tgridDataImg3.horizontalSpan = 2;\r\n\t\tLabel imgFormatLabel = new Label(groupImg,SWT.NONE);\r\n\t\timgFormatLabel.setText(\"Select image file format\");\r\n\t\timgFormatCombo = new Combo(groupImg, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);\r\n\t\timgFormatCombo.setEnabled(false);\r\n\t\timgFormatCombo.setLayoutData(gridDataImg3);\r\n\t\timgFormatCombo.addSelectionListener(listener);\r\n\t\tindexImgFormat = 0;\r\n\t\tfor (int i = 0; i < Configuration.formatMnemonics.length; i++) {\r\n\t\t\tif (lastImgFormatChoice.equalsIgnoreCase(Configuration.formatMnemonics[i])) indexImgFormat = i;\r\n\t\t}\r\n\t\timgFormatCombo.select(indexImgFormat);\r\n\t\t\r\n\t\t//initial values of Image file creation\r\n\t\tif(createImgFile){\r\n\t\t\tcheckImg.setSelection(true);\r\n\t\t\tpathImg.setEnabled(true);\r\n\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\tbrowseImg.setEnabled(true);\r\n\t\t\timgFormatCombo.setEnabled(true);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcheckImg.setSelection(false);\r\n\t\t\tpathImg.setEnabled(false);\r\n\t\t\tpathImg.setText(lastImgPathChoice);\r\n\t\t\tbrowseImg.setEnabled(false);\r\n\t\t\timgFormatCombo.setEnabled(false);\r\n\t\t}\r\n\t\t\r\n\t\tif (checkLibPath()) readLib(); else libPath = \"not available\";\r\n\t\treturn composite;\r\n\t}",
"public List controls(){\n return controls;\n }",
"public String readControlFile(String fieldname, String inputsheet, int mycnt) throws IOException {\r\n\t\t\r\n\t\tFile inputWorkbook = new File(inputFile);\r\n\t\tWorkbook w;\r\n\t\tString cellData = null;\r\n\t\ttry {\r\n\t\t\tw = Workbook.getWorkbook(inputWorkbook);\r\n\t\t\tSheet sheet = w.getSheet(inputsheet);\r\n\t\t\tCell cell1 = sheet.getCell(3,0);\r\n\t\t\t//System.out.println(cell1.getContents());\r\n\t\t\tif (cell1.getContents().equals(fieldname)) {\r\n\t\t\t\tCell nxtcell = sheet.getCell(3, mycnt);\t\t\t\r\n\t\t\t\tcellData = nxtcell.getContents();\t\t\t\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t} catch (BiffException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn cellData;\r\n\t\t\r\n\t}",
"protected void processControlSpec(Hashtable attributes)\n throws SAXException\n {\n if (currentControl != null)\n\t throw new SAXException(\n\t \"Trying to create new field when current is not complete.\");\n\tXMLTag typeTag = (XMLTag) attributes.get(XMLTag.TYPE);\n\t// above will throw a class cast exception if we have an\n\t// invalid type value.\n\tString id = (String) attributes.get(XMLTag.ID);\n\tXMLTag dataTypeTag = (XMLTag) attributes.get(XMLTag.DATATYPE);\n\tif (dataTypeTag == null)\n\t dataTypeTag = XMLTag.STRING;\n\tString dataRange = (String) attributes.get(XMLTag.DATARANGE);\n FieldInfo fld = new FieldInfo(id);\n if ((typeTag == XMLTag.FIXEDTEXT) || \n (typeTag == XMLTag.PUSHBUTTON))\n\t {\n\t fld.setDummyControl(true);\n\t }\n\telse if (typeTag == XMLTag.FIELD)\n\t {\n\t fld.setTextControl(true);\n\t if ((dataTypeTag != null) &&\n\t\t((dataTypeTag == XMLTag.READFILE) ||\n\t\t (dataTypeTag == XMLTag.WRITEFILE)||\n (dataTypeTag == XMLTag.PATH)))\n\t {\n\t\tfld.setFileField(true);\n\t\tboolean bMustExist = (dataTypeTag == XMLTag.READFILE)||\n\t\t (dataTypeTag == XMLTag.PATH);\n\t\tfld.setExisting(bMustExist);\n\t\tString range = (String) attributes.get(XMLTag.DATARANGE);\n\t\tif (range != null)\n\t\t {\n\t\t String filePattern;\n\t\t int pos = range.indexOf(\",\");\n\t\t if (pos >= 0)\n\t\t {\n\t\t\t filePattern = range.substring(0,pos);\n\t\t\t String memoryFiles = range.substring(pos+1);\n\t\t\t fld.setAllowedMemoryFiles(\n\t\t\t\t parseMemoryFiles(memoryFiles));\n\t\t\t }\n\t\t else\n\t\t {\n\t\t\t filePattern = range;\n\t\t\t }\n\t\t DFileType type = DFileType.getFileType(filePattern);\n\t\t if (type != null)\n\t\t fld.setFileType(type);\n\t\t }\n\t\t}\n\t else\n\t {\n\t\tValueLimits limits = null;\n\t\tif (dataRange != null)\n\t\t {\n\t\t if (dataTypeTag == XMLTag.INTEGER)\n\t\t {\n\t\t\tlimits = makeIntegerLimits(dataRange);\n\t\t\t}\n\t\t if (dataTypeTag == XMLTag.DOUBLE)\n\t\t {\n\t\t\tlimits = makeLimits(dataRange);\n\t\t\t}\n\t\t fld.setValueLimits(limits);\n\t\t }\n\n\t\t}\n\t }\n\telse if (typeTag == XMLTag.FIXEDCOMBO) \n\t {\n\t if (dataRange == null)\n\t {\n\t\tthrow new SAXException(\n \"Control \" + id + \n\t\t \": DataRange specifying choices is required for fixedCombo controls\");\n\t\t}\n\t int numChoices = dataRange.length();\n\t String[] choices = new String[numChoices];\n\t for (int i = 0; i < numChoices; i++)\n\t {\n\t\tif (i < numChoices - 1)\n \t choices[i] = dataRange.substring(i,i+1);\n\t\telse\n\t\t choices[i] = dataRange.substring(i);\n\t\t}\n fld.setChoiceControl(true);\n\t fld.setChoicesFixed(true);\n\t }\n\telse if (typeTag == XMLTag.VARCOMBO) \n\t {\n fld.setChoiceControl(true);\n\t fld.setChoicesFixed(false);\n\t }\n\telse if (typeTag == XMLTag.CHECKBUTTON)\n\t {\n\t if ((dataRange == null) ||\n\t\t(dataRange.length() != 2))\n\t {\n\t\t // if no data range is specified assume the choices\n\t\t // are \"Y\" and \"N\"\n\t\tdataRange = new String(\"YN\");\n\t\t}\n\t int numChoices = dataRange.length();\n\t String[] choices = new String[numChoices];\n\t for (int i = 0; i < numChoices; i++)\n\t {\n\t\tif (i < numChoices - 1)\n \t choices[i] = dataRange.substring(i,i+1);\n\t\telse\n\t\t choices[i] = dataRange.substring(i);\n\t\t}\n fld.setChoiceControl(true);\n\t fld.setChoicesFixed(true);\n\t fld.setChoiceStrings(choices);\n\n\t }\n\telse if (typeTag == XMLTag.RADIOPANEL)\n\t {\n\t if (dataRange == null)\n\t {\n\t\tthrow new SAXException(\n \"Control \" + id + \n\t\t \": DataRange specifying choices is required for radioPanel controls\");\n\t\t}\n\t int numChoices = dataRange.length();\n\t boolean bHorizontal = true;\n \t XMLTag displayOpt = (XMLTag) attributes.get(XMLTag.DISPLAYOPTS);\n\t if ((displayOpt != null) && (displayOpt == XMLTag.VERTICAL))\n\t\tbHorizontal = false;\n\t String[] choices = new String[numChoices];\n\t for (int i = 0; i < numChoices; i++)\n\t {\n\t\tif (i < numChoices - 1)\n \t choices[i] = dataRange.substring(i,i+1);\n\t\telse\n\t\t choices[i] = dataRange.substring(i);\n\t\t}\n fld.setChoiceControl(true);\n\t fld.setChoicesFixed(true);\n\t }\n\telse if (typeTag == XMLTag.RANGECONTROL)\n\t {\n\t ValueLimits limits = null;\n\t if (dataRange != null)\n\t\t{\n\t\tif (dataTypeTag == XMLTag.INTEGER)\n\t\t {\n\t\t limits = makeIntegerLimits(dataRange);\n\t\t }\n\t if (dataTypeTag == XMLTag.DOUBLE)\n\t\t {\n\t\t limits = makeLimits(dataRange);\n\t\t }\n\t\t}\n\t fld.setValueLimits(limits);\n }\n\telse if (typeTag == XMLTag.LISTBOX)\n\t {\n\t /* No special processing to be done for a list box */\n }\n\telse if (typeTag == XMLTag.TABLECONTROL)\n {\n\t /* No special processing to be done for a list box */\n\t }\n\telse\n\t {\n\t throw new SAXException(\n \"Unimplemented control type: \" + typeTag.toString());\n\t }\n\t// Now set things that are common to all controls\n\tcurrentControl = fld;\n\tString pSpecStr = (String) attributes.get(XMLTag.PSPECSTR);\n\tif (pSpecStr != null)\n\t currentControl.setPSpecifier(pSpecStr);\n\tXMLTag requiredTag = (XMLTag) attributes.get(XMLTag.BREQUIRED);\n\tif ((requiredTag != null) && (requiredTag == XMLTag.TRUE))\n\t currentControl.setRequired(true);\n\tXMLTag defaultTag = (XMLTag) attributes.get(XMLTag.DEFAULTCATEGORY);\n if ((defaultTag == null) &&\n (typeTag == XMLTag.FIXEDCOMBO))\n\t {\n defaultTag = XMLTag.INDEX;\n\t }\n if (defaultTag == XMLTag.STRING)\n\t {\n\t String dflt = (String) attributes.get(XMLTag.DEFAULTSTR);\n\t currentControl.setDefaultValue(dflt);\n\t }\n\telse if (defaultTag == XMLTag.INDEX)\n\t {\n String indexStr = (String) attributes.get(XMLTag.DEFAULTINDEX);\n\t String range = (String) attributes.get(XMLTag.DATARANGE);\n\t if (indexStr == null)\n\t indexStr = \"0\";\n if (range == null)\n\t throw new SAXException(\"Incorrectly specified indexed default - missing data range: control ID is \" + currentControl.getName());\n\t try \n\t {\n\t int index = Integer.parseInt(indexStr);\n\t\tif ((index >= range.length()) || (index < 0))\n\t\t {\n\t\t throw new SAXException(\"Incorrectly specified indexed default - index must match range: control ID is \" + currentControl.getName());\n\t\t }\n\t\tString dflt;\n if (index < range.length()-1)\n\t\t dflt = range.substring(index,index+1);\n\t\telse\n\t\t dflt = range.substring(index);\n\t\tcurrentControl.setDefaultValue(dflt);\n\t\t}\n\t catch (NumberFormatException nfe)\n\t {\n\t throw new SAXException(\"Incorrectly specified indexed default - index must be an integer: control ID is \" + currentControl.getName());\n\t\t}\n\t }\n\t}",
"private void findControls()\n { //findControls\n mBtnDownload = (Button) findViewById(R.id.btn_download);\n mBtnCancel = (Button) findViewById(R.id.btn_Cancel);\n mTvFilename = (TextView) findViewById(R.id.tv_filename);\n mPbDownload = (ProgressBar) findViewById(R.id.pb_download);\n mTvProgress = (TextView) findViewById(R.id.tv_progress);\n mBtnDownload1 = (Button) findViewById(R.id.btn_download1);\n mBtnPause = (Button) findViewById(R.id.btn_pause);\n\n //set event handler\n mBtnDownload.setOnClickListener(this);\n mBtnDownload1.setOnClickListener(this);\n mBtnPause.setOnClickListener(this);\n mBtnCancel.setOnClickListener(this);\n }",
"public Map<Integer, Integer> getRegisterDataMap(){\n return registerFile.getRegisterMap();\n }",
"private void customizeComponents(Component c, int i1) {\r\n\r\n\t\t/**\r\n\t\t * cName is name of component without index\r\n\t\t */\r\n\t\tint a = 1;\r\n\t\t/**\r\n\t\t * to get correct cName depending on index\r\n\t\t */\r\n\t\tfor (int i = 0; i < c.getName().length(); i++) {\r\n\t\t\ttry {\r\n\t\t\t\ta = Integer.parseInt(c.getName().substring(i));\r\n\t\t\t\ta = c.getName().substring(i).length();\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString cName = c.getName().substring(0, c.getName().length() - a);\r\n\r\n\t\tswitch (cName) {\r\n\t\tcase \"lblImageSimulation\": {\r\n\t\t\t((JLabel) c).setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageCup\": {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfCup\": {\r\n\t\t\t((JTextField) c).setOpaque(false);\r\n\t\t\tc.setForeground(Color.gray);\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.BOLD, 36));\r\n\t\t\ttxfsCup[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfCupVolume\": {\r\n\t\t\ttxfsCupVolume[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblDisplayName\": {\r\n\t\t\t((JLabel) c).setBorder(\r\n\t\t\t\t\tnew CompoundBorder(new EtchedBorder(EtchedBorder.RAISED, null, null), new EmptyBorder(0, 2, 0, 0)));\r\n\t\t\tc.setForeground(Color.darkGray);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfDisplayCurrentVolume\": {\r\n\t\t\t((JTextField) c).setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));\r\n\t\t\t((JTextField) c).setOpaque(true);\r\n\t\t\tc.setBackground(new Color(30, 200, 225));\r\n\t\t\tFont dig7_S16 = dig7.deriveFont(Font.BOLD, 16);\r\n\t\t\tGraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(dig7_S16);\r\n\t\t\tc.setFont(dig7_S16);\r\n\t\t\ttxfsDisplayCurrentVolume[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageCD\": {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblCDBadge\": {\r\n\t\t\tc.setForeground(Color.lightGray);\r\n\t\t\tc.setFont(dig7);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"txfWaitTime\": {\r\n\t\t\t((JTextField) c).setOpaque(true);\r\n\t\t\tc.setBackground(new Color(140, 200, 255));\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.PLAIN, 8));\r\n\t\t\ttxfsWaitTime[i1] = (JTextField) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"pgbVolume\": {\r\n\t\t\t((JProgressBar) c).setMinimum(0);\r\n\t\t\t((JProgressBar) c).setMaximum(MAXVOLUMEDISPENSER);\r\n\t\t\t((JProgressBar) c).setValue((int) MAXVOLUMEDISPENSER / 2);\r\n\t\t\tc.setForeground(new Color(140, 200, 255));\r\n\t\t\tc.setBackground(new Color(80, 80, 80));\r\n\t\t\t((JProgressBar) c).setBorderPainted(false);\r\n\t\t\tpgbsVolume[i1] = (JProgressBar) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"btnPause\": {\r\n\t\t\tc.setBackground(new Color(90, 210, 165));\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.PLAIN, 8));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageBoard\": {\r\n\t\t\tlblsAbout[0] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageAuthor\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[1] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageSizeOfCups\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[2] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImageNumberOfCoffeeDispensers\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[3] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblImagePause\": {\r\n\t\t\tc.setVisible(false);\r\n\t\t\tlblsAbout[4] = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcase \"lblPauseInfo\": {\r\n\t\t\tc.setForeground(Color.gray);\r\n\t\t\tc.setFont(new Font(c.getFont().getName(), Font.BOLD, 36));\r\n\t\t\t((JLabel) c).setText(\"\");\r\n\t\t\tlblPauseInfo = (JLabel) c;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tdefault: {\r\n\t\t\tSystem.out.println(\"unexpected event in customizeComponents\" + c.getName());\r\n\t\t}\r\n\t\t}\r\n\t}",
"public List<SelectItem> getInputTypeValues() {\n List<SelectItem> IOvalues = new ArrayList<>();\n for (IOtypes.IOtypesEnum IOtype : IOtypes.IOtypesEnum.values()) {\n IOvalues.add(new SelectItem(IOtype.toString(), IOtype.getMessage()));\n }\n return IOvalues;\n }",
"public void createContents(){\n\t\t// Creates control for ScrolledCompositeController controlItemSCSCLC\n\t\tcontrolItemSCSCLC = new ScrolledCompositeController(\"controlItemSC\", coreController, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tsetDirtyManagement(false);\n\t\t\t\t\tgetComposite().setLayout(new MigLayout(\"wrap 2\",\"[align right]10[fill,grow]\",\"[]\"));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t// Creates control for LabelController background$1LBL\n\t\tbackground$1LBL = new LabelController(\"background$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"background\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateBackground(this);\n\t\t// Creates control for LabelController backgroundImage$1LBL\n\t\tbackgroundImage$1LBL = new LabelController(\"backgroundImage$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"backgroundImage\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateBackgroundImage(this);\n\t\t// Creates control for LabelController bounds$1LBL\n\t\tbounds$1LBL = new LabelController(\"bounds$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"bounds\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateBounds(this);\n\t\t// Creates control for LabelController capture$1LBL\n\t\tcapture$1LBL = new LabelController(\"capture$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"capture\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateCapture(this);\n\t\t// Creates control for LabelController containerBackground$1LBL\n\t\tcontainerBackground$1LBL = new LabelController(\"containerBackground$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerBackground\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerBackground(this);\n\t\t// Creates control for LabelController containerBackgroundImage$1LBL\n\t\tcontainerBackgroundImage$1LBL = new LabelController(\"containerBackgroundImage$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerBackgroundImage\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerBackgroundImage(this);\n\t\t// Creates control for LabelController containerBounds$1LBL\n\t\tcontainerBounds$1LBL = new LabelController(\"containerBounds$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerBounds\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerBounds(this);\n\t\t// Creates control for LabelController containerCapture$1LBL\n\t\tcontainerCapture$1LBL = new LabelController(\"containerCapture$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerCapture\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerCapture(this);\n\t\t// Creates control for LabelController containerFocus$1LBL\n\t\tcontainerFocus$1LBL = new LabelController(\"containerFocus$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerFocus\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerFocus(this);\n\t\t// Creates control for LabelController containerFont$1LBL\n\t\tcontainerFont$1LBL = new LabelController(\"containerFont$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerFont\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerFont(this);\n\t\t// Creates control for LabelController containerForeground$1LBL\n\t\tcontainerForeground$1LBL = new LabelController(\"containerForeground$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerForeground\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerForeground(this);\n\t\t// Creates control for LabelController containerLayoutData$1LBL\n\t\tcontainerLayoutData$1LBL = new LabelController(\"containerLayoutData$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerLayoutData\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerLayoutData(this);\n\t\t// Creates control for LabelController containerLocation$1LBL\n\t\tcontainerLocation$1LBL = new LabelController(\"containerLocation$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerLocation\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerLocation(this);\n\t\t// Creates control for LabelController containerMenu$1LBL\n\t\tcontainerMenu$1LBL = new LabelController(\"containerMenu$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerMenu\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerMenu(this);\n\t\t// Creates control for LabelController containerRedraw$1LBL\n\t\tcontainerRedraw$1LBL = new LabelController(\"containerRedraw$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerRedraw\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerRedraw(this);\n\t\t// Creates control for LabelController containerSize$1LBL\n\t\tcontainerSize$1LBL = new LabelController(\"containerSize$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerSize\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerSize(this);\n\t\t// Creates control for LabelController containerStyle$1LBL\n\t\tcontainerStyle$1LBL = new LabelController(\"containerStyle$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"containerStyle\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateContainerStyle(this);\n\t\t// Creates control for LabelController editable$1LBL\n\t\teditable$1LBL = new LabelController(\"editable$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"editable\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateEditable(this);\n\t\t// Creates control for LabelController enabled$1LBL\n\t\tenabled$1LBL = new LabelController(\"enabled$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"widget\", \"enabled\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateEnabled(this);\n\t\t// Creates control for LabelController focus$1LBL\n\t\tfocus$1LBL = new LabelController(\"focus$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"focus\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateFocus(this);\n\t\t// Creates control for LabelController font$1LBL\n\t\tfont$1LBL = new LabelController(\"font$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"font\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateFont(this);\n\t\t// Creates control for LabelController foreground$1LBL\n\t\tforeground$1LBL = new LabelController(\"foreground$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"foreground\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateForeground(this);\n\t\t// Creates control for LabelController layoutData$1LBL\n\t\tlayoutData$1LBL = new LabelController(\"layoutData$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"layoutData\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateLayoutData(this);\n\t\t// Creates control for LabelController location$1LBL\n\t\tlocation$1LBL = new LabelController(\"location$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"location\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateLocation(this);\n\t\t// Creates control for LabelController menu$1LBL\n\t\tmenu$1LBL = new LabelController(\"menu$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"menu\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateMenu(this);\n\t\t// Creates control for LabelController orientation$1LBL\n\t\torientation$1LBL = new LabelController(\"orientation$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"orientation\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateOrientation(this);\n\t\t// Creates control for LabelController redraw$1LBL\n\t\tredraw$1LBL = new LabelController(\"redraw$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"redraw\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateRedraw(this);\n\t\t// Creates control for LabelController size$1LBL\n\t\tsize$1LBL = new LabelController(\"size$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"size\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateSize(this);\n\t\t// Creates control for LabelController style$1LBL\n\t\tstyle$1LBL = new LabelController(\"style$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"widget\", \"style\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateStyle(this);\n\t\t// Creates control for LabelController tabs$1LBL\n\t\ttabs$1LBL = new LabelController(\"tabs$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"tabs\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateTabs(this);\n\t\t// Creates control for LabelController text$1LBL\n\t\ttext$1LBL = new LabelController(\"text$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"text\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateText(this);\n\t\t// Creates control for LabelController textLimit$1LBL\n\t\ttextLimit$1LBL = new LabelController(\"textLimit$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"richText\", \"textLimit\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateTextLimit(this);\n\t\t// Creates control for LabelController toolTipText$1LBL\n\t\ttoolTipText$1LBL = new LabelController(\"toolTipText$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"widget\", \"toolTipText\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateToolTipText(this);\n\t\t// Creates control for LabelController visible$1LBL\n\t\tvisible$1LBL = new LabelController(\"visible$1\", controlItemSCSCLC, this) {\n\t\t\t@Override\n\t\t\tpublic void createControl() {\n\t\t\t\tsuper.createControl();\n\t\t\t\tif (isValid()) {\n\t\t\t\t\tgetControl().setText(AdichatzApplication.getInstance().getMessage(\"org.adichatz.studio\", \"control\", \"visible\").concat(\":\"));\n\t\t\t\t\tsetForeground(AdichatzApplication.getInstance().getFormToolkit().getColors().getColor(IFormColors.TITLE));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tcreateVisible(this);\n\t}",
"public float[] controls_GET()\n {return controls_GET(new float[8], 0);}",
"public float[] controls_GET()\n {return controls_GET(new float[8], 0);}",
"@Override\n\tprotected void customizeRegistration(Dynamic registration) {\n\tsuper.customizeRegistration(registration);\n\t}",
"public Enumeration getControlHandlerNames()\r\n {\r\n return m_loopVectors.keys();\r\n }",
"ch.crif_online.www.webservices.crifsoapservice.v1_00.ControlPerson[] getControlPersonsExtArray();",
"@Override\n protected void addControls() {\n super.addControls(); //Adds parent controls\n //adds the button for our 2016 filter (VisionFilter2016.java)\n addImageProcessingButton(\"No Filter\", new TargetFilter(0)); \n addImageProcessingButton(\"Color Filter\", new TargetFilter(1));\n addImageProcessingButton(\"Classic Filter\", new TargetFilter(3));\n addImageProcessingButton(\"Bounding Filter\", new TargetFilter(4));\n addImageProcessingButton(\"Cube Filter\", new TargetFilter(5));\n \n JButton button = new JButton(createSaveConfig());\n\t\taddControl(button);\n }",
"public void addCustExt() {\n String toAdd = customExt.getText();\n String[] extensions = toAdd.split(\",\");\n ExtensionsAdder.addExtensions(extensions);\n }",
"public Control[] getMemberControls() {\n/* 78 */ Control[] arrayOfControl = new Control[this.controls.length];\n/* */ \n/* 80 */ for (byte b = 0; b < this.controls.length; b++) {\n/* 81 */ arrayOfControl[b] = this.controls[b];\n/* */ }\n/* */ \n/* 84 */ return arrayOfControl;\n/* */ }",
"private void fetchControlInput(PlayerConfig pc, Callback callback) {\n\t\tnew ControlInput(Screen.getCenterX(), Screen.getCenterY(), pc, callback);\n\t\tWorld.add(new TextStatic(footerText, Screen.getCenterX()\n\t\t\t\t- footerText.length() * Sprite.CHAR_WIDTH / 2,\n\t\t\t\tSprite.CHAR_HEIGHT, Color.yellow));\n\t}",
"void getSettings(ControlsSettings settings);",
"public abstract String getTemplCd();",
"x0401.oecdStandardAuditFileTaxPT1.CustomsDetails getCustomsDetails();",
"private final native MVCArray<Element> getControls(int controlPosition) /*-{\n return this.controls[controlPosition];\n }-*/;",
"public Control[] getControls() {\n\t\treturn null;\r\n\t}",
"public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {\n\n return this.getWrappedControl().getControlCssMetaData();\n }",
"@Override\n protected void registerVisuals() {\n super.registerVisuals();\n Map visualPartMap = this.getViewer().getVisualPartMap();\n visualPartMap.put(getFigure().getCheckBox(), this);\n visualPartMap.put(getFigure().getLabel(), this);\n }",
"private void applyCustomizations(Object control,IPropertyMetadata metadata){\n\t\tif(metadata.getUiCustomizations() != null){\n\t\t\tISpelService spelService = ServiceLocator.locateCurrent(ISpelService.class);\n\t\t\tMap<String,Object> vars = new HashMap<String, Object>();\n\t\t\tvars.put(\"ui\", control);\n\t\t\tfor(String expression : metadata.getUiCustomizations()){\n\t\t\t\tspelService.getValue(expression, vars);\n\t\t\t}\n\t\t}\n\t}",
"public Registracija() {\n servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();\n konf = (Konfiguracija) servletContext.getAttribute(\"Konfig\");\n bpkonf = (BP_Konfiguracija) servletContext.getAttribute(\"BP_Konfig\");\n }",
"private void updateValue() {\n int type = -1;\n String name = null;\n Icon icon = null;\n if (rbProjectImages.isSelected()) {\n if (selectedFile != null) {\n name = FileUtil.getRelativePath(rootFolder, selectedFile);\n try {\n try {\n Image image = ImageIO.read(new File(selectedFile.getPath()));\n if (image != null) {\n icon = new ImageIcon(image);\n type = IconEditor.TYPE_FILE;\n } // no NbImageIcon will be created for invalid file\n } catch (IllegalArgumentException iaex) { // Issue 178906\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.INFO, null, iaex);\n icon = new ImageIcon(name);\n type = IconEditor.TYPE_FILE;\n }\n } catch (IOException ex) {\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.WARNING, null, ex);\n }\n }\n } else if (rbExternalImages.isSelected()) {\n if (selectedURL != null && !\"\".equals(selectedURL)) { // NOI18N\n type = IconEditor.TYPE_URL;\n name = selectedURL;\n try {\n try {\n Image image = ImageIO.read(new URL(selectedURL));\n if (image != null) {\n icon = new ImageIcon(image);\n type = IconEditor.TYPE_URL;\n }\n } catch (IllegalArgumentException iaex) { // Issue 178906\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.INFO, null, iaex);\n icon = new ImageIcon(new URL(selectedURL));\n }\n // for URL-based icon create NbImageIcon even if no icon can be loaded from the URL\n } catch (IOException ex) {\n Logger.getLogger(CustomIconEditor.class.getName()).log(Level.WARNING, null, ex);\n }\n }\n }\n\n ignoreSetValue = true;\n try {\n propertyEditor.setAsText(name);\n } finally {\n ignoreSetValue = false;\n }\n\n previewLabel.setIcon(icon);\n\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n jButton2 = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n audioCB = new javax.swing.JCheckBox();\n picturesCB = new javax.swing.JCheckBox();\n videoCB = new javax.swing.JCheckBox();\n documentsCB = new javax.swing.JCheckBox();\n GenListButton = new javax.swing.JButton();\n customExt = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n GenListAll = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n chooser = new javax.swing.JFileChooser();\n jScrollPane1 = new javax.swing.JScrollPane();\n loggerTextarea = new javax.swing.JTextArea();\n\n jButton2.setText(\"jButton2\");\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Pick file types\");\n setResizable(false);\n\n jLabel1.setText(\"Select the type of files you want to list\");\n\n audioCB.setText(\"Audio\");\n audioCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n audioCBActionPerformed(evt);\n }\n });\n\n picturesCB.setText(\"Pictures\");\n picturesCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n picturesCBActionPerformed(evt);\n }\n });\n\n videoCB.setText(\"Video\");\n videoCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n videoCBActionPerformed(evt);\n }\n });\n\n documentsCB.setText(\"Documents\");\n documentsCB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n documentsCBActionPerformed(evt);\n }\n });\n\n GenListButton.setText(\"List Selected Types\");\n GenListButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GenListButtonActionPerformed(evt);\n }\n });\n\n customExt.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n customExtActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Add further custom extensions, separated by commas (es: zip, exe)\");\n\n GenListAll.setText(\"List All Files\");\n GenListAll.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n GenListAllActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(customExt, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(audioCB)\n .addGap(80, 80, 80)\n .addComponent(videoCB)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)\n .addComponent(picturesCB)\n .addGap(80, 80, 80)\n .addComponent(documentsCB)\n .addGap(30, 30, 30))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel3)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(GenListButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(GenListAll))))\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {audioCB, documentsCB, picturesCB, videoCB});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(20, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)\n .addComponent(audioCB)\n .addComponent(videoCB)\n .addComponent(documentsCB)\n .addComponent(picturesCB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jLabel3)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(customExt, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(GenListButton, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(GenListAll, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n jLabel2.setText(\"No selection lists all files\");\n\n chooser.setApproveButtonText(\"\");\n chooser.setApproveButtonToolTipText(\"\");\n chooser.setDialogTitle(\"Choose Source Folder\");\n chooser.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);\n chooser.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooserActionPerformed(evt);\n }\n });\n\n loggerTextarea.setEditable(false);\n loggerTextarea.setBackground(new java.awt.Color(0, 0, 0));\n loggerTextarea.setColumns(20);\n loggerTextarea.setForeground(new java.awt.Color(0, 255, 51));\n loggerTextarea.setRows(5);\n loggerTextarea.setDragEnabled(false);\n jScrollPane1.setViewportView(loggerTextarea);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .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.LEADING)\n .addComponent(jLabel1)\n .addGroup(layout.createSequentialGroup()\n .addGap(38, 38, 38)\n .addComponent(jLabel2)))\n .addGap(257, 257, 257))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(chooser, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)))\n .addGap(19, 19, 19))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addGap(18, 18, 18)\n .addComponent(chooser, javax.swing.GroupLayout.PREFERRED_SIZE, 325, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(8, Short.MAX_VALUE))\n );\n\n pack();\n }",
"protected abstract Simulate collectControlData ();",
"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}",
"@Override\n\tpublic void initializeControls() {\n\t\t\n\t}",
"public void registerUI(ColorPickerUI ui){\n cpUI = ui;\n }",
"public Long getInfile_()\n{\nreturn getInputDataItemId(\"infile_\");\n}",
"public abstract Object getCustomData();",
"public java.util.List<io.envoyproxy.envoy.type.tracing.v3.CustomTag.Builder> \n getCustomTagsBuilderList() {\n return getCustomTagsFieldBuilder().getBuilderList();\n }",
"public Controls()\n {\n string = \"Controls\";\n getButtonImage();\n }",
"public FileControl( String fileName ) {\n this.fileName = fileName;\n }",
"List<ITypeDescriptor> getSubTypes(String type) throws StoreException;",
"public ArrayList<Control> getControls() {\n\t\treturn controls;\n\t}",
"private void getBaseImageDockerfiles(){\n ArrayList<String> baseList = new ArrayList<String>();\n InputStream inputStream = brokenJavaNaming(\"base.list\");\n if(inputStream == null){\n System.out.println(\"No base.list file found.\");\n }else{\n InputStreamReader streamReader = new InputStreamReader(inputStream, StandardCharsets.UTF_8);\n BufferedReader reader = new BufferedReader(streamReader);\n try{\n for (String line; (line = reader.readLine()) != null;) {\n baseList.add(line);\n } \n }catch(IOException ex){\n System.out.println(ex);\n }\n }\n\n // Get list of valid base dockerfiles\n File dockerfileBasesPath = new File(labtainerPath + File.separator +\"scripts\"+ File.separator+\"designer\"+File.separator+\"base_dockerfiles\");\n File[] baseFiles = dockerfileBasesPath.listFiles(new FilenameFilter(){\n public boolean accept(File dockerfileBasesPath, String filename)\n {return filename.startsWith(\"Dockerfile.labtainer.\"); }\n } );\n \n for(int i = 0;i<baseFiles.length;i++){\n String base = baseFiles[i].getName().split(\"Dockerfile.labtainer.\")[1];\n if(!baseList.contains(base)){\n baseList.add(base);\n }\n }\n \n //Set the base image combobox options for making new labs and adding containers\n for(String baseImage : baseList){\n NewLabBaseImageComboBox.addItem(baseImage);\n ContainerAddDialogBaseImageCombobox.addItem(baseImage);\n }\n }",
"private void initComboBox() {\n\t\tsynchronized (realTimeComboModel.files) {\n\t\t\trealTimeComboModel.files.clear();\n\t\t\t\n\t\t\tSet<TopComponent> comps = TopComponent.getRegistry().getOpened();\n\t\t\tfor (TopComponent tc : comps) {\n\t\t\t\tNode[] arr = tc.getActivatedNodes();\n\t\t\t\tif (arr != null) {\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\n\t\t\t\t\t\tDataObject dataObject = (DataObject) arr[j].getCookie(DataObject.class);\n\t\t\t\t\t\tFile file = new File(dataObject.getPrimaryFile().getPath());\n\t\t\t\t\t\tif (file.exists() && file.isFile()/* && !temp.contains(file.getName())*/) {\n\t\t\t\t\t\t\trealTimeComboModel.files.add(file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomboBox.setRenderer(new RealTimeComboRenderer()); // if no this line, combobox will show nothing after refeshing with few files\n\t}",
"void addSampledControls() { \r\n try { \r\n FloatControl gainControl = (FloatControl) clip \r\n .getControl(FloatControl.Type.MASTER_GAIN); \r\n if (gainControl != null) \r\n this.add(createSlider(gainControl)); \r\n } catch (IllegalArgumentException e) { \r\n // If MASTER_GAIN volume control is unsupported, just skip it \r\n } \r\n \r\n try { \r\n // FloatControl.Type.BALANCE is probably the correct control to \r\n // use here, but it doesn't work for me, so I use PAN instead. \r\n FloatControl panControl = (FloatControl) clip \r\n .getControl(FloatControl.Type.PAN); \r\n if (panControl != null) \r\n this.add(createSlider(panControl)); \r\n } catch (IllegalArgumentException e) { \r\n } \r\n }",
"public static native int getCustomSettings(byte[] info);",
"@Override\n public abstract String getComponentType();",
"private void saveData(com.sun.star.awt.XWindow aWindow)\n throws com.sun.star.lang.IllegalArgumentException, com.sun.star.uno.Exception\n {\n // Determine the name of the options page. This serves two purposes. First, if this\n // options page is supported by this handler and second we use the name two locate\n // the corresponding data in the registry.\n String sWindowName = getWindowName(aWindow);\n if (sWindowName == null)\n throw new com.sun.star.lang.IllegalArgumentException(\n \"This window is not supported by this handler\", this, (short) -1);\n\n // To access the separate controls of the window we need to obtain the\n // XControlContainer from the window implementation\n XControlContainer xContainer = (XControlContainer) UnoRuntime.queryInterface(\n XControlContainer.class, aWindow);\n if (xContainer == null)\n throw new com.sun.star.uno.Exception(\n \"Could not get XControlContainer from window.\", this);\n\n // This is an implementation which will be used for several options pages\n // which all have the same controls. m_arStringControls is an array which\n // contains the names.\n for (int i = 0; i < ControlNames.length; i++)\n {\n // To obtain the data from the controls we need to get their model.\n // First get the respective control from the XControlContainer.\n XControl xControl = xContainer.getControl(ControlNames[i]);\n\n // This generic handler and the corresponding registry schema support\n // up to five text controls. However, if a options page does not use all\n // five controls then we will not complain here.\n if (xControl == null)\n continue;\n\n // From the control we get the model, which in turn supports the\n // XPropertySet interface, which we finally use to get the data from\n // the control.\n XPropertySet xProp = (XPropertySet) UnoRuntime.queryInterface(\n XPropertySet.class, xControl.getModel());\n\n if (xProp == null)\n throw new com.sun.star.uno.Exception(\n \"Could not get XPropertySet from control.\", this);\n\n // Retrieve the data we want to store from the components.\n // We do not know which property contains data we want, so\n // we decide through the components name. This only works if all\n // components have been named properly:\n // Text fields start with \"txt\",\n // Check boxes with \"chk\",\n // List boxes with \"lst\"\n // You should adapt this behavior to your needs.\n Object aObj = null;\n Object[] value = new Object[1];\n String[] keys = new String[] {ControlNames[i]};\n try\n {\n if(ControlNames[i].startsWith(\"txt\"))\n {\n aObj = xProp.getPropertyValue(\"Text\");\n value[0] = AnyConverter.toString(aObj);\n }\n else if(ControlNames[i].startsWith(\"lst\"))\n {\n keys = new String[]{ControlNames[i] + \"Selected\", ControlNames[i]};\n value = new Object[2];\n\n // Read out indices of selected items\n aObj = xProp.getPropertyValue(\"SelectedItems\");\n value[0] = AnyConverter.toArray(aObj);\n\n // Read out items (they are read-only though, but perhaps someone wants to change this)\n aObj = xProp.getPropertyValue(\"StringItemList\");\n value[1] = AnyConverter.toArray(aObj);\n }\n else if(ControlNames[i].startsWith(\"chk\"))\n {\n aObj = xProp.getPropertyValue(\"State\");\n value[0] = new Short(AnyConverter.toShort(aObj)).toString();\n }\n }\n catch (com.sun.star.lang.IllegalArgumentException ex)\n {\n ex.printStackTrace();\n throw new com.sun.star.lang.IllegalArgumentException(\n \"Wrong property type.\", this, (short) -1);\n }\n\n // Now we have the actual string value of the control. What we need now is\n // the XPropertySet of the respective property in the registry, so that we\n // can store the value.\n // To access the registry we have previously created a service instance\n // of com.sun.star.configuration.ConfigurationUpdateAccess which supports\n // com.sun.star.container.XNameAccess. The XNameAccess is used to get the\n // particular registry node which represents this options page.\n // Fortunately the name of the window is the same as the registry node.\n XPropertySet xLeaf = (XPropertySet) UnoRuntime.queryInterface(\n XPropertySet.class, accessLeaves.getByName(sWindowName));\n if (xLeaf == null)\n throw new com.sun.star.uno.Exception(\"XPropertySet not supported.\", this);\n\n // Finally we can set the values\n for(int n = 0; n < keys.length; n++)\n xLeaf.setPropertyValue(keys[n], value[n]);\n }\n\n // Committing the changes will cause or changes to be written to the registry.\n XChangesBatch xUpdateCommit =\n (XChangesBatch) UnoRuntime.queryInterface(XChangesBatch.class, accessLeaves);\n xUpdateCommit.commitChanges();\n }",
"private void register(String[] fieldValues) {\n\t}",
"public void addComponents(){\n add(spelerIDLabel);\n add(typeLabel);\n add(codeLabel);\n add(heeftBetaaldLabel);\n\n add(spelerIDField);\n add(typeField);\n add(codeField);\n add(heeftBetaaldField);\n\n add(klaarButton);\n add(terugButton);\n\n }",
"public String getCustomFileName()\r\n {\r\n return customFileName;\r\n }",
"public IPath[] getAdditionalResources();",
"public void registerComponents() {\r\n awardAddDocumentForm = new AwardAddDocumentForm();\r\n ScreenFocusTraversalPolicy focusTraversalPolicy ;\r\n java.awt.Component components[] = {awardAddDocumentForm.cmbDocumentType,\r\n awardAddDocumentForm.txtDescription,\r\n awardAddDocumentForm.btnUpload,\r\n awardAddDocumentForm.btnOk,\r\n awardAddDocumentForm.btnCancel,\r\n awardAddDocumentForm.btnView};\r\n focusTraversalPolicy = new ScreenFocusTraversalPolicy(components);\r\n awardAddDocumentForm.setFocusTraversalPolicy(focusTraversalPolicy);\r\n awardAddDocumentForm.setFocusCycleRoot(true);\r\n awardAddDocumentForm.btnUpload.addActionListener(this);\r\n awardAddDocumentForm.btnCancel.addActionListener(this);\r\n awardAddDocumentForm.btnOk.addActionListener(this);\r\n awardAddDocumentForm.btnView.addActionListener(this);\r\n awardAddDocumentForm.cmbDocumentType.addActionListener(this);\r\n awardAddDocumentForm.txtDescription.setDocument(new LimitedPlainDocument(200));\r\n setEnableComponents();\r\n }",
"private ControlloFile() {\n\t}",
"@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\t\n\t\tbtnNewButton = new Button(container, 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\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(286, 513, 75, 30);\n\t\tbtnNewButton.setText(\"\\u9996\\u9875\");\n\t\t\n\t\tbutton = new Button(container, SWT.NONE);\n\t\tbutton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage--;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton.setText(\"\\u4E0A\\u4E00\\u9875\");\n\t\tbutton.setBounds(367, 513, 75, 30);\n\t\t\n\t\tbutton_1 = new Button(container, SWT.NONE);\n\t\tbutton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage = page.getPageCount();\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_1.setText(\"\\u5C3E\\u9875\");\n\t\tbutton_1.setBounds(652, 513, 75, 30);\n\t\t\n\t\tbutton_2 = new Button(container, SWT.NONE);\n\t\tbutton_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tcurrentPage++;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_2.setText(\"\\u4E0B\\u4E00\\u9875\");\n\t\tbutton_2.setBounds(571, 513, 75, 30);\n\t\t\n\t\ttext = new Text(container, SWT.BORDER);\n\t\ttext.setText(\"\"+currentPage);\n\t\ttext.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\ttext.setBounds(445, 515, 32, 26);\n\t\t\n\t\tLabel label = new Label(container, SWT.NONE);\n\t\tlabel.setText(\"/\");\n\t\tlabel.setBounds(483, 518, 6, 20);\n\t\t\n\t\tlabel_1 = new Label(container, SWT.NONE);\n\t\tlabel_1.setText(\"2\");\n\t\tlabel_1.setBounds(495, 518, 22, 20);\n\t\t\n\t\tButton button_3 = new Button(container, SWT.NONE);\n\t\tbutton_3.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tint want = Integer.parseInt(text.getText());\n\t\t\t\tif(want<1){\n\t\t\t\t\twant = 1;\n\t\t\t\t}else if(want>page.getCurrentPage()){\n\t\t\t\t\twant = page.getPageCount();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcurrentPage = want;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbutton_3.setText(\"->\");\n\t\tbutton_3.setBounds(527, 513, 32, 30);\n\t\t\n\t\ttext_1 = new Text(container, SWT.BORDER);\n\t\ttext_1.setBounds(286, 134, 73, 26);\n\t\t\n\t\tButton btnNewButton_1 = new Button(container, 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\tname = text_1.getText();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(367, 134, 55, 30);\n\t\tbtnNewButton_1.setText(\"\\u67E5\\u627E\");\n\t\t\n\t\ttabFolder = new TabFolder(container, SWT.NONE);\n\t\ttabFolder.setBounds(281, 184, 456, 323);\n\t\t\n\t\ttabItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem_2.setText(\"\\u672A\\u8BCA\\u65AD\");\n\t\t\n\t\ttable_2 = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable_2.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_2.getItem(table_2.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb.update(\"update register set state = 2 where name = '\"+register.getName()+\"'\");\n\t\t\t\tregister.setState(\"诊断中\");\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable_2.setLinesVisible(true);\n\t\ttable_2.setHeaderVisible(true);\n\t\ttabItem_2.setControl(table_2);\n\t\t\n\t\tTableColumn tableColumn_4 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_4.setWidth(100);\n\t\ttableColumn_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tableColumn_5 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_5.setWidth(115);\n\t\ttableColumn_5.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tableColumn_6 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_6.setWidth(118);\n\t\ttableColumn_6.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tTableColumn tableColumn_7 = new TableColumn(table_2, SWT.NONE);\n\t\ttableColumn_7.setWidth(108);\n\t\ttableColumn_7.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu_2 = new Menu(table_2);\n\t\ttable_2.setMenu(menu_2);\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_2.getItem(table_2.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t}\n\t\t});\n\t\tmenuItem_4.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table_2.getItem(table_2.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.NONE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tmenuItem_5.setText(\"\\u5220\\u9664\");\n\t\t\n\t\ttabItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem_1.setText(\"\\u8BCA\\u65AD\\u4E2D\");\n\t\t\n\t\ttable_1 = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_1.getItem(table_1.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdb.update(\"update register set state = 2 where name = '\"+register.getName()+\"'\");\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable_1.setLinesVisible(true);\n\t\ttable_1.setHeaderVisible(true);\n\t\ttabItem_1.setControl(table_1);\n\t\t\n\t\tTableColumn tableColumn = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn.setWidth(100);\n\t\ttableColumn.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tableColumn_1 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_1.setWidth(115);\n\t\ttableColumn_1.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tableColumn_2 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_2.setWidth(118);\n\t\ttableColumn_2.setText(\"\\u7C7B\\u578B\");\n\t\t\n\t\tTableColumn tableColumn_3 = new TableColumn(table_1, SWT.NONE);\n\t\ttableColumn_3.setWidth(108);\n\t\ttableColumn_3.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu_1 = new Menu(table_1);\n\t\ttable_1.setMenu(menu_1);\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.CLOSE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table_1.getItem(table_1.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\tmenuItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table_1.getItem(table_1.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.CLOSE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t}\n\t\t});\n\t\tmenuItem_3.setText(\"\\u5220\\u9664\");\n\t\t\n\t\ttabItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttabItem.setText(\"\\u5DF2\\u8BCA\\u65AD\");\n\t\t\n\t\ttable = new Table(tabFolder, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttabItem.setControl(table);\n\t\ttable.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table.getItem(table.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t\tcurrentPage = 1;\n\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t}\n\t\t});\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setLinesVisible(true);\n\t\t\n\t\tTableColumn tblclmnNewColumn = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn.setWidth(100);\n\t\ttblclmnNewColumn.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tTableColumn tblclmnNewColumn_1 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_1.setWidth(115);\n\t\ttblclmnNewColumn_1.setText(\"\\u7ECF\\u529E\\u4EBA\");\n\t\t\n\t\tTableColumn tblclmnNewColumn_2 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_2.setText(\"\\u7C7B\\u578B\");\n\t\ttblclmnNewColumn_2.setWidth(118);\n\t\t\n\t\tTableColumn tblclmnNewColumn_3 = new TableColumn(table, SWT.NONE);\n\t\ttblclmnNewColumn_3.setWidth(108);\n\t\ttblclmnNewColumn_3.setText(\"\\u4EF7\\u683C\");\n\t\t\n\t\tMenu menu = new Menu(table);\n\t\ttable.setMenu(menu);\n\t\t\n\t\tMenuItem menuItem = new MenuItem(menu, 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\tDetails detail = new Details(new Shell(), SWT.NONE);\n\t\t\t\tfor(HashMap<String, Object> map:page.getList()){\n\t\t\t\t\tif(map.get(\"name\").equals(table.getItem(table.getSelectionIndex()).getText(0))){\n\t\t\t\t\t\tregister = new Register();\n\t\t\t\t\t\tregister.setPatient_id(Integer.parseInt(map.get(\"patient_id\").toString()));\n\t\t\t\t\t\tregister.setName(map.get(\"name\").toString());\n\t\t\t\t\t\tregister.setDepartment(map.get(\"department_name\").toString());\n\t\t\t\t\t\tregister.setKinds(map.get(\"kinds_name\").toString());\n\t\t\t\t\t\tregister.setOperator(map.get(\"operator\").toString());\n\t\t\t\t\t\tregister.setTime(map.get(\"time\").toString());\n\t\t\t\t\t\tregister.setPrice(Double.parseDouble(map.get(\"price\").toString()));\n\t\t\t\t\t\tregister.setResult((map.get(\"result\").toString().equals(\"\") ? \"无\":map.get(\"result\").toString()));\n\t\t\t\t\t\tregister.setState(map.get(\"state_name\").toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdetail.setRegister(register);\n\t\t\t\tdetail.open();\n\t\t\t}\n\t\t});\n\t\tmenuItem.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.NONE);\n\t\tmenuItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tDbUtils db = new DbUtils();\n\t\t\t\tname = table.getItem(table.getSelectionIndex()).getText(0);\n\t\t\t\tWarning_1 warning = new Warning_1(new Shell(), SWT.NONE);\n\t\t\t\twarning.open();\n\t\t\t\tif(warning.isResult())\n\t\t\t\t\tif(db.update(\"delete from register where name = '\"+name+\"'\")!=0){\n\t\t\t\t\t\tOpenBox.Open(\"操作成功\");\n\t\t\t\t\t\tcurrentPage = 1;\n\t\t\t\t\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tOpenBox.Open(\"操作失败\");\n\t\t\t}\n\t\t});\n\t\tmenuItem_1.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tgetRegister(currentPage, name, tabFolder.getSelectionIndex());\n\n\t\tcreateActions();\n\t\tinitializeToolBar();\n\t\tinitializeMenu();\n\t}",
"public abstract String getPropertyFile();",
"public List getValues() {\n/* 103 */ List<ConfigurableEffect.Value> values = super.getValues();\n/* 104 */ values.add(EffectUtil.floatValue(\"Wavelength\", this.wavelength, 1.0F, 100.0F, \"This setting controls the wavelength of the outline. The smaller the value, the more segments will be used to draw the outline.\"));\n/* */ \n/* 106 */ values.add(EffectUtil.floatValue(\"Amplitude\", this.amplitude, 0.5F, 50.0F, \"This setting controls the amplitude of the outline. The bigger the value, the more the zigzags will vary.\"));\n/* */ \n/* 108 */ return values;\n/* */ }",
"public abstract String typeIcon();",
"public ImportReuters21578FilesParameterPanel() {\n \n super();\n \n }",
"public void createFieldEditors() {\t\t\n\t\t\n//\t\taddField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, \n//\t\t\t\tMessages.UMAPPreferencePage_1, getFieldEditorParent()));\n\t\tgroup = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n\t\tgroup.setText(Messages.UMAPPreferencesHeader);\n\t\tgroup.setLayout(new GridLayout());\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgd.horizontalSpan = 1;\n\t\tgroup.setLayoutData(gd);\t\t\n\t\t\n//\t\tgroup2 = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n//\t\tgroup2.setText(Messages.UmapStringButtonFieldEditor_0);\n//\t\tgd.horizontalSpan = 2;\n//\t\tgroup2.setLayoutData(gd);\n//\t\tgroup2.setLayout(new GridLayout());\n\t\t\n\t\t\n\t\tvalidation = new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN,\tMessages.UMAPPreferencePage_2, group);\n\t\taddField( validation );\n\n\t\tclassAbreviation = new StringFieldEditor(PreferenceConstants.P_CLASS_NAME, Messages.UMAPPreferencePage_3, group);\n\t\tclassAbreviation.setEmptyStringAllowed(false);\n\t\tclassAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\tintfAbreviation = new StringFieldEditor(PreferenceConstants.P_INTF_NAME, Messages.UMAPPreferencePage_4, group);\n\t\tintfAbreviation.setEmptyStringAllowed(false);\n\t\tintfAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\texcAbreviation = new StringFieldEditor(PreferenceConstants.P_EXCP_NAME, Messages.UMAPPreferencePage_5, group);\n\t\texcAbreviation.setEmptyStringAllowed(false);\n\t\texcAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\t\n//\t\tprojectAbbreviation = new StringFieldEditor(PreferenceConstants.P_PROJ_NAME, Messages.UMAPPreferencePage_6, group);\n//\t\tprojectAbbreviation.setEmptyStringAllowed(true);\n\n//\t\tStringFieldEditor name = new StringFieldEditor(PreferenceConstants.P_USER_NAME, Messages.UmapStringButtonFieldEditor_2, group2);\n//\t\t\n//\t\tStringFieldEditor pass = new StringFieldEditor(PreferenceConstants.P_PWD, Messages.UmapStringButtonFieldEditor_3, group2);\n\t\t\n//\t\tURIStringButtonFieldEditor button = new URIStringButtonFieldEditor(PreferenceConstants.P_URI, Messages.UmapStringButtonFieldEditor_1, group2);\n\t\t\n//\t\taddField(name);\n//\t\taddField(pass);\n//\t\taddField(button);\n\t\t\n\t\taddField( classAbreviation );\n\t\taddField( intfAbreviation );\n\t\taddField( excAbreviation );\n//\t\taddField( projectAbbreviation );\t\t\n\t}",
"AdditionalValuesType getAdditionalValues();",
"public java.lang.String getCustom() {\r\n return custom;\r\n }",
"@Override\r\n public String getCustomContentType() {\r\n return DirectUtils.getFileMIMEType(new File(this.imagePath));\r\n }",
"public void loadValues() {\n color.setText(bluej.getExtensionPropertyString(PROFILE_LABEL, \"\"));\r\n }",
"private static List<CustomFieldValue> getCustomFieldsValuesFromDemoLoc() throws MambuApiException {\n\n\t\treturn DemoUtil.getDemoLineOfCredit(DemoUtil.demoLineOfCreditId).getCustomFieldValues();\n\t}",
"public interface OutputControl extends Control {\n\n /**\n * Keys of value used for the http request\n */\n\n String KEY_STATE = \"state\";\n String KEY_FREQUENCE = \"frequency\";\n String KEY_DUTY_CYCLE = \"duty_cycle\";\n String KEY_SIGNAL_TYPE = \"signal_type\";\n String KEY_PWM_OUTPUT_TYP = \"pwm_output_type\";\n\n\n /**\n * direction of the Pin; Output\n */\n Direction direction = Direction.OUT;\n\n /**\n * return the name of the control\n * @return name of control\n */\n String getName();\n\n\n ContentValues getRequestParams();\n\n /**\n * Define the action to execute when View change its state.\n * The Event type depent of the type of control and should be implemented by the class\n * Its Stricty recomended to call it in all Constructors.\n */\n // TODO [L] try to wrap this in a parent class BaseSwitchControl\n public void setChangeListener();\n\n}",
"@Override\n public JLabel[] GetDataContainers() {\n JLabel[] res = new JLabel[3];\n res[0] = jLabel1;\n res[1] = jLabel2;\n res[2] = jLabel3;\n return res;\n }",
"public SampleComponentProperties() {\n // Initialize the GUI\n initComponents();\n \n // Listen for changes to the info text field\n infoTextField.getDocument().addDocumentListener(new InfoTextFieldListener());\n \n }",
"private List<PropertyDescriptor> getProperties(Control control) {\n \t\tfinal Class<? extends Control> controlClass = control.getClass();\n \t\tList<PropertyDescriptor> propertyDescriptors = CONTROL_PROPERTIES.get(controlClass);\n \t\tif (propertyDescriptors == null) {\n \t\t\tpropertyDescriptors = new ArrayList<PropertyDescriptor>();\n \t\t\ttry {\n \t\t\t\tPropertyDescriptor[] descriptors = Introspector.getBeanInfo(controlClass).getPropertyDescriptors();\n \t\t\t\tfor (PropertyDescriptor pd : descriptors) {\n \t\t\t\t\tpropertyDescriptors.add(pd);\n \t\t\t\t}\n \t\t\t} catch (IntrospectionException e) {\n \t\t\t\tNop.reason(\"ignore\"); //$NON-NLS-1$\n \t\t\t}\n \t\t\tCONTROL_PROPERTIES.put(controlClass, propertyDescriptors);\n \t\t}\n \n \t\treturn propertyDescriptors;\n \t}",
"public String getControlLocator() {\n\t\treturn ControlLocator;\n }",
"public final native MVCArray<Element> getControls() /*-{\n return this.controls;\n }-*/;",
"private void setComponentTexts(){\n\t\tsetTitle(translations.getRegexFileChanger());\n\t\tbuttonCopyToClipboard.setText(translations.getCopyToClipboard());\n\t\tregexTo.setToolTipText(wrapHTML(translations.getRegexToInfo()));\n\t\tregexFrom.setToolTipText(wrapHTML(translations.getRegexFromInfo()));\n\t\tregexFromLabel.setText(translations.getGiveRegexFrom());\n\t\tregexToLabel.setText(translations.getGiveRegexTo());\n\t\tgiveRegexLabel.setText(translations.getBelowGiveRegexRules());\n\t\tbuttonChooseDestinationDirectory.setText(translations.getChooseDestinationDirectory());\n\t\tbuttonSimulateChangeFileNames.setToolTipText(wrapHTML(translations.getSimulateFileChangesInfo()));\n\t\tbuttonSimulateChangeFileNames.setText(translations.getSimulateChangeNames());\n\t\tbuttonChangeFileNames.setToolTipText(wrapHTML(translations.getChangeFileNamesInfo()));\n\t\tbuttonChangeFileNames.setText(translations.getChangeNames());\n\t\tbuttonCopyToClipboard.setToolTipText(wrapHTML(translations.getCopyToClipBoardInfo()));\n\t\tbuttonCopyToClipboard.setText(translations.getCopyToClipboard());\n\t\tbuttonResetToDefaults.setToolTipText(wrapHTML(translations.getResetToDefaultsInfo()));\n\t\tbuttonResetToDefaults.setText(translations.getDeleteSettings());\n\t\tbuttonExample.setText(translations.getShowExample());\n\t\tbuttonExample.setToolTipText(translations.getButtonShowExSettings());\n\t\tcheckboxSaveStateOn.setToolTipText(wrapHTML(translations.getSaveStateCheckBoxInfo()));\n\t\tcheckboxSaveStateOn.setText(translations.getSaveStateOnExit());\n\t\tchooseLanguageLabel.setText(translations.getChooseLanguage());\n\t\tsetDirectoryInfoLabel(translations.getSeeChoosedDirPath());\n\t\tcheckboxRecursiveSearch.setText(translations.getRecursiveSearch());\n\t\tcheckboxRecursiveSearch.setToolTipText(translations.getRecursiveSearchToolTip());\n\t\tcheckboxShowFullPath.setToolTipText(translations.getShowFullPathCheckboxTooltip());\n\t\tcheckboxShowFullPath.setText(translations.getShowFullPathCheckbox());\n\t\tbuttonClear.setText(translations.getButtonClear());\n\t\tbuttonClear.setToolTipText(translations.getButtonClearTooltip());\n\t}",
"public void getData(AccessInputMeta in)\n\t{\n\t\tif (in.getFileName() !=null) \n\t\t{\n\t\t\twFilenameList.removeAll();\n\n\t\t\tfor (int i=0;i<in.getFileName().length;i++) \n\t\t\t{\n\t\t\t\twFilenameList.add(new String[] { in.getFileName()[i], in.getFileMask()[i] , in.getExludeFileMask()[i],in.getRequiredFilesDesc(in.getFileRequired()[i]), in.getRequiredFilesDesc(in.getIncludeSubFolders()[i])} );\n\t\t\t}\t\n\t\t\twFilenameList.removeEmptyRows();\n\t\t\twFilenameList.setRowNums();\n\t\t\twFilenameList.optWidth(true);\n\t\t}\n\t\twInclFilename.setSelection(in.includeFilename());\n\t\twInclTablename.setSelection(in.includeTablename());\n\t\twInclRownum.setSelection(in.includeRowNumber());\n\t\twAddResult.setSelection(in.isAddResultFile());\n\t\t\n\t\twFileField.setSelection(in.isFileField());\n\t\t\n\t\tif (in.getTableName()!=null) wTable.setText(in.getTableName());\n\t\tif (in.getFilenameField()!=null) wInclFilenameField.setText(in.getFilenameField());\n\t\tif (in.getDynamicFilenameField()!=null) wFilenameField.setText(in.getDynamicFilenameField());\n\t\t\n\t\t\n\t\tif (in.gettablenameField()!=null) wInclTablenameField.setText(in.gettablenameField());\n\t\tif (in.getRowNumberField()!=null) wInclRownumField.setText(in.getRowNumberField());\n\t\twResetRownum.setSelection(in.resetRowNumber());\n\t\twLimit.setText(\"\"+in.getRowLimit());\n\n\t\tlogDebug(BaseMessages.getString(PKG, \"AccessInputDialog.Log.GettingFieldsInfo\"));\n\t\tfor (int i=0;i<in.getInputFields().length;i++)\n\t\t{\n\t\t AccessInputField field = in.getInputFields()[i];\n\t\t \n if (field!=null)\n {\n \t\t\tTableItem item = wFields.table.getItem(i);\n \t\t\tString name = field.getName();\n \t\t\tString xpath\t= field.getColumn();\n \t\t\tString type = field.getTypeDesc();\n \t\t\tString format = field.getFormat();\n \t\t\tString length = \"\"+field.getLength();\n \t\t\tString prec = \"\"+field.getPrecision();\n \t\t\tString curr = field.getCurrencySymbol();\n \t\t\tString group = field.getGroupSymbol();\n \t\t\tString decim = field.getDecimalSymbol();\n \t\t\tString trim = field.getTrimTypeDesc();\n \t\t\tString rep = field.isRepeated()?BaseMessages.getString(PKG, \"System.Combo.Yes\"):BaseMessages.getString(PKG, \"System.Combo.No\");\n \t\t\t\n if (name !=null) item.setText( 1, name);\n if (xpath !=null) item.setText( 2, xpath);\n \t\t\tif (type !=null) item.setText( 3, type);\n \t\t\tif (format !=null) item.setText( 4, format);\n \t\t\tif (length !=null && !\"-1\".equals(length)) item.setText( 5, length);\n \t\t\tif (prec !=null && !\"-1\".equals(prec)) item.setText( 6, prec);\n \t\t\tif (curr !=null) item.setText( 7, curr);\n \t\t\tif (decim !=null) item.setText( 8, decim);\n \t\t\tif (group !=null) item.setText( 9, group);\n \t\t\tif (trim !=null) item.setText(10, trim);\n \t\t\tif (rep !=null) item.setText(11, rep); \n }\n\t\t}\n \n wFields.removeEmptyRows();\n wFields.setRowNums();\n wFields.optWidth(true);\n if(in.getShortFileNameField()!=null) wShortFileFieldName.setText(in.getShortFileNameField());\n if(in.getPathField()!=null) wPathFieldName.setText(in.getPathField());\n if(in.isHiddenField()!=null) wIsHiddenName.setText(in.isHiddenField());\n if(in.getLastModificationDateField()!=null) wLastModificationTimeName.setText(in.getLastModificationDateField());\n if(in.getUriField()!=null) wUriName.setText(in.getUriField());\n if(in.getRootUriField()!=null) wRootUriName.setText(in.getRootUriField());\n if(in.getExtensionField()!=null) wExtensionFieldName.setText(in.getExtensionField());\n if(in.getSizeField()!=null) wSizeFieldName.setText(in.getSizeField());\n\n\n\t\tsetIncludeFilename();\n\t\tsetIncludeTablename();\n\t\tsetIncludeRownum();\n\n\t\twStepname.selectAll();\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCustomInstrumentationData() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CUSTOMINSTRUMENTATIONDATA_PROP.get());\n }",
"org.landxml.schema.landXML11.TrafficControlType.Enum getControlType();",
"@Override\n\tprotected void buildRegFieldDefines() {\n\t\tIterator<FieldProperties> iter = fieldList.iterator();\n\t\t// traverse field list\n\t\twhile (iter.hasNext()) {\n\t\t\tFieldProperties field = iter.next();\n\t\t\tString fieldId = escapeReservedString(field.getPrefixedId()); \n\t\t\tString fieldClass = \"uvm_field_translate\";\n\t\t\toutputList.add(new OutputLine(indentLvl, fieldClass + \" \" + fieldId + \" = new(this, \" + field.getLowIndex() + \", \" + field.getFieldWidth() + \");\"));\n\t\t}\n\t}",
"@Override\n\tprotected void getDataFromUCF() {\n\n\t}",
"public Unit getComponentValueByName(String name){\r\n switch(name){\r\n case \"R0\":\r\n return this.getCpu().getControlUnit().getGeneralPurposeRegister(0);\r\n case \"R1\":\r\n return this.getCpu().getControlUnit().getGeneralPurposeRegister(1);\r\n case \"R2\":\r\n return this.getCpu().getControlUnit().getGeneralPurposeRegister(2); \r\n case \"R3\":\r\n return this.getCpu().getControlUnit().getGeneralPurposeRegister(3);\r\n case \"X1\":\r\n return this.getCpu().getControlUnit().getIndexRegister(1);\r\n case \"X2\":\r\n return this.getCpu().getControlUnit().getIndexRegister(2);\r\n case \"X3\":\r\n return this.getCpu().getControlUnit().getIndexRegister(3);\r\n case \"MAR\":\r\n return this.getMemory().getMAR();\r\n case \"MBR\":\r\n return this.getMemory().getMBR();\r\n case \"PC\":\r\n return this.getCpu().getControlUnit().getProgramCounter();\r\n case \"CC\":\r\n return this.getCpu().getControlUnit().getConditionCodeRegister();\r\n case \"IR\":\r\n return this.getCpu().getControlUnit().getInstructionRegister();\r\n default:\r\n return new Unit(13,0);\r\n \r\n } \r\n }",
"public String[] getPrimaryInputExtensions();"
] | [
"0.5348863",
"0.5207027",
"0.5139081",
"0.50041044",
"0.50037193",
"0.49661767",
"0.49190095",
"0.49186882",
"0.48953697",
"0.4888039",
"0.48852086",
"0.48852086",
"0.4854174",
"0.48458126",
"0.4836613",
"0.4829342",
"0.48062956",
"0.48028323",
"0.47985402",
"0.4783672",
"0.47394282",
"0.4737386",
"0.47266874",
"0.47155136",
"0.4715347",
"0.47089362",
"0.46807468",
"0.4679828",
"0.46661994",
"0.46606278",
"0.46559563",
"0.46510747",
"0.46371064",
"0.4624448",
"0.4624448",
"0.46051124",
"0.45913166",
"0.45910048",
"0.45851955",
"0.45846108",
"0.45824966",
"0.45805582",
"0.45780826",
"0.45779374",
"0.45716095",
"0.45478436",
"0.4540986",
"0.45405197",
"0.45298368",
"0.4519642",
"0.45164236",
"0.4513555",
"0.4506428",
"0.45062461",
"0.45056397",
"0.44909233",
"0.4488733",
"0.44871485",
"0.44867057",
"0.44843617",
"0.44839594",
"0.44814655",
"0.4477112",
"0.44733277",
"0.44686562",
"0.44663572",
"0.4462399",
"0.446126",
"0.44590488",
"0.4458199",
"0.44575453",
"0.44506517",
"0.4449124",
"0.44454366",
"0.44427824",
"0.44422534",
"0.44405615",
"0.44341454",
"0.44330576",
"0.4431604",
"0.44251394",
"0.44176772",
"0.44167382",
"0.44124225",
"0.44120672",
"0.44072437",
"0.4400474",
"0.4397914",
"0.43917912",
"0.43902802",
"0.43876567",
"0.43844908",
"0.43818197",
"0.43815693",
"0.43810853",
"0.43802872",
"0.4379719",
"0.4374456",
"0.43731543",
"0.43596599",
"0.4356097"
] | 0.0 | -1 |
login first connects to the database, then tries to find the inputted email and password if successful it loads home.fxml | public void login(){
try{
stmt = conn.createStatement();
String userEmail = textEmail.getText();
String userPass = textPassword.getText();
String sql = "SELECT * FROM admin WHERE mail= '"+userEmail+"' && password = '"+ userPass+"'";
rs = stmt.executeQuery(sql);
if(rs.next()){
String foundType = rs.getString("password");
System.out.println(foundType);
}
if(userEmail.equals(rs.getString("mail")) && userPass.equals(rs.getString("password"))){
System.out.println("test1");
JOptionPane.showMessageDialog(null, "Login Successful");
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("home.fxml"));
Parent root1 = (Parent) fxmlLoader.load();
Stage stage = new Stage();
stage.setTitle("Home");
stage.setScene(new Scene(root1));
stage.show();
}catch (Exception e){
JOptionPane.showMessageDialog(null,e);
}
}else{
JOptionPane.showMessageDialog(null, "Login failed");
dispose();
}
}catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}
ConnectionClass connectionClass=new ConnectionClass();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@FXML\n private void loginButtonClicked(ActionEvent event) {\n\n String username = usernameField.getText();\n String password = passwordField.getText();\n \n if (username.equals(\"tuksa\") && password.equals(\"Tuksa123\")) {\n try {\n Parent homeParent = FXMLLoader.load(getClass().getResource(\"LandingPage.fxml\"));\n Scene homeScene = new Scene(homeParent);\n Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n \n stage.setScene(homeScene);\n stage.show();\n } catch (IOException ex) {\n Logger.getLogger(OpenMRSLoginPageController.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n error.setVisible(true);\n }\n \n\n// Connection conn = null;\n// try {\n// conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/openmrs?useTimezone=true&serverTimezone=UTC\", \"root\", \"Emmanuel4231\");\n// String query = \"SELECT username, password FROM USERS WHERE username = ? and password = ?\";\n// PreparedStatement statement = conn.prepareStatement(query);\n// statement.setString(1, username);\n// statement.setString(2, password);\n//\n// ResultSet result = statement.executeQuery();\n//\n// while (result.next()) {\n// String user = result.getString(\"username\");\n// String pass = result.getString(\"password\");\n//\n// if (username.equals(\"tuksa\") && password.equals(\"Tuksa123\")) {\n// Parent homeParent = FXMLLoader.load(getClass().getResource(\"LandingPage.fxml\"));\n// Scene homeScene = new Scene(homeParent);\n// Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n//\n// stage.setScene(homeScene);\n// stage.show();\n// } else {\n// error.setVisible(true);\n// throw new SQLTransactionRollbackException(\"invalid login\");\n// }\n// }\n//\n// } catch (Exception e) {\n// System.out.println(\"invalid login\");\n// error.setVisible(true);\n// e.printStackTrace();\n// }\n\n }",
"@FXML\n\tprivate void handleLogin() {\n\t \n\t\t\t\ttry {\n\t\t\t\t\tmain.showHomePageOverview(username.getText(),password.getText());\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\n\t}",
"@FXML\n\tpublic void logIn() throws SQLException {\n\t\tboolean flag = false;\n\t\tConnection tempCon = DBConnection.getConnection();\n\t\tString sql = \"{ ? =call login_verify(?,?)}\";\n\t\tCallableStatement stmt = tempCon.prepareCall(sql);\n\t\tstmt.setString(2, email.getText());\n\t\tstmt.setString(3, pass.getText());\n\t\tstmt.registerOutParameter(1, Types.INTEGER);\n\t\t\n\t\tstmt.execute();\n\t\tint temp = stmt.getInt(1);\n\t\tSystem.out.println(temp);\n\t\tif(temp==0) {\n\t\t\t\n\t\t\tlogStatus.setText(\"Login Failed\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tMain.cusID = temp;\n\t\t\tFXMLLoader Loader = new FXMLLoader();\n\t\t\tLoader.setLocation(getClass().getResource(\"/application/searchByLocation.fxml\"));\n\t\t\t\n\t\t\ttry {\n\t\t\t\tLoader.load();\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\t\n\t\t\tParent root = Loader.getRoot();\n\t\t\tScene scene = new Scene(root,600,600);\n\t\t\tMain.window.setScene(scene);\n\t\t\tMain.window.show();\n\t\t}\n\t\t\n\t\ttempCon.close();\n\t\t\n\t}",
"@FXML\r\n\tpublic void login(ActionEvent event) throws IOException{\r\n\t\tConnection con = null;\r\n\r\n\t\tString dbPassword = \"user\";\r\n\t\tString dbUsername = \"user\";\r\n\t\ttry{\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tcon= DriverManager.getConnection(\"jdbc:mysql://localhost/new_schema\", dbUsername, dbPassword);\r\n\t\t\tif (username.getText().matches(dbUsername)&& password.getText().matches(dbPassword)){\r\n\t\t\t\tif(event.getSource()== login){\r\n\t\t\t\t\tFXMLLoader loader = new FXMLLoader(Main.class.getResource(\"Application.fxml\"));\r\n\t\t\t\t\troot = (Parent) loader.load();\r\n\r\n\t\t\t\t\tMain.setLoggedIn();\r\n\t\t\t\t\tScene scene = new Scene(root);\r\n\t\t\t\t\tStage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.setTitle(\"Member Registry Editing Mode\");\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t} \r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Incorrect login information\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(ClassNotFoundException cnfe)\r\n\t\t{\r\n\t\t\tcnfe.printStackTrace(System.err);\r\n\t\t}\r\n\r\n\t\tcatch(SQLException sql)\r\n\t\t{\r\n\t\t\tsql.printStackTrace(System.err);\r\n\t\t}\r\n\r\n\t\tfinally{\r\n\t\t\ttry{\r\n\t\t\t\tcon.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void loadLogin() throws IOException{\n FXMLLoader loginLoader = new FXMLLoader(getClass().getResource(\"/com/slackers/inc/Boundary/FXML/loginregisterform.fxml\"));\n Parent login = loginLoader.load();\n String cssDoc = getClass().getResource(\"/com/slackers/inc/Boundary/CSS/custom.css\").toExternalForm();\n login.getStylesheets().add(cssDoc);\n\n LoginController loginController = loginLoader.getController();\n loginController.setMainController(this);\n\n Stage stage = new Stage();\n stage.setTitle(\"Login or Signup\");\n stage.setScene(new Scene(login));\n stage.showAndWait();\n\n\n if (userController.getUser().getEmail() == null || userController.getUser().getEmail().equals(\"\")\n || userController.getUser().getPassword() == null || userController.getUser().getPassword().equals(\"\")) {\n Platform.exit();\n System.exit(1);\n }\n\n programPref.put(\"email\", userController.getUser().getEmail());\n try {\n programPref.put(\"password\", CryptoTools.encrypt(userController.getUser().getPassword(), programPref));\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n Notifications.create().title(\"Username Not Saved\").text(\"Could not save username and password for reiterations. Please try again later.\").showError();\n System.out.println(\"Could not save username and password for reiterations\");\n }\n\n }",
"@FXML private void buttonLoginClick() {\n if(passwordField.getText().isEmpty() && mailField.getText().isEmpty() ){\n passwordField.setStyle(\"-fx-background-color: #ff471a\");\n mailField.setStyle(\"-fx-background-color: #ff471a\");\n\n showError(\"All fields are not filled\");\n\n\n }else if(passwordField.getText().isEmpty()){\n passwordField.setStyle(\"-fx-background-color: #ff471a\");\n showError(\"All fields are not filled\");\n clearField();\n\n }else if(mailField.getText().isEmpty()){\n mailField.setStyle(\"-fx-background-color: #ff471a\");\n showError(\"All fields are not filled\");\n clearField();\n }else{\n String resultat = loginManager.login(mailField.getText(),passwordField.getText());\n clearField();\n switch (resultat){\n case \"Success\":\n // connection with success\n System.out.println(\"Connection success\");\n connected();\n\n break;\n case \"Error\":\n this.showError(\"An error has occured please contact the administrator\");\n break;\n case \"Failed\":\n this.showError(\"Wrong password and/or email please check it out and retry\");\n break;\n }\n\n }\n }",
"@FXML\n\tprivate void onLogin(ActionEvent event) throws IOException {\n\t\tif (!username.getText().equals(\"\") && !password.getText().equals(\"\")) {\n\t\t\tUserCommunication clientCom = new UserCommunication();\n\t\t\tSession client = clientCom.login(username.getText(), password.getText());\n\t\t\t\n\t\t\tif(client != null) { \n\t\t\t\t// login good\n\t\t\t\tparent.createSession(client);\n\t\t\t\tparent.populateProfileDatas();\n\t\t\t\tparent.goToHome();\n\t\t\t\tparent.changeContextualMenu(TypeMenu.CONNECTED);\n\t\t\t\tusername.clear();\n\t\t\t\tpassword.clear();\n\t\t\t\t\n\t\t\t\t// load favorites\n\t\t\t\tArrayList<SearchFavorite> sf = new SearchFavoriteDAO().findByUserId(client.getUser().getID());\n\t\t\t\tparent.setFavorites(sf);\n\t\t\t\tparent.populateSearcheScrollPane();\n\t\t\t\t\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// login failed\n\t\t\t\tMessage.show(\"Erreur\", \"Authentification échouée\", AlertType.INFORMATION);\n\t\t\t}\n\t\t} else {\n\t\t\tMessage.show(\"Erreur au niveau du formulaire\", \"Veuillez remplir le formulaire convenablement.\", AlertType.WARNING);\n\t\t}\n\t}",
"public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }",
"@FXML\r\n\tprivate void connectDatabase(ActionEvent event) {\r\n\t\tString username = \"\";\r\n\t\tString password = \"\";\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\tTextInputDialog userInput = new TextInputDialog();\r\n\t\t\tuserInput.setTitle(\"Input username\");\r\n\t\t\tuserInput.getDialogPane().setContentText(\"Username: \");\r\n\t\t\tTextField tf = userInput.getEditor();\r\n\t\t\tOptional<String> result = userInput.showAndWait();\r\n\r\n\t\t\tif (result.isPresent()) {\r\n\t\t\t\t// validate input\r\n\t\t\t\tusername = tf.getText();\r\n\t\t\t\tif (!username.isEmpty()) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tshowAlert(AlertType.ERROR, \"Input Error\", \"Input username\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// canceled\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\twhile (true) {\r\n\t\t\t\r\n\t\t\tTextInputDialog userInput = new TextInputDialog();\r\n\t\t\tuserInput.setTitle(\"Input password\");\r\n\t\t\tuserInput.getDialogPane().setContentText(\"Password: \");\r\n\t\t\tTextField tf = userInput.getEditor();\r\n\t\t\tOptional<String> result = userInput.showAndWait();\r\n\r\n\t\t\tif (result.isPresent()) {\r\n\t\t\t\t// validate input\r\n\t\t\t\tpassword = tf.getText();\r\n\t\t\t\tif (!password.isEmpty()) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tshowAlert(AlertType.ERROR, \"Input Error\", \"Input password\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// canceled\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\tmyConn.getConnection(username, password);\r\n\t\tbuildTable();\r\n/*\r\n\t\tSystem.out.println(\"username: \" + username);\r\n\t\tSystem.out.println(\"password: \" + password);\r\n*/\r\n\t}",
"public void login(ActionEvent e) {\n boolean passwordCheck = jf_password.validate();\n boolean emailCheck = jf_email.validate();\n if (passwordCheck && emailCheck) {\n\n\n new LoginRequest(jf_email.getText(), jf_password.getText()) {\n @Override\n protected void success(JSONObject response) {\n Platform.runLater(fxMain::switchToDashboard);\n }\n\n @Override\n protected void fail(String error) {\n Alert alert = new Alert(Alert.AlertType.ERROR, error, ButtonType.OK);\n alert.showAndWait();\n }\n };\n\n\n }\n }",
"public void Login(ActionEvent event){\n User u = new User();\n String name = txtUsername.getText();\n u.setUsername(name);\n try {\n if (loginModel.isLogin(txtUsername.getText(),txtPassword.getText())){\n if(userDetailModel.getRoleByUser(txtUsername.getText()).equals(\"Admin\")){\n UserHolder holder = UserHolder.getInstance();\n holder.setUser(u);\n isConnected.setText(\"Logged in successfully\");\n Parent root = FXMLLoader.load(getClass().getResource(\"../ui/adminNavigation.fxml\"));\n Node node = (Node) event.getSource();\n Stage stage = (Stage) node.getScene().getWindow();\n stage.setScene(new Scene(root));\n stage.show();\n }else{\n UserHolder holder = UserHolder.getInstance();\n holder.setUser(u);\n isConnected.setText(\"Logged in successfully\");\n Parent root = FXMLLoader.load(getClass().getResource(\"../ui/empNav.fxml\"));\n Node node = (Node) event.getSource();\n Stage stage = (Stage) node.getScene().getWindow();\n stage.setScene(new Scene(root));\n stage.show();\n }\n\n\n\n }else{\n isConnected.setText(\"username or password is incorrect\");\n }\n } catch (SQLException | IOException e) {\n e.printStackTrace();\n }\n }",
"public void openLoginRegister() {\n\t\tcontroller.intializeDatabaseConnection();\n\t\tif (controller.isConnected()) {\n\t\t\ttry {\n\t\t\t\tFXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/RegisterLoginView.fxml\"));\n\t\t\t\tfxmlLoader.setResources(bundle);\n\t\t\t\tParent root1 = (Parent) fxmlLoader.load();\n\t\t\t\tStage stage = new Stage();\n\t\t\t\tRegisterLoginController rlc = fxmlLoader.getController();\n\t\t\t\trlc.setMainController(this);\n\t\t\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\t\t\t// stage.initStyle(StageStyle.UNDECORATED);\n\t\t\t\tstage.setTitle(bundle.getString(\"rLPleaseLabel\"));\n\t\t\t\tstage.setScene(new Scene(root1));\n\t\t\t\tstage.show();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tAlert alert1 = new Alert(AlertType.ERROR);\n\t\t\talert1.setTitle(bundle.getString(\"mVDataConAlertTitle\"));\n\t\t\talert1.setHeaderText(bundle.getString(\"mVDataConAlertHeader\"));\n\t\t\talert1.setContentText(bundle.getString(\"mVDataConAlertContent\"));\n\t\t\talert1.showAndWait();\n\t\t}\n\n\t}",
"public void login(ActionEvent e) throws IOException{\n\t\tString username = Username.getText().toLowerCase();\n\t\tString password = Password.getText();\n\t\tif(username.equalsIgnoreCase(\"admin\")){\n\t\t\tif (password.equals(PhotoAlbum.admin.getPassword())) {\n\t\t\t\tsegue(\"/view/Admin.fxml\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 1;\");\n\t\t\t\tPassword.setStyle(\"-fx-text-box-border: red; -fx-focus-color: red;\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} \n\t\t//search through list\n\t\tfor(int i = 0; i < PhotoAlbum.admin.getUserList().size(); i++){\n\t\t\tPhotoAlbum.regular_user = (NonAdminUser) PhotoAlbum.admin.getUserList().get(i);\n\t\t\tif(PhotoAlbum.regular_user.getUsername().equals(username)){\n\t\t\t\tif(PhotoAlbum.regular_user.getPassword().equals(password)){\n\t\t\t\t\tUsername.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\t\t\t\tuserwrong.setStyle(\"-fx-opacity: 0;\");\n\t\t\t\t\tPassword.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 0;\");\n\t\t\t\t\tPhotoAlbum.logged_in = (NonAdminUser) PhotoAlbum.admin.getUserList().get(i);\n\t\t\t\t\tsegue(\"/view/Albums.fxml\");\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 1;\");\n\t\t\t\t\tPassword.setStyle(\"-fx-text-box-border: red; -fx-focus-color: red;\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if not found\n\t\tuserwrong.setStyle(\"-fx-opacity: 1;\");\n\t\tUsername.setStyle(\"-fx-text-box-border: #e67e22; -fx-focus-color: #e67e22;\");\n\t\tPassword.setStyle(\"-fx-text-box-border: #e67e22; -fx-focus-color: #e67e22;\");\n\t}",
"public void login(ActionEvent actionEvent) throws IOException {\n if (\"123\".equals(password.getText().toString())) {\r\n URL resource = getClass().getResource(\"../view/AdminWindow.fxml\");\r\n Parent load = FXMLLoader.load(resource);\r\n contextLog.getChildren().clear();\r\n contextLog.getChildren().add(load);\r\n }else {\r\n URL resource = getClass().getResource(\"../view/CashierWindow.fxml\");\r\n Parent load = FXMLLoader.load(resource);\r\n contextLog.getChildren().clear();\r\n contextLog.getChildren().add(load);\r\n }\r\n\r\n }",
"@FXML\n\tvoid login(ActionEvent event) throws IOException {\n\t\tMessage messageToServer = new Message();\n\t\tString userName = txtUserName.getText();\n\t\tString password = txtPassword.getText();\n\t\t// check that user put details\n\t\tif (userName.trim().isEmpty() || password.trim().isEmpty())\n\t\t\tlblErr.setText(\"User Name or Password is missing\");\n\t\telse {\n\t\t\tlblErr.setText(\"\");\n\t\t\t// create new Message object with the request\n\t\t\tmessageToServer.setMsg(userName + \" \" + password);\n\t\t\tmessageToServer.setOperation(\"isUserExists\");\n\t\t\tmessageToServer.setControllerName(\"UserController\");\n\t\t\t// the result User instance\n\t\t\tuser = (User) ClientUI.client.handleMessageFromClientUI(messageToServer);\n\t\t\t// user isn't exists in DB\n\t\t\tif (user == null) { // create pop up alert\n\t\t\t\tlblErr.setText(\"User Name or Password is incorrect\");\n\t\t\t}\n\t\t\t// user already log in\n\t\t\telse if (user.isLogedIN() == true) { // create pop up alert\n\t\t\t\tlblErr.setText(\"User already logged in\");\n\t\t\t} else { // user logged in successfully\n\t\t\t\tmessageToServer.setMsg(userName);\n\t\t\t\tmessageToServer.setOperation(\"updateConnectionStatus\");\n\t\t\t\tmessageToServer.setControllerName(\"UserController\");\n\t\t\t\t// update the user's connection status\n\t\t\t\tClientUI.client.handleMessageFromClientUI(messageToServer);\n\t\t\t\t// navigate user to the right home page, by his permission\n\t\t\t\tswitch (user.getUserType()) {\n\t\t\t\tcase STUDENT:\n\t\t\t\t\tNavigator.instance().navigate(\"StudentHomeForm\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase TEACHER:\n\t\t\t\t\tNavigator.instance().navigate(\"TeacherHomeForm\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase PRINCIPAL:\n\t\t\t\t\tNavigator.instance().navigate(\"PrincipalHomeForm\");\n\t\t\t\t\tbreak;\n\t\t\t\t} // end switch case\n\t\t\t}\n\t\t}\n\t}",
"@FXML\n void doLogin(ActionEvent event) {\n try {\n loginModel.doLogin(new Login(textFieldUsername.getText(), passwordFieldPassword.getText()));\n } catch (WrongCredentialsException e) {\n e.printStackTrace();\n Alert alert = new Alert(Alert.AlertType.WARNING, \"Wrong username or password\");\n alert.showAndWait();\n } catch (Exception e) {\n e.printStackTrace();\n Alert alert = new Alert(Alert.AlertType.WARNING, \"Cannot load application. Goodbye!\");\n alert.showAndWait();\n Platform.exit();\n } finally {\n textFieldUsername.clear();\n passwordFieldPassword.clear();\n }\n }",
"public void loginButtonAction() {\n String username = usernameTextField.getText();\n String pass = passwordField.getText();\n\n if(checkFields()){\n if(am.login(username, pass)){\n LoginDetails.currentAdmin = am.getAdmin();\n try {\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n Stage stage = new Stage();\n Parent parent = FXMLLoader.load(getClass().getResource(\"/app/main/MainView.fxml\"));\n stage.setResizable(true);\n stage.setTitle(\"Admin Application\");\n stage.setScene(new Scene(parent, screenSize.getWidth() * 0.9, screenSize.getHeight() * 0.9));\n stage.show();\n\n Stage thisStage = (Stage) usernameTextField.getScene().getWindow();\n thisStage.close();\n\n stage.setOnCloseRequest(e -> {\n System.err.println(\"Main: Shutting down!\");\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n else{\n setInfoMessage(\"Wrong username and/or password\", true);\n }\n }\n else{\n setInfoMessage(\"You have to enter username/password\", true);\n }\n }",
"@FXML\r\n private void handleLoginButtonAction(ActionEvent event) throws SQLException {\n\r\n String query = \"SELECT username, password FROM LoginTable WHERE \"\r\n + \"username = '\" + usernameBox.getText() + \"'\"\r\n + \"AND password = '\" + passwordBox.getText() + \"'\";\r\n\r\n try {\r\n ResultSet rs = d.getResultSet(query); //TODO: Fill in this query\r\n if (!rs.next()) {\r\n //TODO: What should happen if there is no result?\r\n prompt.setText(\"Incorrect Username or Password\");\r\n } else {\r\n //TODO: What should happen if there is a result?\r\n prompt.setText(\"Login Success\");\r\n music.setVisible(true);\r\n }\r\n rs.close();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"private void loadLogin() throws IOException {\r\n Stage primaryStage;\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/LoginView.fxml\"));\r\n Scene scene = new Scene(root);\r\n primaryStage = new Stage();\r\n primaryStage.setScene(scene);\r\n primaryStage.setResizable(false);\r\n primaryStage.show();\r\n }",
"public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }",
"@FXML\n\tprivate void connectEventHandler(ActionEvent event) {\n\t\tif (loggedInUser != null) {\n\t\t\talert(\"You are logged in!\");\n\t\t\treturn;\n\t\t}\n\t\tloggedInUser = model.logIn(userNameField.getText());\n\t\tif (loggedInUser == null) {\n\t\t\talert(\"Wrong user name!\");\n\t\t\treturn;\n\t\t}\n\t\t// Checking the password\n\t\tif (!loggedInUser.getPasswordHash().equals(hashPassword(passwordField.getText(), SALT))) {\n\t\t\talert(\"Wrong password!\");\n\t\t\tloggedInUser = null;\n\t\t\treturn;\n\t\t}\n//\t\tloggedInUser = new User(\"Bence\", \"\", KnowledgeLevel.EXPERT, 100, false);\n\t\t// Connection succeeded\n\t\tprintUserData();\n\t}",
"@FXML\r\n\tvoid loginButtonClicked(ActionEvent event) throws IOException, SQLException\r\n\t{\r\n\t\tif(isValidUsernameAndPassword(usernameTextField.getText(), passwordTextField.getText())) {\r\n\t\t\t\r\n\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(\"LoginTracker.txt\", true));\r\n\t\t\twriter.write(\"User: \"+usernameTextField.getText()+\", \");\r\n\t\t\twriter.write(\"Timestamp: \"+LocalDateTime.now().toString());\r\n\t\t\twriter.newLine();\r\n\t\t\twriter.close();\r\n\t\t\t\r\n\t\t\tsetUserName(usernameTextField.getText());\r\n\t\t\tParent parent = FXMLLoader.load(getClass().getResource\r\n\t\t\t\t\t(\"/com/nkris/scheduling_app/FXML/DashboardUI.fxml\"));\r\n\t\t\tScene homeScreen = new Scene(parent);\r\n\t\t\tStage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\r\n\t\t\t\r\n\t\t\tDashboardController.loginTime = LocalTime.now();\r\n\t\t\t\r\n\t\t\tstage.setScene(homeScreen);\t\t\r\n\t\t\tstage.show();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdisplayAlert();\r\n\t\t}\r\n\t}",
"@FXML\n protected void viewLoginPage() {\n \tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }",
"public void showLogin() {\n try {\n\n // Load person overview.\n loginController controller = new loginController(this);\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"Login.fxml\"));\n loader.setController(controller);\n AnchorPane personOverview = (AnchorPane) loader.load();\n\n // Set person overview into the center of root layout.\n rootLayout.setCenter(personOverview);\n controller.background();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@FXML\n\tprivate void handleLoginButtonAction() {\n\t\t\n//\t\tString upass = \"123\";\n//\t\tString uname = \"admin\";\n//\t\tString uname = \"sadmin\";\n\t\tString uname = username.getText();\n\t\tString upass = password.getText();\n\n\t\tValidator validator = new Validator(uname, upass);\n\t\tSystem.out.println(validator.getName());\n\n \t\tChainBuilder chain= new ChainBuilder();\n \t\tchain.builChain();\n \t\tchain.getAuthonticator().validateRequest(validator);\n\n\n\t\t// Authenticator htos = new AdminValidator();\n//\t\tMyAuthenticator auth= new AdminValidator();\n//\t\tMyAuthenticator lib = new LibrarianValidator();\n//\t\tMyAuthenticator nullAuth= new NullChecker();\n//\n//\t\tnullAuth.setNextAuthonticator(lib);\n//\t\tlib.setNextAuthonticator(auth);\n\n\n\n//\t\tif (uname.trim().length() == 0 || upass.trim().length() == 0) {\n//\t\t\talertMessage(\"Fill all the required Fields\");\n//\t\t} else {\n//\t\t\tUserObjectInputOutputStream inputOutput = new UserObjectInputOutputStream();\n//\t\t\tUserDetails user = inputOutput.getUsers(uname, upass);\n//\t\t\ttry{\n//\t\t\t\tif (user.getUsername().equals(null)) {\n//\t\t\t\t\talertMessage(\"Invalid Username or Password\");\n//\t\t\t\t} else {\n//\t\t\t\t\tswitch(user.getRole()){\n//\t\t\t\t\t\tcase \"admin\":\n//\n//\t\t\t\t\t\t\tAdminController sac = new AdminController();\n//\t\t\t\t\t\t\tsac.loadAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tcase \"librarian\":\n//\t\t\t\t\t\t\tLibrarianController libc = new LibrarianController();\n//\t\t\t\t\t\t\tlibc.loadAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tcase \"sadmin\":\n//\t\t\t\t\t\t\tSuperAdminController spac = new SuperAdminController();\n//\t\t\t\t\t\t\tspac.loadSuperAdminWindow();\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t\tdefault:\n//\t\t\t\t\t\t\tbreak;\n//\t\t\t\t\t}\n//\n//\t\t\t\t}\n//\t\t\t}catch(Exception e){\n//\t\t\t\te.printStackTrace();\n//\t\t\t\talertMessage(\"======Invalid Username or Password\");\n//\t\t\t}\n//\t\t}\n\t}",
"@FXML\r\n\tprivate void goLogIn() throws IOException{\r\n\t\tMain.showStudent();\r\n\t}",
"@FXML\r\n\tpublic void processLogin(ActionEvent event) throws SQLException, IOException \r\n\t{\r\n\t\tif(loginUserName.getText().equals(\"\") || loginPasswordField.getText().equals(\"\"))\r\n\t\t{\r\n\t\t\t//status.setText(\"Please enter all details\");\r\n\t\t\tAlert alert = new Alert(AlertType.WARNING);\r\n alert.initModality(Modality.APPLICATION_MODAL);\r\n \r\n\t\t\talert.initOwner(warningStage);\r\n alert.getDialogPane().setContentText(\"Please enter all details\");\r\n alert.getDialogPane().setHeaderText(null);\r\n alert.showAndWait().filter(response -> response == ButtonType.OK);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString userid=loginUserName.getText();\r\n\t\t\tString pass=loginPasswordField.getText();\r\n\t\t\tString str=\"select id,password\t from admin where id='\"+userid+\"' and password\t='\"+pass+\"'\";\r\n\t\t\tStatement st=Database.getStatement();\r\n\t\t\tResultSet rs=st.executeQuery(str);\r\n\t\t\tif(rs.next())\r\n\t\t\t{\r\n\t\t\t\t//status.setText(\"\");\r\n\t\t\t\t//status.setText(\"HI\"+username);\r\n\t\t\t\t\r\n\t\t\t\t\t//System.out.println(\"BOO\");\r\n\t\t\t\t\t//success.setText(\"welcome \"+ username);\r\n\t\t\t\t\t//System.out.println(\"BOOO\");\r\n\t\t\t\t((Node)event.getSource()).getScene().getWindow().hide();\r\n\t\t\t\tStage primaryStage=new Stage();\r\n\t\t\t\tFXMLLoader loader =new FXMLLoader();\r\n\t\t\t\tPane root = loader.load(getClass().getResource(\"/application/addInfo.fxml\").openStream());\r\n\t\t\t\t\r\n\t\t\t\t//addInfoController control=(addInfoController)loader.getController();\r\n\t\t\t\t//control.Getuser(loginUserName.getText());\r\n\t\t\t\tScene scene = new Scene(root,542,534);\r\n\t\t\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\r\n\t\t\t\tprimaryStage.setMinWidth(542);\r\n\t\t primaryStage.setMinHeight(534);\r\n\t\t\t\tprimaryStage.setResizable(false);\r\n\t\t\t\tprimaryStage.setScene(scene);\r\n\t\t\t\tprimaryStage.show();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t alert.initModality(Modality.APPLICATION_MODAL);\r\n\t \r\n\t\t\t\talert.initOwner(warningStage);\r\n\t alert.getDialogPane().setContentText(\"Invalid login details\");\r\n\t alert.getDialogPane().setHeaderText(null);\r\n\t alert.showAndWait().filter(response -> response == ButtonType.OK);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void login(ActionEvent event) throws IOException {\n\t\t//if user is admin, open admin screen\n\t\tif(username.getText().toLowerCase().equals(\"admin\")) {\n\t\t\t//open admin screen\n\t\t\tMain.changeScene(\"/view/admin.fxml\", \"Administrator Dashboard\");\t\t\t\n\t\t}\n\t\t//if user is blank, throw error\n\t\telse if(username.getText().isEmpty()){\n\t\t\tinvalidUserError.setVisible(true);\n\t\t}\n\t\t//otherwise make sure user exists and if they do set current user and change screen, if not throw error.\n\t\telse {\n\t\t\tfor(User user : UserState.getAllUsers()) {\n\t\t\t\tif(user.getUserName().toLowerCase().equals(username.getText().toLowerCase())) {\n\t\t\t\t\tUserState.setCurrentUser(user);\n\t\t\t\t\tMain.changeScene(\"/view/userhome.fxml\", \"User Home\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tinvalidUserError.setVisible(true);\n\t\t\tusername.setText(\"\");\n\t\t}\n\t}",
"@FXML\r\n\tpublic void handleLoginButton() throws IOException{\r\n\t\tString username = tfUsernameLogin.getText();\r\n\t\tString password = pfPasswordLogin.getText();\r\n\t\tuserCred = theController.isValidUser(username, password);\r\n\t\tif(userCred.equals(\"manager\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(false);\r\n\t\t\tteamScreen.setDisable(false);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse if(userCred.equals(\"employee\")){\r\n\t\t\tloginSuccess = true;\r\n\t\t\tconsoleScreen.setDisable(false);\r\n\t\t\tactionItemsScreen.setDisable(false);\r\n\t\t\tmemberScreen.setDisable(true);\r\n\t\t\tteamScreen.setDisable(true);\r\n\t\t\thandleConsoleButton();\r\n\t\t}\r\n\t\telse{\r\n\t\t\tlbAlertLogin.setTextFill(Color.RED);\r\n\t\t\tlbAlertLogin.setText(userCred);\r\n\t\t}\r\n\t}",
"public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }",
"public void gotoLogin() {\n try {\n LoginController login = (LoginController) replaceSceneContent(\"Login.fxml\");\n login.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }",
"public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }",
"@FXML\n\tprivate void handleConnection() {\n\t\tString pseudo = this.nickName.getText();\n\t\tif (pseudo != null && !pseudo.equals(\"\")) {\n\t\t\tUser user = new User(pseudo);\n\t\t\tthis.mainApp.setUser(user);\n\t\t\t//Un fois que l'utilisateur a été créé dans la main ap, on peut appeler la méthode de connection\n\t\t\tthis.mainApp.connect();\n\t\t}\n\t\telse {\n\t\t\t\n\t\t}\n\t}",
"@FXML\r\n public void employeeLogin(MouseEvent event) throws IOException, SQLException {\r\n String getUsername = tf_username.getText();\r\n String getPassword = tf_employeePass.getText();\r\n String sql = \"SELECT * FROM EMPLOYEE\";\r\n ResultSet rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n String username = rs.getString(\"USERNAME\");\r\n String password = rs.getString(\"PASSWORD\");\r\n if ((username.equals(getUsername)) && (password.equals(getPassword))) {\r\n System.out.println(\"Employee Login Button Clicked.\");\r\n Parent root3 = FXMLLoader.load(getClass().getResource(\"Employee.fxml\"));\r\n Scene employeeView = new Scene(root3, 700, 500);\r\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n appStage.setScene(employeeView);\r\n appStage.setScene(employeeView);\r\n employeeView.getStylesheets().add\r\n (getClass().getResource(\"Customer.css\").toExternalForm());\r\n appStage.show();\r\n } else {\r\n loginLabel.setText(\"Invalid account.\");\r\n }\r\n }\r\n rs.close();\r\n }",
"@Override\n\n\tpublic void start(Stage arg0) throws Exception {\n\t\twindow = arg0;\n\t\twindow.setTitle(\"Admin Login\");\n\t\n\t\t//adding components\n\t\t\n\t\tl1 = new Label(\"UserName\");\n\t\tname = new TextField();\n\t\tname.setPromptText(\"Enter username\");\n\t\tHBox hBox1 = new HBox();\n\t\thBox1.getChildren().addAll(l1,name);\n\t\thBox1.setSpacing(10);\n\t\thBox1.setAlignment(Pos.CENTER);\n\t\t\n\t\tl2 = new Label(\"Password\");\n\t\tpassword = new TextField();\n\t\tpassword.setPromptText(\"Enter password\");\n\t\tHBox hBox2 = new HBox();\n\t\thBox2.getChildren().addAll(l2,password);\n\t\thBox2.setSpacing(10);\n\t\thBox2.setAlignment(Pos.CENTER);\n\t\t\n\t\tlogin = new Button(\"Login\");\n\t\tconnect();\n\t\tlogin.setOnAction(e -> {try{loginClicked();}catch(Exception le) {System.out.println(\"Problem in Login\" + le);}});\n\t\t\n\t\tVBox vBox = new VBox();\n\t\tvBox.getChildren().addAll(hBox1,hBox2,login);\n\t\tvBox.setAlignment(Pos.CENTER);\n\t\t\n\t\tvBox.setSpacing(20);\n\t\ts = new Scene(vBox,300,250);\n\t\twindow.setScene(s);\n\t\twindow.show();\n\t\t\n\t}",
"@FXML\r\n private void handleButtonAction(ActionEvent event) throws Exception{\n Employee emp = dao.findEmployeeByUsername(usernameTxtField.getText());\r\n if(emp.getPassword().equals(pwField.getText())){\r\n Parent homePageParent = FXMLLoader.load(getClass().getResource(\"FXMLDocument.fxml\"));\r\n Scene homePageScene = new Scene(homePageParent);\r\n\r\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n appStage.hide();\r\n appStage.setScene(homePageScene);\r\n appStage.show();\r\n }else{\r\n errorLabel.setText(\"Incorrect username or password!\");\r\n } \r\n }",
"public static void showLogin() throws IOException {\n Main.FxmlLoader(LOGINPAGE_PATH);\n }",
"@FXML\n private void doneBtn(ActionEvent event) throws IOException, SQLException, ClassNotFoundException {\n \n passCheck(); //password chk\n \n if(!pass.equals(\"\")){\n UGStudent.insertStudentLogin(username.getText(), email.getText(), pass);\n \n //return to the login page;\n Parent root = FXMLLoader.load(getClass().getResource(\"/studentenrollment/FXMLDocument.fxml\"));\n Scene scene = new Scene(root);\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n appStage.setScene(scene);\n appStage.show();\n } \n else{\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"\");\n alert.setContentText(\"Passwords not correct\");\n alert.showAndWait();\n }\n }",
"@FXML\r\n\tprivate void volverLogin(ActionEvent event) throws IOException {\r\n\r\n\t\tMain_App.showLoginView();\r\n\t}",
"@FXML\n void onLogin(ActionEvent event) throws IOException {\n System.out.println(\"inloggen\");\n Parent parent1 = FXMLLoader.load(getClass().getResource(\"/schermen/navigatie.fxml\"));\n Scene scene = new Scene(parent1);\n Stage app_stage = (Stage)((Node) event.getSource()).getScene().getWindow();\n app_stage.setScene(scene);\n app_stage.show();\n \n }",
"public void logins(){\n \n \n \n String username=txtUser.getText();\n String password=txtPass.getText();\n String sql;\n\n \n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = (Connection) DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/\"+db+\"?user=\"+user+\"&password=\"+pass);\n sql =\"Select * from user WHERE username ='\" +txtUser.getText() + \"'\";\n PreparedStatement st = (PreparedStatement) conn.prepareStatement(sql);\n ResultSet rs =st.executeQuery(); \n if(rs.next()) {\n String pasas = rs.getString(\"password\");\n if(password.equals(pasas)){\n JOptionPane.showMessageDialog(this, \"Login Berhasil\");\n \n Home tampil=new Home();\n tampil.setVisible(true);\n dispose();\n \n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }catch (Exception e) {\n JOptionPane.showMessageDialog(this,e.getMessage());\n }\n \n }",
"@FXML\n public void but_Login(ActionEvent event) {\n\n Employee workingEmployee = new Employee(txtEmployeeName.getText(),\n txtEmployeePass.getText()); //Attempts login\n\n textLog.setText(\n textLog.getText() + \"\\n\" + \"Employee login: \" + \"\\n \" + workingEmployee.email\n + \"\\n \" + workingEmployee.username); //Logs login\n\n mainEmployee = workingEmployee; //Set attempted employee login\n }",
"public void loginUI(Stage stage)\n{\n Text text1 = new Text(\"User Name\");\n //creating label password\n Text text2 = new Text(\"Password\");\n\n //Check Box for Admin\n CheckBox admin = new CheckBox(\"Admin\");\n admin.setIndeterminate(false);\n\n\n //Creating Text Filed for email\n TextField textField1 = new TextField();\n //Creating Text Filed for password\n PasswordField textField2 = new PasswordField();\n //Creating Buttons\n Button button2 = new Button(\"Login\");\n //Creating a Grid Pane\n GridPane Login_Pane = new GridPane();\n //Setting size for the pane\n Login_Pane.setMinSize(400, 200);\n //Setting the padding\n Login_Pane.setPadding(new Insets(10, 10, 10, 10));\n //Setting the vertical and horizontal gaps between the columns\n Login_Pane.setVgap(5);\n Login_Pane.setHgap(5);\n //Setting the Grid alignment\n Login_Pane.setAlignment(Pos.CENTER);\n //Arranging all the nodes in the grid\n Login_Pane.add(text1, 0, 0);\n Login_Pane.add(textField1, 1, 0);\n Login_Pane.add(text2, 0, 1);\n Login_Pane.add(textField2, 1, 1);\n // gridPane.add(button1, 0, 2);\n Login_Pane.add(button2, 1, 2);\n Login_Pane.add(admin, 0, 2);\n //Styling nodes\n button2.setStyle(\"-fx-background-color: darkslateblue; -fx-text-fill: white;\");\n text1.setStyle(\"-fx-font: normal bold 20px 'serif' \");\n text2.setStyle(\"-fx-font: normal bold 20px 'serif' \");\n Login_Pane.setStyle(\"-fx-background-color: WHITE;\");\n Scene sc=new Scene(Login_Pane);\n stage.setScene(sc);\n stage.show();\n button2.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent event) {\n\n String name=textField1.getText();\n\n String tableName1=\"Student\";\n String tableName2=\"Admin\";\n\n\n boolean trg=admin.isSelected();\n String password= textField2.getText();\n if(trg)\n {\n\n System.out.println(\"test \");\n try {\n System.out.println(\"Test 2\");\n if(db.getDeta( name,password,tableName2))\n {\n AdminUI(stage);\n }\n else\n {\n messagebox(\"Admin : You are enter wrong username or password\");\n }\n } catch (SQLException e) {\n String s=e.getMessage();\n messagebox(s);\n }\n }\n else\n {\n try {\n System.out.println(db.getDeta(name,password,tableName1));\n if(db.getDeta(name,password,tableName1))\n {\n StudentUI(stage);\n }\n else\n {\n messagebox(\"Student : You are enter wrong username or password\");\n }\n } catch (SQLException e) {\n String s=e.getMessage();\n messagebox(s);\n }\n }\n }\n });\n\n}",
"void initiateLogin() {\n\t\tString username = this.mAuthUsername.getText().toString();\n\t\tString password = this.mAuthPassword.getText().toString();\n\t\t\n\t\tfetch();\n\t\tthis.mAuthTask = new AuthenticationTask(this, this, username, password);\n\t\tthis.mAuthTask.execute();\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n CreateAccountButton.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n String user = usernameField.getText();\n String pass = passwordField.getText();\n if (Profile.validUsername(user)) {\n try {\n Menu.profile = createAccount(user, pass);\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n Parent root = (FXMLLoader.load(getClass().getResource(\"MainMenu.fxml\")));\n Menu.primaryStage.setScene(new Scene(root));\n Menu.primaryStage.show();\n Menu.profile = new Profile(user, pass);\n Menu.primaryStage.setTitle(\"PvZ\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n err.setText(\"This username is invalid\");\n usernameField.clear();\n passwordField.clear();\n }\n }\n });\n LoginButton.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent mouseEvent) {\n String user = usernameField.getText();\n String pass = passwordField.getText();\n// System.out.println(\"rt\");\n Menu.profile = Login(user, pass);\n// System.out.println(user);\n if (Menu.profile != null) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"MainMenu.fxml\"));\n Menu.primaryStage.setScene(new Scene(root));\n Menu.primaryStage.show();\n Menu.primaryStage.setTitle(\"PvZ\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n else {\n err.setText(\"Username or Password is incorrect\");\n usernameField.clear();\n passwordField.clear();\n }\n }\n });\n }",
"private void login()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Get the connection to the database\r\n\t\t\tDatabase db = new Database();\r\n\r\n\t\t\t//Get the data and format it correctly\r\n\t\t\tString username = txtUsername.getText().trim().toLowerCase();\r\n\t\t\tString password = new String(txtPassword.getPassword()).trim();\r\n\r\n\t\t\t//Verify that user information has been inserted into the username/password fields\r\n\t\t\tif (username.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your username.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtUsername.requestFocus();\r\n\t\t\t}//End of if\r\n\t\t\telse if (password.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your password.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t}//End of else if\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!db.usernameExists(username))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t}//End of if\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tUser user = db.loadUser(username);\r\n\t\t\t\t\tbyte [] bPassword = PasswordEncryption.hashPassword(username, password);\r\n\r\n\t\t\t\t\tif (bPassword.length != user.getPassword().length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t}//End of if\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean same = true;\r\n\r\n\t\t\t\t\t\t//Check the passwords for equality\r\n\t\t\t\t\t\tfor (int x = 0; x < bPassword.length; x++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bPassword[x] != user.getPassword()[x])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsame = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t}//End of for\r\n\r\n\t\t\t\t\t\tif (same)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (user.getAccountLevel() < 10)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\"You do not have sufficient rights to access this application.\",\r\n\t\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t//Login the user\r\n\t\t\t\t\t\t\t\tSession.login(user);\r\n\r\n\t\t\t\t\t\t\t\t//Open the dashbard\r\n\t\t\t\t\t\t\t\tSession.openWindow(new Dashboard());\r\n\r\n\t\t\t\t\t\t\t\t//Close this window\r\n\t\t\t\t\t\t\t\tthis.dispose();\r\n\t\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination your provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t}//End of else\r\n\t\t\t\t}//End of else\r\n\t\t\t}//End of else\r\n\t\t}//End of try\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//Inform the user that the application was unable to connect to the database.\r\n\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\tthis,\r\n\t\t\t\t\"An error occured connecting to the database.\\n\\nIf this problem continues, please contact your system administrator.\",\r\n\t\t\t\tApplication.NAME,\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE\r\n\t\t\t);\r\n\t\t}//End of catch\r\n\t}",
"@Override\r\n public void start(Stage primaryStage) throws IOException {\r\n loadLogin();\r\n }",
"public void buttonSingIn(ActionEvent event) throws IOException {\n\n\t\tif (!txtSystemUserUsername.getText().equals(\"\") && !passFieldSystemUserPassword.getText().equals(\"\")) {\n\n\t\t\tString username = txtSystemUserUsername.getText();\n\t\t\tString password = passFieldSystemUserPassword.getText();\n\n\t\t\tboolean openWindow = restaurant.logInUser(username, password);\n\t\t\tboolean active = restaurant.conditionUser(username, password);\n\n\t\t\tif (openWindow == true && active == true) {\n\t\t\t\tif (username.equals(\"ADMINISTRATOR\")) {\n\t\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(\n\t\t\t\t\t\t\tgetClass().getResource(\"Administrator-Options-window.fxml\"));\n\t\t\t\t\toptionsFxml.setController(this);\n\t\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\n\t\t\t\t} else {\n\t\t\t\t\tFXMLLoader optionsFxml = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\t\toptionsFxml.setController(this);\n\t\t\t\t\tParent opWindow = optionsFxml.load();\n\t\t\t\t\tmainPaneLogin.getChildren().setAll(opWindow);\n\n\t\t\t\t}\n\t\t\t\tsetEmpleadoUsername(username);\n\t\t\t\tingredientsOptions.clear();\n\t\t\t\tingredientsOptions.addAll(restaurant.getStringIngredients());\n\t\t\t\ttypeOptions.clear();\n\t\t\t\ttypeOptions.addAll(restaurant.getStringProductTypes());\n\t\t\t\tproductOptions.clear();\n\t\t\t\tproductOptions.addAll(restaurant.getStringReferencedIdsProducts());\n\n\t\t\t} else {\n\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\n\t\t\t\t\t\t\"Este usuario no ha sido encontrado y/o se encuentra inactivo. Si desea crear uno ingrese a sign up o active su usuario\");\n\t\t\t\tdialog.setTitle(\"Usuario no encontrado\");\n\t\t\t\tdialog.show();\n\n\t\t\t}\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al cargar datos\");\n\t\t\tdialog.show();\n\t\t}\n\n\t}",
"@FXML\r\n public void registerAction(ActionEvent e) throws IOException {\n String username = registerUsername.getText();\r\n String password = registerPassword.getText();\r\n String email = registerEmail.getText();\r\n try{\r\n //GET CONNECTION\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conn= DBConnect.getConnection();\r\n Statement stmt=conn.createStatement();\r\n //saving data onto database \r\n stmt.executeUpdate(\"INSERT INTO admin VALUES (adminID,'\"+username+\"','\"+password+\"','\"+email+\"')\");\r\n MessagePopup.display(\"Registration Status\", \"Registration Complete!\");\r\n\r\n registerButton.getScene().getWindow().hide();\r\n\r\n Stage register = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(\"Login.fxml\"));\r\n Scene scene = new Scene(root);\r\n register.setTitle(\"Hospital Management System\");\r\n register.setScene(scene);\r\n register.show();\r\n register.setResizable(false);\r\n conn.close();\r\n\r\n }catch(Exception ex){ \r\n System.out.println(ex);\r\n }\r\n\r\n \r\n }",
"protected void login() {\n\t\t\r\n\t}",
"public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }",
"public login() {\n initComponents();\n \n \n }",
"@FXML\n public void loginButtonPressed()\n {\n viewModel.validateLogin();\n mainView.setWindow(\"P\");\n\n }",
"@FXML\r\n\tpublic void home(ActionEvent event) throws IOException, SQLException {\n\r\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/GUI/AdminHomeMenu.fxml\"));\r\n\r\n\t\tParent mainMenu = loader.load();\r\n\r\n\t\tAdminHomeMenuContoller ahmc = loader.getController();\r\n\r\n\t\t// This method sets the admin object in home adminHomeMenu controller\r\n\r\n\t\tSystem.out.println(admin.getPassword());\r\n\t\t\r\n\t\tahmc.passAdminInfo(admin);\r\n\r\n\t\tScene mainMenuScene = new Scene(mainMenu);\r\n\r\n\t\tStage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n\r\n\t\twindow.setScene(mainMenuScene);\r\n\t\twindow.setResizable(false);\r\n\r\n\t}",
"private void onLoginButtonClicked() {\n this.loginManager = new LoginManager(this, this);\n this.password = passwordEditText.getText().toString().trim();\n this.username = usernameEditText.getText().toString().trim();\n if (username.isEmpty() || password.isEmpty()) {\n Snackbar.make(coordinatorLayout, R.string.fill_all_fields_snackbar, Snackbar.LENGTH_LONG).show();\n } else loginManager.fetchUsersToDatabase(username, password, serverName, serverPort);\n }",
"private void LoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LoginActionPerformed\n\n Connection connection = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n\n String ConnectionURL = \"jdbc:mysql://localhost:3306/weddinghallreservation\";\n \n PreparedStatement q;\n\n \n connection = DriverManager.getConnection(ConnectionURL, \"root\", \"1212\");\n \n\n Id = id.getText();\n \n if (Id.startsWith(\"12\")) {\n // Query to bring the login information of the owner from Owner table\n q = connection.prepareStatement(\"Select `idOwner` , `Password` from `owner` where `idOwner`=? AND `Password`=? \");\n q.setString(1, Id);\n q.setString(2, String.valueOf(Password.getPassword()));\n ResultSet r = q.executeQuery();\n \n if (r.next()) { // Moving to the Owner home page\n OwnerPage_Home ob = new OwnerPage_Home();\n ob.setVisible(true);\n this.setVisible(false);\n\n } else { // In case the password is incorrect\n incorrectPass.setText(\"Incorrect email or password\");\n }\n\n } else {\n // Query to bring the login information of the tenant from Tenant table\n q = connection.prepareStatement(\"Select `idTenant` , `Password` from `tenant` where `idTenant`=? AND `Password`=? \");\n q.setString(1, Id);\n q.setString(2, String.valueOf(Password.getPassword()));\n ResultSet r = q.executeQuery();\n\n if (r.next()) { // Moving to the Tenant home page\n TenantPage_Home ob = new TenantPage_Home();\n ob.setVisible(true);\n this.setVisible(false);\n } else {\n\n incorrectPass.setText(\"Incorrect email or password\");\n }\n\n }\n\n connection.close();\n\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }",
"protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"@FXML\n public void dbConnect(){\n try{\n connectionManager.connectToDB();\n connectionStatus.setText(connectionManager.getDbName());\n disconnectButton.setVisible(true);\n alert.setTitle(\"Polaczenie z baza: \" + connectionManager.getConn().getMetaData().getDatabaseProductName() + \" \" + connectionManager.getConn().getMetaData().getDatabaseProductVersion());\n alert.setContentText(connectionManager.getConnectionMessage());\n alert.showAndWait();\n\n if(connectionManager.getConn().getMetaData().getDatabaseProductName().equals(\"SQLite\"));\n connState = true;\n if(connState == true)\n initComponents();\n\n }catch (SQLException e){\n e.getMessage();\n }\n\n executeButton.setDisable(false);\n }",
"private void confirmAction() {\r\n try {\r\n PreparedStatement prep = conn.prepareStatement(\"SELECT * FROM admin WHERE login = ? and (paswd = ? or paswd = ?)\");\r\n prep.setString(1, tf_login.getText());\r\n prep.setString(2, pf_pass.getText());\r\n prep.setString(3, tf_pass.getText());\r\n ResultSet wynikLogowania = prep.executeQuery();\r\n if (wynikLogowania.next()) {\r\n// if (!wynikLogowania.getString(\"login\").equals(\"\")) {\r\n System.out.println(\"\\n=========================================================\");\r\n System.out.println(\"===|||Zalogowano poprawnie do aplikacji JAKO ADMIN!|||===\");\r\n System.out.println(\"=========================================================\\n\");\r\n try {\r\n Stage administratorStage = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(\"../view/adminMainView.fxml\")); //w tym miejscu wywołamy okno ADMINA po zalogowaniu!!!\r\n administratorStage.setTitle(\"Witamy w panelu administratora!!!\");\r\n administratorStage.setScene(new Scene(root));\r\n administratorStage.show();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n// }\r\n } else {\r\n System.out.println(\"\\n=======================================================\");\r\n System.out.println(\"\\tUWAGA: Wprowadzono niepoprawny login lub hasło!\");\r\n System.out.println(\"=======================================================\\n\");\r\n// licznikLogowan = licznikLogowan - 1;\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"ALERT: Nieprawidłowe dane logowania!\");\r\n alert.setHeaderText(\"Niepoprawny login lub hasło!\");\r\n// alert.setContentText(\"Pozostało: \" + licznikLogowan + \" prób logowania!\");\r\n alert.showAndWait();\r\n// if (licznikLogowan == 0) {\r\n// System.out.println(\"To była Twoja OSTATNIA próba zalogowania! Nie udało się! Zapraszamy jak się zastanowisz nad sobą!\");\r\n// System.exit(0);\r\n// }\r\n }\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n System.out.println(\"\\n#############################\");\r\n System.out.println(\"###Błędne zapytanie do DB!###\");\r\n System.out.println(\"##############################\\n\");\r\n }\r\n tf_login.clear();\r\n pf_pass.clear();\r\n tf_pass.clear();\r\n }",
"public void navLogin() {\n container.getChildren().clear();\n loginText.setText(\"Vennligst skriv inn brukernavn og passord:\");\n Label name = new Label(\"Brukernavn:\");\n Label pwd = new Label(\"Passord:\");\n TextField username = new TextField(); /* Lager tekstfelt */\n username.getStyleClass().add(\"textField\");\n PasswordField password = new PasswordField(); /* Ditto */\n password.getStyleClass().add(\"textField\");\n password.setOnAction(new EventHandler<ActionEvent>() {\n public void handle(ActionEvent args) {\n handleLogin(login.checkLogin(username.getText(), password.getText()));\n }\n });\n username.getStyleClass().add(\"inpDefault\");\n password.getStyleClass().add(\"inpDefault\");\n Button logIn = new Button(\"Logg inn\"); /* Laget knapp, Logg inn */\n Button register = new Button(\"Registrer deg\"); /* Skal sende deg til en side for registrering */\n HBox buttons = new HBox();\n buttons.getChildren().addAll(logIn, register);\n container.setPadding(new Insets(15, 12, 15, 12));\n container.setSpacing(5);\n container.getChildren().addAll(loginText, name, username, pwd, password, buttons);\n register.setOnMouseClicked(event -> navRegister());\n logIn.setOnMouseClicked(event -> handleLogin(login.checkLogin(username.getText(), password.getText())));\n }",
"private void initializeLoginStage() throws IOException{\n this.loginLoader= new FXMLLoader();\n this.loginLoader.setLocation(getClass().getResource(\"login.fxml\"));\n this.loginStage.setScene(new Scene(loginLoader.load()));\n this.loginStage.setResizable(false);\n ((LoginController)loginLoader.getController()).setStage(loginStage);\n }",
"@FXML\n private void initialize() {\n // Initialize the person table with the two columns.\n \t//ID.setText(user.getId());\n // password.setText(user.getPassword());\n \tshowLoginDetail(null);\n \n \n }",
"private void loginBD() {\n\t\t\r\n\t\tif(ConexionStatic.isDbConnected()){\r\n\t\t\ttry\r\n\t\t\t{ \r\n\t\t\t\t\r\n\t //chekar si el usuario escrbio el nombre de usuario y pw\r\n\t if (view.getTxtUser().getText().length() > 0 && view.getTxtPass().getText().length() > 0 )\r\n\t {\r\n\t \tmyUsuario.setPwd(view.getTxtPass().getText());\r\n\t \tmyUsuario.setUser(view.getTxtUser().getText());\r\n\t \tresultado=myUsuarioDao.setLogin(myUsuario);\r\n\t \t\r\n\t \tif(!resultado){//si el resultado el usuario en la bd no existe o el pwd\r\n\t \t\tJOptionPane.showMessageDialog(null, \"El nombre de usuario y/o contrasenia no son validos.\");\r\n\t //JOptionPane.showMessageDialog(null, view.getTxtUser().getText()+\" \" +view.getTxtPass().getText() );\r\n\t //view.getTxtUser().setText(\"\"); //limpiar campos\r\n\t view.getTxtPass().setText(\"\"); \r\n\t \r\n\t view.getTxtUser().requestFocusInWindow();\r\n\t \t}else{\r\n\t \t\tthis.view.setVisible(false);\r\n\t \t\tthis.view.dispose();\r\n\t \t\t\r\n\t \t}\r\n\t \t\r\n\t /*/ Si el usuario si fue validado correctamente\r\n\t if( validarUsuario( txtUser.getText(), txtPass.getText() ) ) //enviar datos a validar\r\n\t {\r\n\t // Codigo para mostrar la ventana principal\r\n\t setVisible(false);\r\n\t VentanaPrincipal ventana1 = new VentanaPrincipal();\r\n\t ventana1.mostrar();\r\n\t\r\n\t\r\n\t }\r\n\t else\r\n\t {\r\n\t JOptionPane.showMessageDialog(null, \"El nombre de usuario y/o contrasenia no son validos.\");\r\n\t JOptionPane.showMessageDialog(null, view.getTxtUser().getText()+\" \" +view.getTxtPass().getText() );\r\n\t view.getTxtUser().setText(\"\"); //limpiar campos\r\n\t view.getTxtPass().setText(\"\"); \r\n\t \r\n\t view.getTxtUser().requestFocusInWindow();\r\n\t }*/\r\n\t\r\n\t }\r\n\t else\r\n\t {\r\n\t JOptionPane.showMessageDialog(null, \"Debe escribir nombre de usuario y contrasenia.\\n\" +\r\n\t \"NO puede dejar ningun campo vacio\");\r\n\t }\r\n\t\r\n\t } catch (Exception e)\r\n\t {\r\n\t e.printStackTrace();\r\n\t }\r\n\t\t}//fin de la comprobacion de la conexion\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n public void start(Stage primaryStage) throws Exception \r\n {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/loginView.fxml\")); \r\n Scene scene = new Scene(root);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n }",
"private void iniciarLogin ()\n {\n\n try {\n //Se carga la pantalla y se introduce en el Stage\n Parent root = FXMLLoader.load(Partida.class.getResource(\"ui/fxml/ventanaAcceso.fxml\"));\n ventanaAct.setScene(new Scene(root));\n\n //Se muestra el stage una vez cargado\n ventanaAct.show();\n }\n catch (Exception e) {\n // Si existe algún error al cargar el fxml se indica y se cierra la aplicación\n Alert errorDeCarga = new Alert(Alert.AlertType.ERROR);\n errorDeCarga.setTitle(\"Error carga FXML\");\n errorDeCarga.setHeaderText(\"Error al cargar el archivo FXML: ui/fxml/ventanaAcceso.fxml\");\n errorDeCarga.setContentText(e.toString() + \"\\n\\nLa aplicación se cerrará\");\n errorDeCarga.setOnCloseRequest((handler) -> System.exit(-1));\n errorDeCarga.show();\n }\n }",
"private void login() {\r\n\r\n if (String.valueOf(login_usernameTextField.getText()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Username\");\r\n\r\n else if (String.valueOf(login_passwordField.getPassword()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Password\");\r\n\r\n else if (MainGUI.pimsSystem.staff_exists(login_usernameTextField.getText(), String.valueOf(login_passwordField.getPassword()))) {\r\n remove(loginPanel);\r\n add(tabbedPane);\r\n JOptionPane.showMessageDialog\r\n (null, \"Login Successful\");\r\n repaint();\r\n revalidate();\r\n\r\n // reset username and password fields\r\n login_usernameTextField.setText(\"\");\r\n login_passwordField.setText(\"\");\r\n\r\n } else\r\n JOptionPane.showMessageDialog\r\n (null, \"Invalid Password or Username\");\r\n }",
"private void login() {\n if (usrField.getText().equals(\"\") || passwordField.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n }\n\n //User.ID = userField.getText();\n User.ID = \"BPDB\";\n\n //User.password = passwordField.getText();\n\n User.password = \"BPDB\";\n\n\n //String sql = \"SELECT desig FROM BPDB.usr WHERE name = '\" + userField.getText() + \"',\"and\" +passwordField.getText() +\"'\";\n\n String sql = \"select desig from BPDB.usr where name='\" + usrField.getText()\n + \"' and password='\" + passwordField.getText() + \"'\";\n\n User.desig = Utility2.singleStOPQuery(login, sql);\n System.out.println(\"Designation : \" + User.desig);\n if (User.desig.isEmpty()) {\n\n\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n } else {\n\n sql = \"SELECT name FROM BPDB.usr WHERE name = '\" + usrField.getText() + \"'\";\n User.name = Utility2.singleStOPQuery(login, sql);\n\n if (User.desig.equalsIgnoreCase(\"BPDB\")) {\n setVisible(false);\n dispose();\n new HomeFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DRAFT\")) {\n setVisible(false);\n dispose();\n new DRAFTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"APPLY\")) {\n setVisible(false);\n dispose();\n new APPLYFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"HR\")) {\n setVisible(false);\n dispose();\n new HRFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"ADMIN\")) {\n setVisible(false);\n dispose();\n new ADMINFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"ACCOUNT\")) {\n setVisible(false);\n dispose();\n new ACCOUNTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SALARY\")) {\n setVisible(false);\n dispose();\n new SALARYFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"BILLING\")) {\n setVisible(false);\n dispose();\n new BILLINGFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"DISTRIBUTION\")) {\n setVisible(false);\n dispose();\n new DISTRIBUTIONFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GENERATION\")) {\n setVisible(false);\n dispose();\n new GENERATIONFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DHAKA\")) {\n setVisible(false);\n dispose();\n new DHAKAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"KHULNA\")) {\n setVisible(false);\n dispose();\n new KHULNAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"RAUJAN\")) {\n setVisible(false);\n dispose();\n new RAUJANFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SHIDDERGANJ\")) {\n setVisible(false);\n dispose();\n new SHIDDERGANJFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GRASHAL\")) {\n setVisible(false);\n dispose();\n new GRASHALFrame().setVisible(true);\n }\n }\n }",
"private void connected(){\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/ui/dashboard.fxml\"));\n Parent root ;\n try {\n root = loader.load();\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n DashboardController dashboardController = loader.getController();\n dashboardController.setData(loginManager.getFacadeManager());\n changeScene(root,\"Home\");\n }",
"Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }",
"private void proseslogin() {\n String user = username.getText();\n char[] pass = password.getPassword();\n \n if (user.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"Username Harus Diisi\");\n username.requestFocus();\n } else if (pass.length == 0){\n JOptionPane.showMessageDialog(this, \"Password Harus Diisi\");\n password.requestFocus();\n }else{\n String password = new String(pass);\n login.setEnabled(false);\n try {\n Connection conn = koneksi.sambungDB();\n Statement st = conn.createStatement();\n String n = \"SELECT * FROM tb_admin \"\n +\"WHERE admin_username='\"+user+\"' \"\n +\"AND admin_password=MD5('\"+password+\"')\" ;\n// System.out.println(q);\n ResultSet rs = st.executeQuery(n);\n if (rs.next()) {\n Data_perumahan h = new Data_perumahan();\n h.setExtendedState(Frame.MAXIMIZED_BOTH);\n this.setVisible(false);\n h.setVisible(true);\n }else{\n JOptionPane.showMessageDialog(this, \"Username dan Password Salah\");\n username.requestFocus();\n }\n login.setEnabled(true);\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Realm.init(this);\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n User user = MelteeRealm.getApp().currentUser();\n if(user != null && preferences.contains(\"username\")) {\n String username = preferences.getString(\"username\",\"\");\n Log.d(\"Meltee\", \"Automatically logging in as \" + username);\n goToMainActivity(new AuthUserDetails(user, username));\n }\n\n setContentView(R.layout.activity_login);\n loginViewModel = new ViewModelProvider(this, new LoginViewModelFactory())\n .get(LoginViewModel.class);\n\n final EditText usernameEditText = findViewById(R.id.username);\n final EditText passwordEditText = findViewById(R.id.password);\n final Button loginButton = findViewById(R.id.login);\n final Button registerButton = findViewById(R.id.register);\n final ProgressBar loadingProgressBar = findViewById(R.id.loading);\n\n loginViewModel.getLoginFormState().observe(this, loginFormState -> {\n if (loginFormState == null) {\n return;\n }\n boolean isDataValid = loginFormState.isDataValid();\n loginButton.setEnabled(isDataValid);\n registerButton.setEnabled(isDataValid);\n if (loginFormState.getUsernameError() != null) {\n usernameEditText.setError(getString(loginFormState.getUsernameError()));\n }\n if (loginFormState.getPasswordError() != null) {\n passwordEditText.setError(getString(loginFormState.getPasswordError()));\n }\n });\n\n loginViewModel.getLoginResult().observe(this, loginResult -> {\n if (loginResult == null) {\n return;\n }\n loadingProgressBar.setVisibility(View.GONE);\n if (loginResult.getError() != null) {\n showErrorToast(loginResult.getError());\n }\n if (loginResult.getSuccess() != null) {\n saveCredentials(preferences, loginResult.getSuccess().getDisplayName());\n showLoginToast(loginResult.getSuccess().getDisplayName());\n goToMainActivity(loginResult.getSuccess());\n }\n setResult(Activity.RESULT_OK);\n });\n\n loginViewModel.getRegisterResult().observe(this, registerResult -> {\n if(registerResult == null) {\n return;\n }\n loadingProgressBar.setVisibility(View.GONE);\n if(registerResult.getError() != null) {\n showErrorToast(registerResult.getError());\n }\n });\n\n TextWatcher afterTextChangedListener = new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n // ignore\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n // ignore\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n loginViewModel.loginDataChanged(usernameEditText.getText().toString(),\n passwordEditText.getText().toString());\n }\n };\n usernameEditText.addTextChangedListener(afterTextChangedListener);\n passwordEditText.addTextChangedListener(afterTextChangedListener);\n passwordEditText.setOnEditorActionListener((v, actionId, event) -> {\n if (actionId == EditorInfo.IME_ACTION_DONE) {\n loginViewModel.login(usernameEditText.getText().toString(),\n passwordEditText.getText().toString());\n }\n return false;\n });\n\n loginButton.setOnClickListener(v -> {\n loadingProgressBar.setVisibility(View.VISIBLE);\n loginViewModel.login(usernameEditText.getText().toString(),\n passwordEditText.getText().toString());\n });\n\n registerButton.setOnClickListener(v -> {\n loadingProgressBar.setVisibility(View.VISIBLE);\n loginViewModel.register(usernameEditText.getText().toString(),\n passwordEditText.getText().toString(), this);\n });\n\n if(preferences.contains(\"username\")) {\n usernameEditText.setText(preferences.getString(\"username\",\"\"));\n }\n }",
"public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}",
"@FXML\n void initialize() throws SQLException, ClassNotFoundException {\n assert idPaczkiTextField != null : \"fx:id=\\\"idPaczkiTextField\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n idPaczkiTextField.setDisable(false);\n assert szukajButton != null : \"fx:id=\\\"szukajButton\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n szukajButton.setDisable(false);\n assert wrocButton != null : \"fx:id=\\\"wrocButton\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert trackingTable != null : \"fx:id=\\\"trackingTable\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert idCol != null : \"fx:id=\\\"idCol\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert dataUtworzeniaCol != null : \"fx:id=\\\"dataUtworzeniaCol\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert dataNadaniaCol != null : \"fx:id=\\\"dataNadaniaCol\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert dataOdbioruCol != null : \"fx:id=\\\"dataOdbioruCol\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert statusCol != null : \"fx:id=\\\"statusCol\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n assert consoleTextArea != null : \"fx:id=\\\"consoleTextArea\\\" was not injected: check your FXML file 'pracownik/paczka.fxml'.\";\n\n\n/**\n * method used to bring the login and password from previous activity\n * @param login login\n * @param haslo password\n */\n\n }",
"@Override\r\n public void start(Stage primaryStage) {\r\n Login(primaryStage);\r\n }",
"private void checkLogin(String email, String password) {\n final Context ctx = getApplicationContext();\n\n processor.checkLoginCredentials(email, password, ctx, new FetchDataListener() {\n @Override\n public void onFetchComplete(JSONObject data) {\n Boolean resp = (Boolean) data.get(\"response\");\n if (resp) {\n // go to home page\n Intent goToHome = new Intent(ctx, MainActivity.class);\n goToHome.putExtra(\"user\", etEmail.getText().toString());\n goToHome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(goToHome);\n\n // finish prevents people from going back to login without logging out\n finish();\n } else {\n displayLoginError(\"Couldn't log in\");\n etEmail.setText(\"\");\n etPassword.setText(\"\");\n }\n }\n\n @Override\n public void onFetchFailure(String msg) {\n Log.d(TAG, msg);\n displayLoginError(\"Error connecting to server\");\n }\n\n @Override\n public void onFetchStart() {\n // do nothing\n }\n });\n\n }",
"public void loginBtnHandler(ActionEvent actionEvent)throws Exception {\n String userName = tfUserName.getText().trim().toLowerCase();\n String passWord = tfPassword.getText().trim().toLowerCase();\n boolean validInput = false;\n\n //check if username and password are valid\n for (int i=0; i< login.length; i++){\n if (userName.equals(login[i][0]) && passWord.equals(login[i][1])){\n validInput = true;\n break;\n }\n }\n\n if (validInput == true){\n Stage stage = new Stage();\n Parent root = FXMLLoader.load(getClass().getResource(\"ProductOverView.fxml\"));\n stage.setTitle(\"Main Screen\");\n Scene scene = new Scene (root);\n stage.setScene(scene);\n stage.show();\n\n ((Stage) ((Button) actionEvent.getSource()).getScene().getWindow()).close();\n } else {\n JOptionPane.showMessageDialog(null, String.format(\"Your user name or password is wrong.\\n\" +\n \" Please enter a valid user name and password\"), \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private void attemptLogin() {\n\n String username = mEmailView.getText().toString().trim();\n String idNumber = mIdNumber.getText().toString().trim();\n String password = mPasswordView.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n// usernameView.setError(errorMessageUsernameRequired);\n// errorView = usernameView;\n }\n\n if (TextUtils.isEmpty(password)) {\n// password.setError(errorMessagePasswordRequired);\n// if (errorView == null) {\n// errorView = passwordView;\n// }\n }\n\n final User user = new User();\n ((DealerManager)getApplication()).setUser(user);\n navigateTo(R.id.nav_home);\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\troot = new VBox(); // create vbox root pane\r\n\t\t\troot.setBackground(\r\n\t\t\t\t\tnew Background(new BackgroundFill(Color.WHITE, new CornerRadii(0), new Insets(0))));\r\n\t\t\tScene scene = new Scene(root,570,200); // set scene as vbox root pane\r\n\r\n\t\t\t/* top hbox pane and components --------------------------------------------------------------------------------------- */\r\n\t\t\t// set component with\r\n\t\t\tdouble upperComponentWidth = scene.getWidth()/5; // size for each component in top pane\r\n\r\n\t\t\t// email label:\r\n\t\t\tlblEmail = new Label(\"Email: \"); // create email label \r\n\t\t\tlblEmail.setPrefWidth(upperComponentWidth); // set email label width\r\n\t\t\tlblEmail.setPadding(new Insets(4, 0, 0, 0)); // set email label padding\r\n\t\t\tlblEmail.setAlignment(Pos.CENTER_LEFT); // set email label text alignment\r\n\r\n\t\t\t// email text field:\r\n\t\t\ttxfLoginEmail = new TextField(); // create email text field\r\n\t\t\ttxfLoginEmail.setPromptText(\"\\\"[email protected]\\\"\");\r\n\t\t\ttxfLoginEmail.setPrefWidth(upperComponentWidth); // set email text field width\r\n\r\n\t\t\t// password label:\r\n\t\t\tlblPassword = new Label(\"Password: \"); // create password label\r\n\t\t\tlblPassword.setPrefWidth(upperComponentWidth); // set password label width\r\n\t\t\tlblPassword.setPadding(new Insets(4, 0, 0, 0)); // set password label padding\r\n\t\t\tlblPassword.setAlignment(Pos.CENTER_LEFT); // set password label text alignment\r\n\r\n\t\t\t// password field:\r\n\t\t\tpwfLoginPassword = new PasswordField(); // create password text field\r\n\t\t\tpwfLoginPassword.setPrefWidth(upperComponentWidth); // set password text field width\r\n\r\n\t\t\t// login button:\r\n\t\t\tbtnLogin = new Button(\"Log In\"); // create login button\r\n\t\t\tbtnLogin.setPrefWidth(upperComponentWidth); // set login button width\r\n\t\t\tbtnLogin.setBackground(\r\n\t\t\t\t\tnew Background(new BackgroundFill(Color.ALICEBLUE, new CornerRadii(0), new Insets(0)))); // set login button colour ALICEBLUE\r\n\t\t\tbtnLogin.setOnMouseEntered( e-> buttonMouseEnter(btnLogin)); // set login button facebook blue with mouse hover\r\n\t\t\tbtnLogin.setOnMouseExited( e-> buttonMouseExit(btnLogin)); // set login button white with mouse hover\r\n\t\t\tbtnLogin.setOnAction( e-> loginButtonClick()); // call loginButtonClick() when login button clicked\r\n\r\n\t\t\t// top hbox pane\r\n\t\t\thbTop = new HBox(); // create top hbox pane\r\n\t\t\thbTop.setBorder(new Border(new BorderStroke(Color.BLACK, \r\n\t\t BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT))); // create border around top vbox pane\r\n\t\t\thbTop.getChildren().addAll(lblEmail, txfLoginEmail, lblPassword, pwfLoginPassword, btnLogin); // add components to top hbox\r\n\t\t\troot.getChildren().add(hbTop); // add top hbox to root vbox pane\r\n\r\n\t\t\t/* bottom hbox pane components ---------------------------------------------------------------------------------------- */\t\t\t\t\t\r\n\t\t\t// sign up vbox\r\n\t\t\tvbSignUp = new VBox(1);\r\n\t\t\tvbSignUp.setPrefWidth(126); // set signup vbox width 126\r\n\t\t\t\r\n\t\t\t// facebook image\r\n\t\t\tiv = new ImageView(getClass().getResource(\"facebook.png\").toExternalForm());\r\n\t\t\tfbImage = new Label(\"\", iv);\r\n\t\t\tfbImage.setPadding(new Insets(10, 42, 10, 42));\r\n\r\n\t\t\t// signup label\r\n\t\t\tlblSignUp = new Label(\"Sign Up\"); // create signup label\r\n\t\t\tlblSignUp.setPrefWidth(126); // set label width 126\r\n\t\t\tlblSignUp.setFont(Font.font(\"SanSerif\", FontWeight.BOLD, 18) ); // set signup label font properties\r\n\t\t\tlblSignUp.setBorder(new Border(new BorderStroke(Color.BLACK, \r\n\t\t BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT))); // create border around signup label\r\n\t\t\tvbSignUp.getChildren().add(lblSignUp); // add signup label to signup vbox pane\r\n\r\n\t\t\t// first name textfield\r\n\t\t\ttxfFName = new TextField(); // create first name textfield\r\n\t\t\ttxfFName.setPromptText(\"Enter First Name\");\r\n\t\t\tvbSignUp.getChildren().add(txfFName); // add first name textfield to signup vbox pane\r\n\t\t\t\r\n\t\t\t// surname textfield\r\n\t\t\ttxfSName = new TextField(); // create surname textfield\r\n\t\t\ttxfSName.setPromptText(\"Enter Surname\");\r\n\t\t\tvbSignUp.getChildren().add(txfSName); // add surname textfield to signup vbox pane\r\n\r\n\t\t\t// email textfield\r\n\t\t\ttxfEmail = new TextField(); // create email textfield\r\n\t\t\ttxfEmail.setPromptText(\"Enter Email Address\");\r\n\t\t\tvbSignUp.getChildren().add(txfEmail); // add email textfield to signup vbox pane\r\n\r\n\t\t\t// surname textfield\r\n\t\t\ttxfPassword = new TextField(); // create password textfield\r\n\t\t\ttxfPassword.setPromptText(\"Enter Password\");\r\n\t\t\tvbSignUp.getChildren().add(txfPassword); // add password textfield to signup vbox pane\r\n\t\t\t\r\n\t\t\t// signup button\r\n\t\t\tbtnSignUp = new Button(\"Sign Up\"); // create signup button\r\n\t\t\tbtnSignUp.setPrefWidth(Double.MAX_VALUE);\r\n\t\t\tbtnSignUp.setFont(Font.font(\"SanSerif\", FontWeight.BOLD, 18) ); // set signup label font properties\r\n\t\t\tbtnSignUp.setBackground(\r\n\t\t\t\t\tnew Background(new BackgroundFill(Color.ALICEBLUE, new CornerRadii(0), new Insets(0))));\r\n\t\t\tbtnSignUp.setOnMouseEntered( e-> buttonMouseEnter(btnSignUp)); // set signup button facebook blue with mouse hover\r\n\t\t\tbtnSignUp.setOnMouseExited( e-> buttonMouseExit(btnSignUp)); // set signup button white with mouse hover\r\n\t\t\tbtnSignUp.setOnAction( e-> signUpButtonClick()); // call signUpButtonClick() when signup button clicked\r\n\t\t\tvbSignUp.getChildren().add(btnSignUp); // add signup button to signup vbox pane\r\n\r\n\t\t\t// bottom hbox pane\r\n\t\t\thbBottom = new HBox(); // create bottom hbox pane\r\n\t\t\thbBottom.getChildren().addAll(fbImage, vbSignUp);//, txfLoginEmail, lblPassword, pwfLoginPassword, btnLogin); // add components to top hbox\r\n\t\t\troot.getChildren().add(hbBottom); // add top hbox to root vbox pane\r\n\r\n//\t\t\tprimaryStage.setResizable(false);\r\n\t\t\tprimaryStage.getIcons().add(new Image(this.getClass().getResource(\"fb-icon.png\").toString()));\r\n\t\t\tprimaryStage.setScene(scene);\r\n\t\t\tprimaryStage.setTitle(\"FACEBOOK\");\r\n\t\t\tprimaryStage.show();\r\n\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n public void start(Stage primaryStage) throws SQLException {\n daoUsers.makeAllInactive();\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/Login.fxml\"));\n Scene scene = new Scene(root);\n scene.getStylesheets().add(getClass().getResource(\"/view/app.css\").toExternalForm());\n primaryStage.setScene(scene);\n primaryStage.setTitle(\"Cryptocurrency Trader\");\n //primaryStage.getIcons().add(new Image(\"icon.jpg\"));\n primaryStage.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}",
"public String login() {\r\n FacesContext context = FacesContext.getCurrentInstance();\r\n HttpServletRequest request = (HttpServletRequest) context.getExternalContext().getRequest();\r\n System.out.println(\"Username: \" + email);\r\n System.out.println(\"Password: \" + password);\r\n try {\r\n //this method will actually check in the realm for the provided credentials\r\n request.login(this.email, this.password);\r\n\r\n } catch (ServletException e) {\r\n context.addMessage(null, new FacesMessage(\"Login failed.\"));\r\n return \"error\";\r\n }\r\n return \"/faces/users/index.xhtml\";\r\n }",
"@FXML\n\tpublic void buttonLogIn(ActionEvent event) throws IOException {\n\t\tFXMLLoader loginScreen = new FXMLLoader(getClass().getResource(\"login.fxml\"));\n\t\tloginScreen.setController(this);\n\t\tParent changeToLogin = loginScreen.load();\n\t\tmainPaneRegister.getChildren().setAll(changeToLogin);\n\t}",
"public void login(String email,String password) {\r\n\t\tthis.setChanged();\r\n\t\tthis.notifyObservers(STATE_LOGGING_IN);\r\n\t\tUser.server_login(email, password, new Callable()\r\n\t\t{\r\n\t\t\t@Override\r\n\t\t\tpublic void callback(final Object d) {\r\n\t\t\t\tif(d == null) {\r\n\t\t\t\t\tsetChanged();\r\n\t\t\t\t\tnotifyObservers(STATE_LOGIN_FAIL);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tsetChanged();\r\n\t\t\t\t\r\n\t\t\t\t// do some debug action after logged in\r\n\t\t\t\tServer.server_do_debug();\r\n\t\t\t\t\r\n\t\t\t\tnotifyObservers(STATE_LOGIN_SUCCESS);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t}",
"public void login(ActionEvent e) throws IOException {\r\n\t\t\r\n \tString username = loginuser.getText().trim();\r\n \t//if user is admin, change to userlist screen\r\n \tif (username.equals(\"admin\")) {\r\n \tPhotos.userlistscreen();\r\n \t} else {\r\n \t\tUser user = currentAdmin.findUser(username);\r\n \t\t//if user is found, log into that user and show the album view for that user specifically\r\n \t\tif (user!=null) {\r\n \t\t\tAlbumController.currentUser = (NonAdmin) user;\r\n \t\t\tCopyController.currentUser = (NonAdmin) user;\r\n \t\t\tMoveController.currentUser = (NonAdmin) user;\r\n \t\t\tPhotos.albumscreen(user);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n \t\t\talert.setTitle(\"Error\");\r\n \t\t\talert.setHeaderText(\"Invalid username\");\r\n \t\t\talert.setContentText(\"Please try again\");\r\n \t\t\talert.showAndWait();\r\n \t\t\tloginuser.setText(\"\");\r\n \t\t}\r\n \t}\r\n\t}",
"public JanelaLogin() {\n \t\n \tConexao c = new Conexao();\n \t\n \t\n initComponents();\n }",
"private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }",
"public static void LoginDirector() {\n SuperUI.clearScreen();\n int type = LoginScreen();\n\n try {\n\n Connection conn = ConnectToDatabase();\n if (type == 1) {\n SuperUI.clearScreen();\n Employee.EmployeeLogin();\n// if(employeePosition.equalsIgnoreCase(\"HR Manager\"))\n// {\n// type=4;\n// }\n } else if (type == 2) {\n Customer.CustomerLogin();\n }\n if (type == 3) {\n System.out.println(\"Goodbye\");\n System.exit(0);\n conn.close();\n }\n\n } catch (SQLException excpt) {\n System.out.println(excpt.getMessage());\n\n }\n\n }",
"public Login() {\n initComponents();\n KiemTraKN();\n }",
"public login() {\n initComponents();\n setTitle(\"COLLAGE MANAGEMENT SYSTEM\");\n }",
"private void loadLogin(){\n }",
"public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }",
"public HomePage loginValidCredentials (String email, String password){\n\n insertCredentials(email, password);\n submitInformation();\n\n return new HomePage(driver);\n }",
"private void loginButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginButtonMouseClicked\n //Make a default user object and bind the input data\n User loginUser;\n loginUser = new User(emailField.getText(), new String(passwordField.getPassword()));\n //Check hashed credentials against database\n //JEncryption encrypter = new JEncryption();\n //loginUser.setPswd(new String(encrypter.encrypt(loginUser.getPswd())));\n try\n {\n if(loginUser.login())\n {\n //If successful load the view\n //System.out.println(loginUser.toString());\n View v = new View(loginUser.getRole(), loginUser.getUserId());\n v.setVisible(true);\n this.setVisible(false);\n }\n //If not, pop out a login failed message\n else\n {\n JOptionPane.showMessageDialog(null, \"No user with that e-mail/password combination found.\");\n }\n }\n catch(DLException d)\n {\n JOptionPane.showMessageDialog(null, \"Connection Error. Please contact an administrator if the problem persists.\");\n }\n }",
"@Override\n public String logIn(){\n String email = getUserEmail();\n String password = getUserPassword();\n \n if (email.isEmpty() || password.isEmpty()){\n setDisplayError(Color.RED, \"Empty Credentials!\");\n }\n else { \n String sql = \"SELECT * FROM registered_user Where email = ? and password = ?\";\n \n try {\n preparedStatement = conn.prepareStatement(sql);\n preparedStatement.setString(1, email);//1 states that the 1st parameter is email\n preparedStatement.setString(2, password);//2 stated that the 2nd parameter is password\n resultSet = preparedStatement.executeQuery();\n \n if (!resultSet.next()) //If the rows doesn't exist\n setDisplayError(Color.RED, \"Incorrect Email or Password\");\n else{\n status = \"Success\";\n setDisplayError(Color.GREEN, \"Successfull login... Redirecting...\");\n } \n } catch (SQLException ex) {\n System.out.println(\"In the LoginController 1st try part \" + ex.getMessage());\n } finally {\n //closing the prepared statement to prevent the SQL injection\n try {\n if (preparedStatement != null ) {\n preparedStatement.close();\n conn.close();\n } \n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n status = \"Exception\";\n } \n \n //closing the connection\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n }\n }\n }\n \n return status; \n }",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }",
"@Override\n\tpublic void start(Stage primaryStage)\n\t{\t\n\t\tOptional<Pair<String, String>> result = (new LogonDialog(\"Logowanie\", \"Logowanie do systemu STYLEman\")).showAndWait();\n\t\t\n\t\tif(result.isPresent())\n\t\t{\n\t\t\tSystem.out.println(\"Zalogowano użytkownika: \" + result.get().getValue() + \" do srodowiska: \" + result.get().getKey());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Nie udalo sie zalogowac\");\n\t\t}\n\t}",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }"
] | [
"0.78168446",
"0.777821",
"0.75020856",
"0.74975103",
"0.7343664",
"0.7255635",
"0.7211919",
"0.7177466",
"0.7155178",
"0.71538424",
"0.7122923",
"0.71212476",
"0.7036312",
"0.70182425",
"0.6988038",
"0.69537663",
"0.6933301",
"0.68767184",
"0.6865218",
"0.6816497",
"0.668775",
"0.66727364",
"0.666549",
"0.6662845",
"0.66564906",
"0.664938",
"0.66485614",
"0.6644273",
"0.66220254",
"0.6612645",
"0.66115266",
"0.66092294",
"0.6607176",
"0.6606815",
"0.65993524",
"0.6581401",
"0.6578424",
"0.6577832",
"0.6569082",
"0.65674525",
"0.6559281",
"0.6541424",
"0.6530538",
"0.6496963",
"0.6488067",
"0.6477969",
"0.6470025",
"0.64565045",
"0.6454739",
"0.64506",
"0.6435874",
"0.6429098",
"0.64026386",
"0.6396332",
"0.6364554",
"0.6361286",
"0.63588923",
"0.6356263",
"0.63513774",
"0.63501996",
"0.634711",
"0.63372797",
"0.6322835",
"0.6320107",
"0.6319256",
"0.6316159",
"0.6315105",
"0.63073665",
"0.63043797",
"0.6304313",
"0.6296817",
"0.62900895",
"0.62800825",
"0.6280045",
"0.6273343",
"0.626907",
"0.62675184",
"0.62639314",
"0.62539464",
"0.6236364",
"0.623606",
"0.62277704",
"0.6222464",
"0.6219343",
"0.62101257",
"0.6207836",
"0.62053186",
"0.6196156",
"0.61908484",
"0.61869603",
"0.6167694",
"0.61444086",
"0.61296165",
"0.61270034",
"0.61109376",
"0.6095059",
"0.60911304",
"0.6084613",
"0.6083456",
"0.60828155"
] | 0.80282825 | 0 |
Indicate, that a new entry was found in the zipped input stream. The entry is closed by the caller after this method returns. | public void newZipEntry(ZipEntry zipEntry, InputStream inputStream); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ZipEntry processEntry( ZipFile zip, ZipEntry inputEntry ) throws IOException{\n /*\n First, some notes.\n On MRJ 2.2.2, getting the size, compressed size, and CRC32 from the\n ZipInputStream does not work for compressed (deflated) files. Those calls return -1.\n For uncompressed (stored) files, those calls do work.\n However, using ZipFile.getEntries() works for both compressed and \n uncompressed files.\n \n Now, from some simple testing I did, it seems that the value of CRC-32 is\n independent of the compression setting. So, it should be easy to pass this \n information on to the output entry.\n */\n String name = inputEntry .getName();\n if ( ! (inputEntry .isDirectory() || name .endsWith( \".class\" )) ) {\n try {\n InputStream input = zip.getInputStream( zip .getEntry( name ) );\n String className = ClassNameReader .getClassName( input );\n input .close();\n if ( className != null ) {\n name = className .replace( '.', '/' ) + \".class\";\n }\n } catch( IOException ioe ) {}\n }\n ZipEntry outputEntry = new ZipEntry( name );\n outputEntry.setTime(inputEntry .getTime() );\n outputEntry.setExtra(inputEntry.getExtra());\n outputEntry.setComment(inputEntry.getComment());\n outputEntry.setTime(inputEntry.getTime());\n if (compression){\n outputEntry.setMethod(ZipEntry.DEFLATED);\n //Note, don't need to specify size or crc for compressed files.\n } else {\n outputEntry.setMethod(ZipEntry.STORED);\n outputEntry.setCrc(inputEntry.getCrc());\n outputEntry.setSize(inputEntry.getSize());\n }\n return outputEntry;\n }",
"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 }",
"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 final ZipEntry getEntry()\n\t{\n\t\treturn entry_;\n\t}",
"public ZipArchiveEntry(final java.util.zip.ZipEntry entry) throws ZipException {\n super(entry);\n setName(entry.getName());\n final byte[] extra = entry.getExtra();\n if (extra != null) {\n setExtraFields(ExtraFieldUtils.parse(extra, true, ExtraFieldUtils.UnparseableExtraField.READ));\n } else {\n setExtra();\n }\n setMethod(entry.getMethod());\n this.size = entry.getSize();\n }",
"private void endEntry() {\n\t\tif (lastImageFile!=null) {\r\n\t\t\tSystem.out.println(\"Dealing with image file: \" + lastImageLumpName);\r\n\t\t\t//Add an entry for it\r\n\t\t\ttry {\r\n\t\t\t\tZipEntry dir = new ZipEntry(\"ohrrpgce/games/\" + newRPGName + \"/\" + lastImageLumpName);\r\n\t\t\t\t//System.out.println(\"Entry opened: \" + dir.getName());\r\n\t\t\t\ttempJar.putNextEntry(dir);\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.out.println(\"Error adding entry for image file: \" + lastImageLumpName);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Copy it.\r\n\t\t\ttry {\r\n\t\t\t\tBufferedInputStream in = new BufferedInputStream(new FileInputStream(lastImageFile));\r\n\t\t\t\tbyte[] lin = new byte[1024];\r\n\t\t\t\tint len = 0;\r\n\t\t\t\tfor(;;) {\r\n\t\t\t\t\tlen = in.read(lin);\r\n\t\t\t\t\tif (len <= 0)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\ttempJar.write(lin, 0, len);\r\n\t\t\t\t}\r\n\t\t\t\tin.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tSystem.out.println(\"Error copying raw image data: \" + ex.toString());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tlastImageFile.delete();\r\n\t\t\tlastImageFile=null;\r\n\t\t} \r\n\t\t\r\n\t\t//Close the entry\r\n\t\ttry {\r\n\t\t\t//System.out.println(\" + Entry closed\");\r\n\t\t\ttempJar.closeEntry();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"Error closing jar entry: \" + ex.toString());\r\n\t\t}\r\n\t}",
"public ZipArchiveEntry(final String name) {\n super(name);\n setName(name);\n }",
"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 connect() throws IOException {\r\n this.zipFile = new ZipFile(file);\r\n this.zipEntry = zipFile.getEntry(zipEntryName);\r\n if (zipEntry == null)\r\n throw new IOException(\"Entry \" + zipEntryName + \" not found in file \" + file);\r\n this.connected = true;\r\n }",
"long addEntry(DirectoryEntry newEntry) {\n // Unlink an entry from the free list (or add to the end of the existing\n // directory)\n long pos;\n if (freeEntries.size() > 0) {\n pos = freeEntries.get(0);\n freeEntries.remove(0);\n } else {\n pos = endOfEntries;\n endOfEntries += 32;\n }\n // Put the new entry into it's slot\n dirStream.position(pos);\n newEntry.writeTo(dirStream);\n // Update internal structures to reflect new entry (as if read from\n // disk)\n entries.put(pos, newEntry);\n handleAccessed(true);\n return pos;\n }",
"public void closeEntry() throws IOException {\n\t\tif ( this.assemLen > 0 ) {\n\t\t\tfor ( int i = this.assemLen ; i < this.assemBuf.length ; ++i )\n\t\t\t\tthis.assemBuf[i] = 0;\n\t\t\tthis.buffer.writeRecord( this.assemBuf );\n\t\t\tthis.currBytes += this.assemLen;\n\t\t\tthis.assemLen = 0;\n\t\t\t}\n\t\tif ( this.currBytes < this.currSize )\n\t\t\tthrow new IOException ( \"entry closed at '\" + this.currBytes + \"' before the '\" + this.currSize\n + \"' bytes specified in the header were written\" );\n\t\t}",
"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 final void entryRuleInputEntry() throws RecognitionException {\r\n try {\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:89:1: ( ruleInputEntry EOF )\r\n // ../sle.fsml.input.ui/src-gen/sle/fsml/input/ui/contentassist/antlr/internal/InternalInput.g:90:1: ruleInputEntry EOF\r\n {\r\n before(grammarAccess.getInputEntryRule()); \r\n pushFollow(FOLLOW_ruleInputEntry_in_entryRuleInputEntry121);\r\n ruleInputEntry();\r\n\r\n state._fsp--;\r\n\r\n after(grammarAccess.getInputEntryRule()); \r\n match(input,EOF,FOLLOW_EOF_in_entryRuleInputEntry128); \r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n }\r\n return ;\r\n }",
"public void modifyEntry() throws NoSuchElementException {\n\t\tPhoneEntry toBeModifiedEntry;\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\ttry {\n\t\t\ttoBeModifiedEntry = phoneList\n\t\t\t\t\t.stream()\n\t\t\t\t\t.filter(n -> n.getNumber() == entryNumber)\n\t\t\t\t\t.findFirst()\n\t\t\t\t\t.get();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tphoneList.remove(toBeModifiedEntry);\n\t\t\t\t\n\t\t\t\tSystem.out.print(\"Enter new number for \" + toBeModifiedEntry.getName() + \": \");\n\t\t\t\tint newEntryNumber = getInputForNumber();\n\t\t\t\t\n\t\t\t\tp = new PhoneEntry(toBeModifiedEntry.getName(), newEntryNumber);\n\t\t\t\tphoneList.add(p);\n\t\t\t\twriteFile();\n\t\t\t\tSystem.out.println(\"Entry \" + p.getName() + \" has been modified.\");\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"An error has occured while modifying the entry.\");\n\t\t\t}\n\t\t\t\n\t\t} catch (NoSuchElementException e) {\n\t\t\tSystem.out.println(\"This number does not exist.\");\n\t\t}\n\t\t\n\t}",
"JournalEntry read() throws IOException, InvalidJournalEntryException;",
"private void findEntry() {\n String desiredId = idField.getText();\n Student student = studentHashMap.get(desiredId);\n\n try {\n if (student == null) {\n throw new NoMatchFoundException();\n } else if (this.checkInput(student) == false) {\n throw new InputMismatchException();\n } else if (studentHashMap.containsKey(desiredId)) {\n this.displayStatusPanel(\n \"EMPLID: \" + desiredId + \"\\n\" + student.toString(),\n \"Find\",\n JOptionPane.INFORMATION_MESSAGE\n );\n } else {\n throw new NoMatchFoundException();\n }\n } catch(NoMatchFoundException ex) {\n this.displayStatusPanel(\n \"Error: Entry not found.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } catch(InputMismatchException e) {\n this.displayStatusPanel(\n \"Error: Information does not match data on file.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n }\n }",
"public void postEntry(Entry entry) {\n\t\tentries.addFirstElement(entry);\n\t}",
"public void moveEntry (String oldPath, String newPath) throws IOException\n\t{\n\t\tString alt = prepareLocation (oldPath);\n\t\tString neu = prepareLocation (newPath);\n\t\t\n\t\tArchiveEntry entry = getEntryByLocation (alt);\n\t\tif (entry == null)\n\t\t\tthrow new IOException (\"no such entry in archive\");\n\t\t\n\t\tboolean wasMain = mainEntries.contains (entry);\n\t\tentries.remove (alt);\n\t\t\n\t\tPath neuPath = zipfs.getPath (neu).normalize ();\n\t\tFiles.createDirectories (neuPath.getParent ());\n\t\tFiles.move (zipfs.getPath (alt).normalize (), neuPath,\n\t\t\tStandardCopyOption.ATOMIC_MOVE);\n\t\tArchiveEntry newEntry = new ArchiveEntry (this, neuPath,\n\t\t\tentry.getFormat ());\n\t\t\n\t\tentries.put (neu, newEntry);\n\t\tif (wasMain)\n\t\t{\n\t\t\taddMainEntry (newEntry);\n\t\t}\n\t\t\n\t\t// move meta data\n\t\tList<MetaDataObject> meta = entry.getDescriptions ();\n\t\tfor (MetaDataObject m : meta)\n\t\t{\n\t\t\tnewEntry.addDescription (m);\n\t\t}\n\t\t\n\t}",
"@Override\n synchronized public void addEntry(Entry e) throws RemoteException {\n if (this.map.containsKey(e.getHash())) {\n return;\n }\n //System.out.println(\"Mapper.addEntry() :: entry=\"+e.getHash()+\",\"+e.getLocation());\n this.map.put(e.getHash(), e.getLocation());\n printAct(\">added entry:\" + e.hash);\n }",
"void endEntry();",
"protected boolean keepEntry(ShapeEntry shapeEntry, Map<String, Object> data) {\n\t\treturn true;\n\t}",
"EntryNotFoundException() {\n super();\n }",
"public void in(food entry)\n\t{\n\t\titems.add(entry);\n\t}",
"public void addEntry(KantoDex entry)\n {\n if(entries.isEmpty())\n {\n entries.add(entry);\n }\n else\n {\n boolean notFound = true;\n for(KantoDex entryInit : entries)\n {\n if(entry.getDexNumInt() == entryInit.getDexNumInt())\n {\n System.out.println(\"Error: Attempted to add an entry that already exists, or should not exist.\");\n notFound = false;\n }\n }\n if(notFound)\n {\n entries.add(entry);\n }\n }\n }",
"public boolean accept(ZipEntry entry)\n {\n return super.accept(entry)\n && CommandLineTool.matches(entry.getName(), m_achPattern);\n }",
"public boolean addEntryInOrder(Entry newEntry)\n {\n if (this.isEmpty())\n {\n //if its empty, initializing as a new list won't hurt\n //catches slippery null lists\n entryList = new LinkedList<Entry>();\n entryList.add(newEntry);\n return true;\n }\n\n\n //current position in list\n int index = 0;\n //current word in list\n String current;\n //the word from the entry I'm adding, assumes its valid\n String newWord = newEntry.getWord();\n\n if (this.hasWord(newWord))\n {\n //the entry already exists\n return false;\n }\n\n while(index < entryList.size())\n {\n current = entryList.get(index).getWord();\n\n if (newWord.compareToIgnoreCase(current) < 0)\n {\n //the new word goes before the current word\n entryList.add(index, newEntry);\n return true;\n }\n else if (newWord.compareToIgnoreCase(current) == 0)\n {\n return false;\n //word already exists in database\n }\n //move on to the next one\n index++;\n\n }\n\n //if it comes after everything in the database\n entryList.add(newEntry);\n return true;//woohoo we did it\n\n }",
"private static void indexFromJarFile(InputStream in) throws IOException {\n\n\t\tZipInputStream zis = new ZipInputStream(in);\n\t\tZipEntry e;\n\n\t\twhile((e = zis.getNextEntry()) != null) {\n\n\t\t\tString name = e.getName();\n\t\t\tzis.closeEntry();\n\n\t\t\tif(name.contains(relationRepositoryPath) && name.endsWith(classExtension)) {\n\n\t\t\t\taddToIndex(name.replace(jarFileRelationRepositoryPath, \"\"));\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t}",
"public StringZipInputStream(InputStream out) {\n\t\tin = new BufferedInputStream(out);\n\t\treadingMap = new String[4096];\n\t\tfor (int charater = 0; charater < 256; charater++)\n\t\t\treadingMap[readingkeysCount++] = \"\" + (char) charater;\n\t\t// readingkeysCount = 256;\n\n\t}",
"public void newEntryZipcodes(String zipcode){\n open();\n ContentValues registro = new ContentValues();\n registro.put(Key_zipcode, zipcode);\n myDataBase.insert(nTZipcodes, null, registro);\n close();\n }",
"private void mergeZipJarContents( ZipOutputStream output, File f ) throws IOException {\n //Check to see that the file with name \"name\" exists.\n if ( ! f .exists() ) {\n return ;\n }\n ZipFile zipf = new ZipFile( f );\n Enumeration entries = zipf.entries();\n while (entries.hasMoreElements()){\n ZipEntry inputEntry = (ZipEntry) entries.nextElement();\n //Ignore manifest entries. They're bound to cause conflicts between\n //files that are being merged. User should supply their own\n //manifest file when doing the merge.\n String inputEntryName = inputEntry.getName();\n int index = inputEntryName.indexOf(\"META-INF\");\n if (index < 0){\n //META-INF not found in the name of the entry. Go ahead and process it.\n try {\n output.putNextEntry(processEntry(zipf, inputEntry));\n } catch (ZipException ex){\n //If we get here, it could be because we are trying to put a\n //directory entry that already exists.\n //For example, we're trying to write \"com\", but a previous\n //entry from another mergefile was called \"com\".\n //In that case, just ignore the error and go on to the\n //next entry.\n String mess = ex.getMessage();\n if (mess.indexOf(\"duplicate\") >= 0){\n //It was the duplicate entry.\n continue;\n } else {\n //I hate to admit it, but we don't know what happened here. Throw the Exception.\n throw ex;\n }\n }\n InputStream in = zipf.getInputStream(inputEntry);\n int len = buffer.length;\n int count = -1;\n while ((count = in.read(buffer, 0, len)) > 0){\n output.write(buffer, 0, count);\n }\n in.close();\n output.closeEntry();\n }\n }\n zipf .close();\n }",
"public void add(SearchItemIndividual si) {\r\n if (!archive.containsKey(si.toString())) {\r\n archive.put(si.toString(), (SearchItemIndividual)si.clone());\r\n }\r\n }",
"public ZipArchiveEntry(final ZipArchiveEntry entry) throws ZipException {\n this((java.util.zip.ZipEntry) entry);\n setInternalAttributes(entry.getInternalAttributes());\n setExternalAttributes(entry.getExternalAttributes());\n setExtraFields(getAllExtraFieldsNoCopy());\n setPlatform(entry.getPlatform());\n final GeneralPurposeBit other = entry.getGeneralPurposeBit();\n setGeneralPurposeBit(other == null ? null : (GeneralPurposeBit) other.clone());\n }",
"protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }",
"public void putNextEntry( TarEntry entry ) throws IOException {\n\t\tStringBuffer name = entry.getHeader().name;\n\t\tif ( ( entry.isUnixTarFormat() && name.length() > TarHeader.NAMELEN ) || ( ! entry.isUnixTarFormat()\n && name.length() > (TarHeader.NAMELEN + TarHeader.PREFIXLEN) )) { // Formata gore isim boyutu kontrolu yapar\n\t\t\tthrow new InvalidHeaderException( \"file name '\" + name + \"' is too long ( \" + name.length() + \" > \"\n + ( entry.isUnixTarFormat() ? TarHeader.NAMELEN : (TarHeader.NAMELEN + TarHeader.PREFIXLEN) ) + \" bytes )\" );\n\t\t\t}\n\t\tentry.writeEntryHeader( this.recordBuf ); // Basligi yazar\n\t\tthis.buffer.writeRecord( this.recordBuf ); // Kayiti yazar\n\t\tthis.currBytes = 0;\n\t\tif ( entry.isDirectory() )\n\t\t\tthis.currSize = 0;\n\t\telse\n\t\t\tthis.currSize = entry.getSize();\n\t\t}",
"public void testAddEntry() throws Exception {\n\t\tLOGGER.info(\"TestDictionay.testAddEntry(). Expect seven console ERRORs\");\n\t\tDictionaryLZW dict = new DictionaryLZW();\n\n\t\t// Test adding something that is already there. Should not happen.\n\t\tAssert.assertEquals(26, dict.size());\n\t\tdict.addEntry(\"T\");\n\t\tAssert.assertEquals(26, dict.size());\n\n\t\t// Test adding bad input.\n\t\tdict.addEntry(\"*\");\n\t\tAssert.assertEquals(26, dict.size());\n\t\tdict.addEntry(\"0\");\n\t\tAssert.assertEquals(26, dict.size());\n\t\tdict.addEntry(\"a\");\n\t\tAssert.assertEquals(26, dict.size());\n\t\tdict.addEntry(\"\");\n\t\tAssert.assertEquals(26, dict.size());\n\t\tdict.addEntry(null);\n\t\tAssert.assertEquals(26, dict.size());\n\t\tdict.addEntry(\"a T\");\n\t\tAssert.assertEquals(26, dict.size());\n\n\t\t// add a couple of valid ones.\n\t\tdict.addEntry(\"AT\");\n\t\tAssert.assertEquals(27, dict.size());\n\t\tdict.addEntry(\"AA\");\n\t\tAssert.assertEquals(27, dict.findEntry(\"AT\"));\n\t\tAssert.assertEquals(28, dict.findEntry(\"AA\"));\n\t}",
"private Map<String, List<ZipEntry>> parseLocalFileHeaderData(List<ZipEntry> entries) {\n /** Maps String to list of ZipEntrys, name -> actual entries. */\n Map<String, List<ZipEntry>> nameMap = new LinkedHashMap<>();\n\n for (ZipEntry entry : entries) {\n long offset = entry.getLocalHeaderOffset();\n archive.position(offset + ZipConstants.LOCNAM);\n\n // Gets the data offset of this entry.\n int fileNameLen = getShort();\n int extraFieldLen = getShort();\n long dataOffset = offset + ZipConstants.LOCEXT + ZipConstants.SHORT_BYTE_SIZE\n + fileNameLen + extraFieldLen;\n entry.setDataOffset(dataOffset);\n\n // Puts the entry into the nameMap.\n String name = entry.getName();\n List<ZipEntry> entriesWithTheSameName;\n if (nameMap.containsKey(name)) {\n entriesWithTheSameName = nameMap.get(name);\n } else {\n entriesWithTheSameName = new ArrayList<>();\n nameMap.put(name, entriesWithTheSameName);\n }\n entriesWithTheSameName.add(entry);\n }\n\n return nameMap;\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}",
"public void add(Entry entry) {\n File temp = null;\n String tag = entry.getTag();\n try {\n int flags = entry.getFlags();\n if ((flags & 1) == 0) {\n init();\n if (isTagEnabled(tag)) {\n long max = trimToFit();\n long lastTrim = System.currentTimeMillis();\n byte[] buffer = new byte[this.mBlockSize];\n InputStream input = entry.getInputStream();\n int read = 0;\n while (read < buffer.length) {\n int n = input.read(buffer, read, buffer.length - read);\n if (n <= 0) {\n break;\n }\n read += n;\n }\n File file = this.mDropBoxDir;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"drop\");\n long max2 = max;\n stringBuilder.append(Thread.currentThread().getId());\n stringBuilder.append(\".tmp\");\n temp = new File(file, stringBuilder.toString());\n int bufferSize = this.mBlockSize;\n if (bufferSize > 4096) {\n bufferSize = 4096;\n }\n if (bufferSize < 512) {\n bufferSize = 512;\n }\n FileOutputStream foutput = new FileOutputStream(temp);\n OutputStream output = new BufferedOutputStream(foutput, bufferSize);\n if (read == buffer.length && (flags & 4) == 0) {\n output = new GZIPOutputStream(output);\n flags |= 4;\n }\n while (true) {\n long lastTrim2;\n output.write(buffer, 0, read);\n long now = System.currentTimeMillis();\n if (now - lastTrim > 30000) {\n long j = now;\n lastTrim = trimToFit();\n lastTrim2 = j;\n } else {\n lastTrim2 = lastTrim;\n lastTrim = max2;\n }\n read = input.read(buffer);\n if (read <= 0) {\n FileUtils.sync(foutput);\n output.close();\n output = null;\n } else {\n output.flush();\n }\n if (temp.length() > lastTrim) {\n String str = TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"Dropping: \");\n stringBuilder2.append(tag);\n stringBuilder2.append(\" (\");\n stringBuilder2.append(temp.length());\n stringBuilder2.append(\" > \");\n stringBuilder2.append(lastTrim);\n stringBuilder2.append(\" bytes)\");\n Slog.w(str, stringBuilder2.toString());\n temp.delete();\n temp = null;\n break;\n }\n int bufferSize2 = bufferSize;\n FileOutputStream foutput2 = foutput;\n if (read <= 0) {\n break;\n }\n int i = flags;\n max2 = lastTrim;\n lastTrim = lastTrim2;\n bufferSize = bufferSize2;\n foutput = foutput2;\n }\n if (temp != null) {\n FileUtils.setPermissions(temp, 432, -1, -1);\n }\n max = createEntry(temp, tag, flags);\n temp = null;\n Intent dropboxIntent = new Intent(\"android.intent.action.DROPBOX_ENTRY_ADDED\");\n dropboxIntent.putExtra(\"tag\", tag);\n dropboxIntent.putExtra(\"time\", max);\n if (!this.mBooted) {\n dropboxIntent.addFlags(1073741824);\n }\n this.mHandler.sendMessage(this.mHandler.obtainMessage(1, dropboxIntent));\n IoUtils.closeQuietly(output);\n IoUtils.closeQuietly(input);\n entry.close();\n } else {\n IoUtils.closeQuietly(null);\n IoUtils.closeQuietly(null);\n entry.close();\n if (temp != null) {\n temp.delete();\n }\n return;\n }\n }\n throw new IllegalArgumentException();\n } catch (IOException e) {\n String str2 = TAG;\n StringBuilder stringBuilder3 = new StringBuilder();\n stringBuilder3.append(\"Can't write: \");\n stringBuilder3.append(tag);\n Slog.e(str2, stringBuilder3.toString(), e);\n IoUtils.closeQuietly(null);\n IoUtils.closeQuietly(null);\n entry.close();\n } catch (Throwable th) {\n IoUtils.closeQuietly(null);\n IoUtils.closeQuietly(null);\n entry.close();\n if (temp != null) {\n temp.delete();\n }\n }\n }",
"void onEntryAdded(Entry entry);",
"public static ZipEntries from(byte[] zip, Predicate<String> entryNameMatcher, int maxEntrySizeInBytes, boolean throwIfEntryExceedsMaxSize) {\n\n Options options = Options.standard()\n .pathPredicate(entryNameMatcher)\n .maxSize(2 * (long) Math.pow(1024, 3)) // 2 GB\n .maxEntrySize(maxEntrySizeInBytes)\n .maxEntries(1024)\n .truncateEntry(!throwIfEntryExceedsMaxSize);\n List<ZipEntryWithContent> entries = new ArrayList<>();\n try (ArchiveStreamReader reader = ArchiveStreamReader.ofZip(new ByteArrayInputStream(zip), options)) {\n ArchiveFile file;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n while ((file = reader.readNextTo(baos)) != null) {\n entries.add(new ZipEntryWithContent(file.path().toString(),\n Optional.of(baos.toByteArray()).filter(b -> b.length > 0),\n file.size()));\n baos.reset();\n }\n }\n return new ZipEntries(entries);\n }",
"public boolean addEntry(AddressEntry addressEntry) {\n return this.entrySet.add(addressEntry);\n }",
"public Boolean addEntry(NameSurferEntry entry) {\r\n\t\tint index = indexOfNameSurfer(entry.getName());\r\n\t\t/* Prevent from adding a same name multiple times */\r\n\t\tif(index < 0) {\r\n\t\t\tnameInGraph.add(entry);\r\n\t\t\tnameColor.add(generateColor());\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private void readLOC() throws java.io.IOException {\n byte locbuf[] = new byte[LOCHDR];\n ZipFile zf = this.zf;\n ZipEntry ze = this.ze;\n long offset = ze.getOffset();\n if (TRACE)\n System.out.println(this +\": reading LOC, offset=\" + offset);\n zf.read(offset, locbuf, 0, LOCHDR);\n if (ZipFile.get32(locbuf, 0) != LOCSIG) {\n throw new java.util.zip.ZipException(\n \"invalid LOC header signature\");\n }\n // Get length and position of entry data\n long count = ze.getCompressedSize();\n this.count = count;\n if (TRACE)\n System.out.println(this +\": count=\" + count);\n long pos =\n ze.getOffset()\n + LOCHDR\n + ZipFile.get16(locbuf, LOCNAM)\n + ZipFile.get16(locbuf, LOCEXT);\n this.pos = pos;\n if (TRACE)\n System.out.println(this +\": pos=\" + pos);\n long cenpos = zf.cenpos;\n if (TRACE)\n System.out.println(this +\": cenpos=\" + cenpos);\n if (pos + count > cenpos) {\n throw new java.util.zip.ZipException(\n \"invalid LOC header format\");\n }\n }",
"private static void recoverEntries(\n File file, RandomAccessFile access,\n LinkedHashMap<UUID, byte[]> entries) throws IOException {\n byte[] header = new byte[BLOCK_SIZE];\n while (access.getFilePointer() + BLOCK_SIZE <= access.length()) {\n // read the tar header block\n access.readFully(header);\n\n // compute the header checksum\n int sum = 0;\n for (int i = 0; i < BLOCK_SIZE; i++) {\n sum += header[i] & 0xff;\n }\n\n // identify possible zero block\n if (sum == 0 && access.getFilePointer() + 2 * BLOCK_SIZE == access.length()) {\n return; // found the zero blocks at the end of the file\n }\n\n // replace the actual stored checksum with spaces for comparison\n for (int i = 148; i < 148 + 8; i++) {\n sum -= header[i] & 0xff;\n sum += ' ';\n }\n\n byte[] checkbytes = String.format(\"%06o\\0 \", sum).getBytes(UTF_8);\n for (int i = 0; i < checkbytes.length; i++) {\n if (checkbytes[i] != header[148 + i]) {\n log.warn(\"Invalid entry checksum at offset {} in tar file {}, skipping...\",\n access.getFilePointer() - BLOCK_SIZE, file);\n continue;\n }\n }\n\n // The header checksum passes, so read the entry name and size\n ByteBuffer buffer = ByteBuffer.wrap(header);\n String name = readString(buffer, 100);\n buffer.position(124);\n int size = readNumber(buffer, 12);\n if (access.getFilePointer() + size > access.length()) {\n // checksum was correct, so the size field should be accurate\n log.warn(\"Partial entry {} in tar file {}, ignoring...\", name, file);\n return;\n }\n\n Matcher matcher = NAME_PATTERN.matcher(name);\n if (matcher.matches()) {\n UUID id = UUID.fromString(matcher.group(1));\n\n String checksum = matcher.group(3);\n if (checksum != null || !entries.containsKey(id)) {\n byte[] data = new byte[size];\n access.readFully(data);\n\n // skip possible padding to stay at block boundaries\n long position = access.getFilePointer();\n long remainder = position % BLOCK_SIZE;\n if (remainder != 0) {\n access.seek(position + (BLOCK_SIZE - remainder));\n }\n\n if (checksum != null) {\n CRC32 crc = new CRC32();\n crc.update(data);\n if (crc.getValue() != Long.parseLong(checksum, 16)) {\n log.warn(\"Checksum mismatch in entry {} of tar file {}, skipping...\",\n name, file);\n continue;\n }\n }\n\n entries.put(id, data);\n }\n } else if (!name.equals(file.getName() + \".idx\")) {\n log.warn(\"Unexpected entry {} in tar file {}, skipping...\",\n name, file);\n long position = access.getFilePointer() + size;\n long remainder = position % BLOCK_SIZE;\n if (remainder != 0) {\n position += BLOCK_SIZE - remainder;\n }\n access.seek(position);\n }\n }\n }",
"public static void main(String[] args) throws Exception {\r\n ZipDatabase zipDB = new ZipDatabase();\r\n\r\n BufferedReader br = \r\n new BufferedReader(new InputStreamReader(System.in));\r\n while (true) {\r\n System.out.print(\"Enter zip: \");\r\n String zip = br.readLine();\r\n System.out.println(\"Input: \" + zip);\r\n\r\n ZipInfo info = zipDB.lookup(zip);\r\n System.out.println(\"Output: \" + info);\r\n }\r\n }",
"SIEntry(final Context<BTree, BTreeLeaf> context, java.nio.ByteBuffer stream)\n\t\tthrows\n\t\t\tjava.io.IOException\n\t\t{\n\t\t\tDataContainer dc = new DataContainer();\n\t\t\tdc.read(stream, context.unicode() ? unicode_fields : ansi_fields);\n\n\t\t\tnid = (NID)dc.get(nm_nid);\n\t\t\tbid = (BID)dc.get(nm_bid);\n\t\t}",
"public void deleteEntry() throws NoSuchElementException {\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\ttry {\n\t\t\tPhoneEntry toBeDeletedEntry = phoneList\n\t\t\t\t\t.stream()\n\t\t\t\t\t.filter(n -> n.getNumber() == entryNumber)\n\t\t\t\t\t.findFirst()\n\t\t\t\t\t.get();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tphoneList.remove(toBeDeletedEntry);\n\t\t\t\twriteFile();\n\t\t\t\tSystem.out.println(\"Entry \" + toBeDeletedEntry.getName() + \" has been removed.\");\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(\"An error occured while removing the contact.\");\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"This number does not exist.\");\n\t\t}\n\t\t\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 ZipArchiveEntry(final File inputFile, final String entryName) {\n this(inputFile.isDirectory() && !entryName.endsWith(\"/\") ? entryName + \"/\" : entryName);\n if (inputFile.isFile()) {\n setSize(inputFile.length());\n }\n setTime(inputFile.lastModified());\n }",
"public final void entryRuleEntry() throws RecognitionException {\n try {\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:62:1: ( ruleEntry EOF )\n // ../org.eclipse.ese.android.dsl.ui/src-gen/org/eclipse/ese/ui/contentassist/antlr/internal/InternalAndroid.g:63:1: ruleEntry EOF\n {\n before(grammarAccess.getEntryRule()); \n pushFollow(FollowSets000.FOLLOW_ruleEntry_in_entryRuleEntry61);\n ruleEntry();\n _fsp--;\n\n after(grammarAccess.getEntryRule()); \n match(input,EOF,FollowSets000.FOLLOW_EOF_in_entryRuleEntry68); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"public ZipInfo lookup(String zipcode) {\r\n return (ZipInfo) zipDB.get(zipcode);\r\n }",
"public void push(T newEntry) {\n\t\tcheckInitialization();\n\t\tvector.addElement(newEntry);\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 addAsFirstExtraField(final ZipExtraField ze) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4c28d4a6-8986-40c6-b210-d044aab8251a\");\n if (ze instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3d9f9c08-e83a-436a-a8e6-86f86bd970af\");\n unparseableExtra = (UnparseableExtraFieldData) ze;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c35acbb6-3608-4438-9a3b-2e13d04a75a3\");\n if (getExtraField(ze.getHeaderId()) != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"11874c15-028a-440f-8a51-54f6de7d8834\");\n removeExtraField(ze.getHeaderId());\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"1eda37ab-9698-47a7-98da-b090770a9fd5\");\n final ZipExtraField[] copy = extraFields;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"52861454-df58-45a4-a4ea-fadccf33506e\");\n final int newLen = extraFields != null ? extraFields.length + 1 : 1;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"bd7052b3-7eb3-4bec-8203-290549716189\");\n extraFields = new ZipExtraField[newLen];\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"f4f61f84-b9ec-4ec0-b697-37d032a7a8fb\");\n extraFields[0] = ze;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"86004d7e-add5-4495-b688-e71892b6f3ee\");\n if (copy != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"4e30f42c-8c61-4810-b892-2d8b24ce71f8\");\n System.arraycopy(copy, 0, extraFields, 1, extraFields.length - 1);\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"74b18f9f-5af2-497f-a1b9-1aaa00af7a4f\");\n setExtra();\n }",
"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 deleteEntry() {\n String desiredId = idField.getText();\n Student student = studentHashMap.get(desiredId);\n\n try {\n if (student == null) {\n throw new NoMatchFoundException();\n } else if (this.checkInput(student) == false) {\n throw new InputMismatchException();\n } else if (studentHashMap.containsKey(desiredId)) {\n studentHashMap.remove(desiredId);\n this.displayStatusPanel(\n \"Success: \" + student.getName() + \" removed.\",\n \"Success\",\n JOptionPane.INFORMATION_MESSAGE\n );\n } else {\n throw new NoMatchFoundException();\n }\n } catch(NoMatchFoundException ex) {\n this.displayStatusPanel(\n \"Error: Entry not found.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n } catch(InputMismatchException e) {\n this.displayStatusPanel(\n \"Error: Information does not match data on file.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n }\n }",
"public ArchiveEntry addEntry (File toInsert, String targetName, URI format,\n\t\tboolean mainEntry) throws IOException\n\t{\n\t\ttargetName = prepareLocation (targetName);\n\t\t\n\t\tif (targetName.equals (MANIFEST_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + MANIFEST_LOCATION);\n\t\t\n\t\tif (targetName.equals (METADATA_LOCATION))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file \" + METADATA_LOCATION);\n\t\t\n\t\t// we also do not allow files with names like metadata-[0-9]*.rdf\n\t\tif (targetName.matches (\"^/metadata-[0-9]*\\\\.rdf$\"))\n\t\t\tthrow new IllegalArgumentException (\n\t\t\t\t\"it's not allowed to name a file like metadata-[0-9]*.rdf\");\n\t\t\n\t\t// insert to zip\n\t\tPath insertPath = zipfs.getPath (targetName).normalize ();\n\t\tFiles.createDirectories (insertPath.getParent ());\n\t\tFiles.copy (toInsert.toPath (), insertPath, Utils.COPY_OPTION);\n\t\t\n\t\tArchiveEntry entry = new ArchiveEntry (this, insertPath, format);\n\t\tentries.put (entry.getFilePath (), entry);\n\t\t\n\t\tif (mainEntry)\n\t\t{\n\t\t\tLOGGER.debug (\"setting main entry:\");\n\t\t\taddMainEntry (entry);\n\t\t}\n\t\t\n\t\treturn entry;\n\t}",
"public final TarEntry GetNextEntry()\n\t{\n\t\tif (hasHitEOF)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\tif (currentEntry != null)\n\t\t{\n\t\t\tSkipToNextEntry();\n\t\t}\n\n//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:\n//ORIGINAL LINE: byte[] headerBuf = tarBuffer.ReadBlock();\n\t\tbyte[] headerBuf = tarBuffer.ReadBlock();\n\n\t\tif (headerBuf == null)\n\t\t{\n\t\t\thasHitEOF = true;\n\t\t}\n\t\telse if (TarBuffer.IsEndOfArchiveBlock(headerBuf))\n\t\t{\n\t\t\thasHitEOF = true;\n\t\t}\n\n\t\tif (hasHitEOF)\n\t\t{\n\t\t\tcurrentEntry = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tTarHeader header = new TarHeader();\n\t\t\t\theader.ParseBuffer(headerBuf);\n\t\t\t\tif (!header.getIsChecksumValid())\n\t\t\t\t{\n\t\t\t\t\tthrow new TarException(\"Header checksum is invalid\");\n\t\t\t\t}\n\t\t\t\tthis.entryOffset = 0;\n\t\t\t\tthis.entrySize = header.getSize();\n\n\t\t\t\tStringBuilder longName = null;\n\n\t\t\t\tif (header.getTypeFlag() == TarHeader.LF_GNU_LONGNAME)\n\t\t\t\t{\n\n//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:\n//ORIGINAL LINE: byte[] nameBuffer = new byte[TarBuffer.BlockSize];\n\t\t\t\t\tbyte[] nameBuffer = new byte[TarBuffer.BlockSize];\n\t\t\t\t\tlong numToRead = this.entrySize;\n\n\t\t\t\t\tlongName = new StringBuilder();\n\n\t\t\t\t\twhile (numToRead > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint numRead = this.Read(nameBuffer, 0, (numToRead > nameBuffer.length ? nameBuffer.length : (int)numToRead));\n\n\t\t\t\t\t\tif (numRead == -1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new InvalidHeaderException(\"Failed to read long name entry\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlongName.append(TarHeader.ParseName(nameBuffer, 0, numRead).toString());\n\t\t\t\t\t\tnumToRead -= numRead;\n\t\t\t\t\t}\n\n\t\t\t\t\tSkipToNextEntry();\n\t\t\t\t\theaderBuf = this.tarBuffer.ReadBlock();\n\t\t\t\t}\n\t\t\t\telse if (header.getTypeFlag() == TarHeader.LF_GHDR)\n\t\t\t\t{ // POSIX global extended header\n\t\t\t\t\t// Ignore things we dont understand completely for now\n\t\t\t\t\tSkipToNextEntry();\n\t\t\t\t\theaderBuf = this.tarBuffer.ReadBlock();\n\t\t\t\t}\n\t\t\t\telse if (header.getTypeFlag() == TarHeader.LF_XHDR)\n\t\t\t\t{ // POSIX extended header\n\t\t\t\t\t// Ignore things we dont understand completely for now\n\t\t\t\t\tSkipToNextEntry();\n\t\t\t\t\theaderBuf = this.tarBuffer.ReadBlock();\n\t\t\t\t}\n\t\t\t\telse if (header.getTypeFlag() == TarHeader.LF_GNU_VOLHDR)\n\t\t\t\t{\n\t\t\t\t\t// TODO: could show volume name when verbose\n\t\t\t\t\tSkipToNextEntry();\n\t\t\t\t\theaderBuf = this.tarBuffer.ReadBlock();\n\t\t\t\t}\n\t\t\t\telse if (header.getTypeFlag() != TarHeader.LF_NORMAL && header.getTypeFlag() != TarHeader.LF_OLDNORM && header.getTypeFlag() != TarHeader.LF_DIR)\n\t\t\t\t{\n\t\t\t\t\t// Ignore things we dont understand completely for now\n\t\t\t\t\tSkipToNextEntry();\n\t\t\t\t\theaderBuf = tarBuffer.ReadBlock();\n\t\t\t\t}\n\n\t\t\t\tif (entryFactory == null)\n\t\t\t\t{\n\t\t\t\t\tcurrentEntry = new TarEntry(headerBuf);\n\t\t\t\t\tif (longName != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tcurrentEntry.setName(longName.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcurrentEntry = entryFactory.CreateEntry(headerBuf);\n\t\t\t\t}\n\n\t\t\t\t// Magic was checked here for 'ustar' but there are multiple valid possibilities\n\t\t\t\t// so this is not done anymore.\n\n\t\t\t\tentryOffset = 0;\n\n\t\t\t\t// TODO: Review How do we resolve this discrepancy?!\n\t\t\t\tentrySize = this.currentEntry.getSize();\n\t\t\t}\n\t\t\tcatch (InvalidHeaderException ex)\n\t\t\t{\n\t\t\t\tentrySize = 0;\n\t\t\t\tentryOffset = 0;\n\t\t\t\tcurrentEntry = null;\n\t\t\t\tString errorText = String.format(\"Bad header in record %1$s block %2$s %3$s\", tarBuffer.getCurrentRecord(), tarBuffer.getCurrentBlock(), ex.getMessage());\n\t\t\t\tthrow new InvalidHeaderException(errorText);\n\t\t\t}\n\t\t}\n\t\treturn currentEntry;\n\t}",
"public boolean add(T newEntry);",
"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}",
"public void extract(List<? extends SuSiFile.Entry> in);",
"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 }",
"private ZipEntry getEntry(JarFile jarFile, String dir) {\n if (!dir.endsWith(\"/\")) {\n dir = dir + '/';\n }\n return jarFile.getEntry(dir + getConfigFilename(key));\n }",
"boolean appendEntry(final LogEntry entry);",
"void scanafter() {\n\t\tint oldline, newline;\n\n\t\tfor (newline = 0; newline <= newinfo.maxLine; newline++) {\n\t\t\toldline = newinfo.other[newline];\n\t\t\tif (oldline >= 0) { /* is unique in old & new */\n\t\t\t\tfor (;;) { /* scan after there in both files */\n\t\t\t\t\tif (++oldline > oldinfo.maxLine)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (oldinfo.other[oldline] >= 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (++newline > newinfo.maxLine)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tif (newinfo.other[newline] >= 0)\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * oldline & newline exist, and aren't already matched\n\t\t\t\t\t */\n\n\t\t\t\t\tif (newinfo.symbol[newline] != oldinfo.symbol[oldline])\n\t\t\t\t\t\tbreak; // not same\n\n\t\t\t\t\tnewinfo.other[newline] = oldline; // record a match\n\t\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void addNewEntry(Entry entry) {\n \tboolean showToasts = Settings.getToastsSetting(getApplicationContext());\n \t\n// \tContentResolver cr = getContentResolver();\n// \t\n// \t// Insert the new entry into the provider\n// \tContentValues values = new ContentValues();\n// \t\n// \tvalues.put(WaterProvider.KEY_DATE, _entry.getDate());\n// \tvalues.put(WaterProvider.KEY_AMOUNT, _entry.getMetricAmount());\n// \t\n// \tcr.insert(WaterProvider.CONTENT_URI, values);\n \tmWaterDB.addNewEntry(getContentResolver(), entry);\n \t\n \t// Make a toast displaying add complete\n \tint unitsPref = Settings.getUnitSystem(this);\n \tdouble displayAmount = entry.getNonMetricAmount();\n \tString displayUnits = getString(R.string.unit_fl_oz);\n \tif (unitsPref == Settings.UNITS_METRIC) {\n \t\tdisplayUnits = getString(R.string.unit_mililiters);\n \t\tdisplayAmount = entry.getMetricAmount();\n \t}\n \tString toastMsg = String.format(\"Added %.1f %s\", displayAmount, displayUnits);\n \tToast toast = Toast.makeText(getApplicationContext(), toastMsg, Toast.LENGTH_SHORT);\n \ttoast.setGravity(Gravity.BOTTOM, 0, 0);\n \tif (showToasts)\n \t\ttoast.show();\n \t\n \t// If user wants a reminder when to drink next,\n \t// setup a notification X minutes away from this entry\n \t// where X is also a setting\n \tif (Settings.getReminderEnabled(this) && mIsHistorical == false) {\n \t\t// Get the AlarmManager services\n\t\t\tAlarmManager am = (AlarmManager) getSystemService(ALARM_SERVICE);\n\t\t\t\n\t\t\t// create the calendar object\n\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t// add X minutes to the calendar object\n\t\t\tcal.add(Calendar.MINUTE, Settings.getReminderInterval(this));\n\t\t\t\n\t\t\t// cancel existing alarm if any, this way latest\n\t\t\t// alarm will be the only one to notify user\n\t\t\tIntent cancelIntent = new Intent(this, AlarmReceiver.class);\n\t\t\tPendingIntent cancelSender = PendingIntent.getBroadcast(this, 0, cancelIntent, 0);\n\t\t\tam.cancel(cancelSender);\n\t\t\t\n\t\t\t// set up the new alarm\n\t\t\tIntent intent = new Intent(this, AlarmReceiver.class);\n\t\t\tintent.putExtra(\"entryDate\", entry.getDate());\n\t\t\tPendingIntent sender = PendingIntent.getBroadcast(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n\t\t\tam.set(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(), sender);\n \t}\n }",
"public synchronized boolean recordArtifact( TrackedContentEntry entry )\n throws FoloContentException,IndyWorkflowException\n {\n if ( sealedRecordCache.containsKey( entry.getTrackingKey() ) )\n {\n throw new FoloContentException( \"Tracking record: {} is already sealed!\" );\n }\n\n if ( !inProgressRecordCache.containsKey( entry ) )\n {\n inProgressRecordCache.put( entry, entry );\n return true;\n }\n return false;\n }",
"private LogData readEntry(FileHandle fh, long address)\n throws IOException {\n ByteBuffer o = fh.getMapForRegion(64, (int) fh.getChannel().size());\n while (o.hasRemaining()) {\n short magic = o.getShort();\n if (magic != 0x4C45) {\n return null;\n }\n short flags = o.getShort();\n long addr = o.getLong();\n if (address == -1) {\n //Todo(Maithem) : maybe we can move this to getChannelForAddress\n fh.knownAddresses.add(addr);\n }\n int size = o.getInt();\n if (addr != address) {\n o.position(o.position() + size - 16); //skip over (size-20 is what we haven't read).\n log.trace(\"Read address {}, not match {}, skipping. (remain={})\", addr, address, o.remaining());\n } else {\n log.debug(\"Entry at {} hit, reading (size={}).\", address, size);\n if (flags % 2 == 0) {\n log.error(\"Read a log entry but the write was torn, aborting!\");\n throw new IOException(\"Torn write detected!\");\n }\n int metadataMapSize = o.getInt();\n ByteBuf mBuf = Unpooled.wrappedBuffer(o.slice());\n o.position(o.position() + metadataMapSize);\n ByteBuffer dBuf = o.slice();\n dBuf.limit(size - metadataMapSize - 24);\n return new LogData(Unpooled.wrappedBuffer(dBuf),\n ICorfuPayload.enumMapFromBuffer(mBuf, IMetadata.LogUnitMetadataType.class, Object.class));\n }\n }\n return null;\n }",
"private boolean dataToHistory(DataEntry oldEntry) {\n\t\tif (oldEntry != null) {\n\t\t\tif (bufferIndex < MAX_HISTORY_ENTRIES) {\n\t\t\t\toldEntries[bufferIndex++] = new HistoryEntry(oldEntry.getProductId(), oldEntry);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static boolean SafeUnzipFile(ZipFile zf, String filepathinzip, File fileinfiledir, long crc) {\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 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 e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e2) {\r\n e2.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e3) {\r\n e3.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e4) {\r\n e4.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n if (crc != 0) {\r\n if (ze.getCrc() == crc) {\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 e5) {\r\n e5.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e6) {\r\n e6.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e7) {\r\n e7.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e8) {\r\n e8.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n }\r\n byte[] buf = UnzipFile(zf, ze);\r\n if (1 != 0) {\r\n BufferedOutputStream Output_fos2 = new BufferedOutputStream(new FileOutputStream(fileinfiledir));\r\n try {\r\n Output_fos2.write(buf, 0, buf.length);\r\n Output_fos = Output_fos2;\r\n } catch (Exception e9) {\r\n e = e9;\r\n Output_fos = Output_fos2;\r\n try {\r\n e.printStackTrace();\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 e10) {\r\n e10.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e11) {\r\n e11.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e12) {\r\n e12.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e13) {\r\n e13.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n } catch (Throwable th) {\r\n th = th;\r\n if (Output_fos != null) {\r\n }\r\n throw th;\r\n }\r\n } catch (Throwable th2) {\r\n th = th2;\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 e14) {\r\n e14.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e15) {\r\n e15.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e16) {\r\n e16.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e17) {\r\n e17.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_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 e18) {\r\n e18.printStackTrace();\r\n return false;\r\n }\r\n }\r\n } catch (IOException e19) {\r\n e19.printStackTrace();\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e20) {\r\n e20.printStackTrace();\r\n return false;\r\n }\r\n }\r\n return false;\r\n } finally {\r\n if (bufbr != null) {\r\n try {\r\n bufbr.close();\r\n } catch (IOException e21) {\r\n e21.printStackTrace();\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n } catch (Exception e22) {\r\n e = e22;\r\n }\r\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 void addEntry(NameSurferEntry entry) {\r\n\t\tentries.add(entry);\r\n\t}",
"public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}",
"public void commit() throws IOException {\n\t\t\tif (hasErrors) {\n\t\t\t\tcompleteEdit(this, false);\n\t\t\t\tremove(entry.key); // the previous entry is stale\n\t\t\t} else {\n\t\t\t\tcompleteEdit(this, true);\n\t\t\t}\n\t\t}",
"public void addEntry(NameSurferEntry entry) {\r\n\t\tentryGraph.add(entry);\r\n\t}",
"@Override\n\t\tprotected SLEntry leafNodeFactory(java.nio.ByteBuffer entryStream)\n\t\tthrows\n\t\t\tjava.io.IOException\n\t\t{\n\t\t\treturn new SLEntry(this, entryStream);\n\t\t}",
"private void findChangeMarkerFile() {\n if (new File(pathsProvider.getLocalProgramTempDir(), \"dbchangemarker.txt\").exists()) {\n if (hasMetadataChange) System.out.print(\"Found previous changes.\\n\");\n hasMetadataChange = true;\n }\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}",
"@Override\r\n public void run() {\r\n try {\r\n /* For each record, map it. */\r\n while (reader.hasNextRecord()) {\r\n Map.Entry<String, String> read = reader.readNextRecord();\r\n map(read.getKey(), read.getValue());\r\n }\r\n } catch (Exception e) {\r\n success = false;\r\n e.printStackTrace();\r\n } finally {\r\n reader.close();\r\n writer.close();\r\n }\r\n }",
"void addHasZipCode(String newHasZipCode);",
"public void setZipcode(String newZip) {\n this.zipCode = newZip;\n }",
"public void addEntry(NameSurferEntry entry) {\n\t\tentries.add(entry);\n\t}",
"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 boolean accept(ZipEntry entry)\n {\n // the entry name must start with the directory name, and it must\n // not be a directory\n String sName = entry.getName();\n if (sName.length() > m_sDir.length() && sName.startsWith(m_sDir)\n && sName.charAt(sName.length() - 1) != '/')\n {\n // if searching recursively, the entry can be several levels\n // under the directory, otherwise it must be in that directory\n return m_fRecurse || sName.indexOf('/', m_sDir.length()) < 0;\n }\n\n return false;\n }",
"@Override\r\n\t\t\tpublic void end() {\n\t\t\t\tLog.i(tag, \"============//================\");\r\n\t\t\t\tLog.i(tag, \"============Entry Copy================\");\r\n\t\t\t\tlistItemEntry.setListTinTuc(entry.tintucCopy());\r\n\t\t\t}",
"public boolean contains(T entry) {\n return false;\n }",
"private void scanNextEntry() {\n if (hasNextEntry()) {\n\n long t0 = System.nanoTime();\n\n Path entry = entries[next];\n Map<String, ModuleReference> modules = scan(entry);\n next++;\n\n // update cache, ignoring duplicates\n int initialSize = cachedModules.size();\n for (Map.Entry<String, ModuleReference> e : modules.entrySet()) {\n cachedModules.putIfAbsent(e.getKey(), e.getValue());\n }\n\n // update counters\n int added = cachedModules.size() - initialSize;\n moduleCount.add(added);\n\n scanTime.addElapsedTimeFrom(t0);\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 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 void entryScanned(final T entry, final R row);",
"public AbstractSRLabeler(ZipInputStream in)\n\t{\n\t\tsuper(in);\n\t}",
"public void add(FileSystemEntry entry);",
"public void addExtraField(final ZipExtraField ze) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"04a0a86a-8034-4044-aeed-cebe7016e2d1\");\n if (ze instanceof UnparseableExtraFieldData) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"6b9a9172-8ea2-4aed-8433-17b19d1a9891\");\n unparseableExtra = (UnparseableExtraFieldData) ze;\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"c4c62a77-912a-4047-b4bc-d8a05e95bc86\");\n if (extraFields == null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"450fc98b-d668-4300-b141-2c5907baab75\");\n extraFields = new ZipExtraField[] { ze };\n } else {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"5d8f1c11-1f27-4f98-923b-c42685d35e95\");\n if (getExtraField(ze.getHeaderId()) != null) {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"7cc8a651-6175-4ec7-ab56-688a497910a8\");\n removeExtraField(ze.getHeaderId());\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"aa062502-071a-4ff6-8692-1c1202b14fec\");\n final ZipExtraField[] zipExtraFields = copyOf(extraFields, extraFields.length + 1);\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"e30c5825-289a-4c05-a5ec-8c2d6bec09e8\");\n zipExtraFields[zipExtraFields.length - 1] = ze;\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"3f326300-d61d-4afa-ae59-fe45855b45a6\");\n extraFields = zipExtraFields;\n }\n }\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"944dff45-ab9b-4e44-b913-045a4e38da7a\");\n setExtra();\n }",
"void scanunique() {\n\t\tint oldline, newline;\n\t\tnode psymbol;\n\n\t\tfor (newline = 1; newline <= newinfo.maxLine; newline++) {\n\t\t\tpsymbol = newinfo.symbol[newline];\n\t\t\tif (psymbol.symbolIsUnique()) { // 1 use in each file\n\t\t\t\toldline = psymbol.linenum;\n\t\t\t\tnewinfo.other[newline] = oldline; // record 1-1 map\n\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t}\n\t\t}\n\t\tnewinfo.other[0] = 0;\n\t\toldinfo.other[0] = 0;\n\t\tnewinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1;\n\t\toldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1;\n\t}",
"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}",
"public boolean removeEldestEntry(Map.Entry entry){\n return size() > capacity;\n }",
"synchronized void checkAlive() {\n printAct(\"==>Checking all my Entries if alive \");\n Iterator it = map.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<Integer, FileLocation> entry = (Map.Entry) it.next();\n FileLocation location = entry.getValue();\n try {\n InetSocketAddress server = new InetSocketAddress(location.getIP(), location.getPort());\n Socket s = new Socket();\n s.connect(server, 200); //connect with to the AppliCation with a timeout\n ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream());\n out.writeInt(2); //request 2 = file request\n out.writeInt(5); //\"random\" port, specific for this request\n out.close();\n s.close();\n } catch (java.net.SocketTimeoutException ex) {\n this.removeKey(entry.getKey());\n } catch (IOException ex) {\n this.removeKey(entry.getKey());\n }\n }\n printAct(\"==>Checked all my Entries if alive \");\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 ArchiveEntry getEntry (String location)\n\t{\n\t\tlocation = prepareLocation (location);\n\t\treturn entries.get (location);\n\t}",
"@Override\n public void run () {\n try {\n int i = 0;\n String tupleString = this.inReadEnds[i].getNextString();\n while (tupleString != null && i < this.inReadEnds.length - 1){\n BMap tempStore = BMap.makeBMap(tupleString);\n mapStore = BMap.or(mapStore, tempStore);\n i++;\n tupleString = this.inReadEnds[i].getNextString();\n }\n \n BMap tempStore = BMap.makeBMap(tupleString);\n this.mapStore = BMap.or(mapStore, tempStore);\n \n this.outWriteEnd.putNextString(mapStore.getBloomFilter());\n this.outWriteEnd.close();\n } \n catch (Exception e) {\n ReportError.msg(this.getClass().getName() + \" \" + e);\n }\n }"
] | [
"0.6063202",
"0.59804505",
"0.5576459",
"0.55533373",
"0.54749864",
"0.5458688",
"0.5393875",
"0.5224648",
"0.5211025",
"0.5122831",
"0.5097992",
"0.50505316",
"0.5009282",
"0.49804857",
"0.49755928",
"0.4965028",
"0.4901994",
"0.48820505",
"0.48438784",
"0.48110852",
"0.4810051",
"0.47854918",
"0.47842446",
"0.4778143",
"0.47773334",
"0.47711083",
"0.47520295",
"0.4748909",
"0.47382218",
"0.473724",
"0.47318307",
"0.47288606",
"0.47234428",
"0.47089148",
"0.47083342",
"0.47054765",
"0.46977434",
"0.46738914",
"0.46535447",
"0.46502578",
"0.464955",
"0.4633588",
"0.4630573",
"0.46240222",
"0.46131772",
"0.4604146",
"0.4603817",
"0.4602059",
"0.4593318",
"0.45807627",
"0.45729467",
"0.4572111",
"0.45706803",
"0.45596856",
"0.45400527",
"0.45342723",
"0.4534174",
"0.45325738",
"0.4528532",
"0.45227253",
"0.4517819",
"0.45116532",
"0.4508869",
"0.45037162",
"0.45015723",
"0.44897833",
"0.4482855",
"0.4478978",
"0.44779474",
"0.44748682",
"0.44714946",
"0.44701964",
"0.44633225",
"0.44631597",
"0.44627312",
"0.44567508",
"0.4455495",
"0.445239",
"0.4429886",
"0.44281185",
"0.4425369",
"0.44238612",
"0.4423305",
"0.44205773",
"0.44196308",
"0.4412121",
"0.44098604",
"0.4407633",
"0.44022873",
"0.43831682",
"0.43819654",
"0.43756178",
"0.43733576",
"0.43726173",
"0.43681258",
"0.43643826",
"0.43583262",
"0.43547642",
"0.43530422",
"0.4352528"
] | 0.6390422 | 0 |
Return boolean from optional parameter with single value. Return default value if parameter was not set. | static public boolean getSingleBooleanFromParameter(RuntimeContract contract, String parameter, boolean def) throws IllegalUsageException {
// If not given, return default
if(!contract.hasArgumentClause(parameter)) return def;
// If given convert to boolean
String value = contract.useArgumentClause(parameter).getSingleValue();
if("true".equalsIgnoreCase(value))
return true;
else if("false".equalsIgnoreCase(value))
return false;
else
throw new IllegalUsageException(parameter + ": unexpected value '" + value + "'. Expected either 'true' or 'false'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasOptionalValue();",
"boolean optional();",
"private boolean getOptionalBooleanProperty(String property, boolean defaultValue) {\n\t\tString value = getOptionalStringProperty(property);\n\t\tif (value != null)\n return value.equalsIgnoreCase(\"true\") || value.equalsIgnoreCase(\"yes\");\n return defaultValue;\n\t}",
"private boolean getBooleanProperty(ParameterList key, boolean defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"The input parameter (\" + key.name + \") was not found\");\n }\n else if(!keyPresent || strValue.equals(\"\")){\n loadedParametersLog.append(key.name).append(\"=\").append(defaultValue).append(\" (DEFAULT)\\n\");\n return defaultValue;\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return Boolean.parseBoolean(strValue);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(e.getMessage() + \"\\nThe input parameter (\" + key.name + \") could not be converted to boolean.\");\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }",
"protected boolean getOptionalBoolean(Node node, int idx,\n InternalContextAdapter ctx,\n boolean defaultValue)\n throws MethodInvocationException\n {\n Object obj = getOptionalValue(node, idx, ctx);\n if (obj == null || !(obj instanceof Boolean))\n return defaultValue;\n return ((Boolean) obj).booleanValue();\n }",
"boolean getBoolean(String key, boolean defaultValue);",
"private boolean getOptionalBooleanProperty(String[] propertyNameList, boolean defaultValue) {\n\t\tString value = getOptionalStringProperty(propertyNameList);\n if (value != null)\n return value.equalsIgnoreCase(\"true\") || value.equalsIgnoreCase(\"yes\");\n return defaultValue;\n\t}",
"public Boolean getBoolean(String key, Boolean defaultValue);",
"public boolean getBoolean(String key, boolean defaultValue);",
"@Deprecated\n public boolean getParameter(String name, boolean defaultValue) {\n String value = parameters.get(name);\n if (value == null)\n return defaultValue;\n value = value.trim().toLowerCase();\n return value.equals(\"true\") || value.equals(\"1\") || value.equals(\"yes\");\n }",
"public boolean getBooleanParam(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\n System.exit(1);\n }\n if (!boolParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter isn't a bool parameter...\");\n System.exit(1);\n }\n\n return boolParams.get(name);\n }",
"Argument<T> optional(boolean optional);",
"public Boolean getBoolean(boolean defaultVal) {\n return get(ContentType.BooleanType, defaultVal);\n }",
"protected boolean getParamAsBoolean(HttpServletRequest request, String paramName, Boolean defaultValue ) {\n\t\tString paramValue = request.getParameter(paramName);\n\t\tif ( null == paramValue ) {\n\t\t\tif ( defaultValue != null ) {\n\t\t\t\treturn defaultValue ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new TinyMvcException(\"Param '\" + paramName + \"' required\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn paramValue.trim().equalsIgnoreCase(\"true\") ;\n\t\t}\n\t}",
"private boolean getBoolean(String paramString, boolean paramBoolean) {\n }",
"public static boolean getOptionalBoolean(Document document, String name, boolean defaultBool) {\n ValueImpl v = null;\n try {\n v = getValueAndThrow(document, name);\n } catch (RepositoryException e) {\n LOGGER.log(Level.WARNING, \"Swallowing exception while accessing \" + name,\n e);\n return defaultBool;\n } catch (IllegalArgumentException e) {\n LOGGER.log(Level.WARNING, \"Swallowing exception while accessing \" + name,\n e);\n return defaultBool;\n }\n if (v != null) {\n return v.toBoolean();\n }\n return defaultBool;\n }",
"boolean isOptional();",
"public boolean getBoolean(String name, boolean defaultValue)\n/* */ {\n/* 862 */ String value = getString(name);\n/* 863 */ if (value == null) {\n/* 864 */ return defaultValue;\n/* */ }\n/* 866 */ return (value.equals(\"1\")) || (value.toLowerCase().equals(\"true\"));\n/* */ }",
"boolean getBoolValue();",
"boolean getBoolValue();",
"private boolean getBoolean(Node node, boolean defaultValue) {\r\n boolean value = defaultValue;\r\n if (node != null) {\r\n try {\r\n value = Boolean.parseBoolean(node.getNodeValue());\r\n } catch (Exception e) {\r\n value = defaultValue;\r\n }\r\n }\r\n return value;\r\n }",
"public static boolean verifyAndFetchOptionalProperty(String key,\r\n\t\t\tboolean defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\treturn Boolean.parseBoolean(property);\r\n\t}",
"boolean getValue();",
"public static Boolean getBoolean(String param, Boolean defval){\n\t\t\t\t\n\t\tBoolean returnValue = defval;\n\t\ttry{\n\t\t\treturnValue = pref().getBoolean(param, defval);\n\t\t\n\t\t}catch(Exception e){\n\t\t\treturnValue = defval;\n\t\t\t}\t\t\t\n\t\t\n\t\treturn returnValue;\n\t}",
"public static boolean getBooleanParam(String key, boolean dfault) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return dfault;\n }\n return cur.getBoolean(key, dfault);\n }",
"public static final boolean getBooleanParam(Map<String,String> params, String key, boolean def) {\n\t\ttry {\n\t\t\tString val = params.get(key);\n\t\t\tif(val==null || (!\"true\".equals(val) && !\"false\".equals(val))) return def;\n\t\t\treturn Boolean.parseBoolean(val);\n\t\t} catch (Exception e) {\n\t\t\treturn def;\n\t\t}\n\t}",
"boolean optBoolean(int index, boolean defaultValue) {\n try {\n return this.getBoolean(index);\n } catch (Exception e) {\n return defaultValue;\n }\n }",
"boolean hasDefaultValue();",
"public static boolean getBooleanParameter( HttpServletRequest request, String paramName ) {\n String temp = request.getParameter(paramName);\n if( temp != null && temp.equals(\"true\") ) {\n return true;\n } else {\n return false;\n }\n }",
"public static boolean getBooleanParameter( HttpServletRequest request, String paramName ) {\n String temp = request.getParameter(paramName);\n if( temp != null && temp.equals(\"true\") ) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean getBoolean(String name, boolean defaultValue) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (val instanceof Boolean) {\n\t\t\treturn (Boolean) val;\n\t\t}\n\t\ttry {\n\t\t\treturn Boolean.parseBoolean((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Boolean value required, but found: \" + val);\n\t\t}\n\t}",
"public static boolean getBooleanParam(String key) throws InvalidParam {\n return getCurrentConfig().getBoolean(key);\n }",
"public boolean getBoolean(String key) {\n\t\tif (internal.getProperty(key) != null)\n\t\t\treturn internal.getProperty(key).equals(\"true\");\n\t\telse if (getDefault(key) != null)\n\t\t\treturn (Boolean) getDefault(key);\n\t\telse\n\t\t\treturn false;\n\t}",
"boolean hasParameterValue();",
"public BooleanParameter(String name, String key, String desc, boolean visible, boolean enabled, boolean required, Object defaultValue) {\n super(name,key,desc,visible,enabled,required,defaultValue);\n \n if ( defaultValue instanceof String ) {\n defaultValue = new Boolean( \"TRUE\".equals(defaultValue));\n }\n }",
"public boolean getValue();",
"public static boolean getBoolean( String key, boolean defaultValue )\n\t{\n\t\tString value;\n\n\t\ttry {\n\t\t\tvalue = properties.getProperty( key );\n\t\t} catch ( Exception e ) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\tboolean boolValue = defaultValue;\n\n\t\tif ( value != null ) {\n\t\t\t// Try to convert a a String to a boolean\n\t\t\tif ( value.equalsIgnoreCase( \"true \" ) || value.equalsIgnoreCase( \"yes\" )\n\t\t\t\t\t|| value.equalsIgnoreCase( \"1\" ) ) {\n\t\t\t\tboolValue = true;\n\t\t\t} else if ( value.equalsIgnoreCase( \"false\" )\n\t\t\t\t\t|| value.equalsIgnoreCase( \"no\" ) || value.equalsIgnoreCase( \"0\" ) ) {\n\t\t\t\tboolValue = false;\n\t\t\t}\n\t\t}\n\t\treturn boolValue;\n\t}",
"public static boolean getBoolean(String id, boolean _default)\n\t{\n\t\tif(hasConfig())\n\t\t{\n\t\t\tProperty prop = getProperty(id);\n\t\t\tif(prop == null)\n\t\t\t{\n\t\t\t\t//Warn\n\t\t\t\tASMLogger.warn(\"WARNING: unknown config request: \"+id);\n\t\t\t\treturn _default;\n\t\t\t}\n\t\t\t\n\t\t\treturn prop.getBoolean(_default);\n\t\t\t\n\t\t}\n\n\t\treturn _default;\n\t}",
"public void setOptional(Boolean optional) {\n this.optional = optional;\n }",
"java.util.Optional<Boolean> getSeparate();",
"boolean getNullable();",
"boolean isDefault();",
"boolean isDefault();",
"public boolean isSetParam() {\n return this.param != null;\n }",
"public Boolean getOptional() {\n return this.optional;\n }",
"public boolean getParam0(){\n return localParam0;\n }",
"public static boolean getBoolean(String key, boolean bDefaultValue) {\r\n try {\r\n String s = getProperty(key);\r\n if (s != null) {\r\n return s.equalsIgnoreCase(\"true\") || s.equalsIgnoreCase(\"t\");\r\n } else {\r\n return bDefaultValue;\r\n }\r\n } catch (Exception e) {\r\n return bDefaultValue;\r\n }\r\n }",
"public Value restrictToBool() {\n checkNotPolymorphicOrUnknown();\n if (isMaybeAnyBool())\n return theBoolAny;\n else if (isMaybeTrueButNotFalse())\n return theBoolTrue;\n else if (isMaybeFalseButNotTrue())\n return theBoolFalse;\n else\n return theNone;\n }",
"boolean hasBoolValue();",
"java.lang.String getOptionalValue();",
"public boolean isDefault();",
"@Override\n public boolean getBoolean(String key, boolean defaultVal) {\n return mSharedPreferences.getBoolean(key, defaultVal);\n }",
"public boolean getMandatoryBoolean(String key) throws ConfigNotFoundException;",
"protected boolean getOptionalBoolean(Node node, int idx,\n InternalContextAdapter ctx)\n throws MethodInvocationException\n {\n return getOptionalBoolean(node, idx, ctx, false);\n }",
"public boolean getBoolean(JSONObject jsonObject, String key,\n\t\t\tBoolean defaultValue) {\n\t\tif (jsonObject == null || TextUtils.isEmpty(key)) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\ttry {\n\t\t\treturn jsonObject.getBoolean(key);\n\t\t} catch (JSONException e) {\n\t\t\tif (isPrintException) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn defaultValue;\n\t\t}\n\t}",
"public Boolean isOptional() {\n return this.optional;\n }",
"public static boolean getBoolProperty(String key, boolean defaultValue) {\r\n\t\treturn CommonUtil.parseAsBoolean(prop.getProperty(key), defaultValue);\r\n\t}",
"abstract public boolean getAsBoolean();",
"public boolean getBoolean( String key, boolean defaultValue )\n {\n boolean value = defaultValue;\n try\n {\n if ( config != null )\n {\n try\n {\n value = config.getBoolean( key, defaultValue );\n LOG.debug( \"getBoolean name [{}] value [{}]\", key, value );\n }\n catch (org.apache.commons.configuration.ConversionException e )\n {\n LOG.debug( \"getBoolean name [{}], conversion exception using default [{}]\", key, defaultValue );\n }\n }\n else\n {\n LOG.warn( \"getBoolean - invalid config, can't read prop [{}], using default [{}]\", key, defaultValue );\n }\n }\n catch (java.lang.IllegalStateException e )\n {\n LOG.debug( \"getBoolean - illegal state exception [{}], using default [{}]\", key, defaultValue );\n }\n catch (java.util.NoSuchElementException nse )\n {\n LOG.debug( \"getBoolean - no such element [{}], using default [{}]\", key, defaultValue );\n }\n return value;\n }",
"String booleanAttributeToGetter(String arg0);",
"default boolean asBool() {\n\t\tthrow new EvaluatorException(\"Expecting a bool value\");\n\t}",
"private Boolean getDefaultValue(XmlField field) {\n\t\tif (field.isNullable())\n\t\t\treturn null;\n\t\tString result = field.getDefaultValue();\n\t\tif (result == null)\n\t\t\treturn null;\n\t\ttry {\n\t\t\treturn Boolean.parseBoolean(result);\n\t\t} catch (Exception ex) {\n\t\t\tLOG.warn(String.format(\"[BooleanFieldHandle.postFieldValue] failed to convert default value[%s] error: \",\n\t\t\t\t\tresult), ex);\n\t\t}\n\t\treturn null;\n\t}",
"public boolean isOptional() {\n return optional;\n }",
"public boolean get(boolean a) {\n\t\treturn a;\r\n\t}",
"public T caseValBool(ValBool object)\n {\n return null;\n }",
"public boolean getBoolean( String key )\n {\n boolean value = false;\n try\n {\n if (config != null)\n {\n value = config.getBoolean(key);\n LOG.debug( \"getBoolean name [{}] value [{}]\", key, value );\n }\n else\n {\n LOG.warn( \"getBoolean invalid config, can't read prop [{}], using default [{}]\", key, false );\n }\n }\n catch (java.util.NoSuchElementException e )\n {\n LOG.debug( \"getBoolean - no such element [{}], using default [{}]\", key, false );\n }\n return value;\n }",
"public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }",
"public static boolean getBoolean(String pName) {\n boolean out = false;\n try {\n out = Boolean.parseBoolean(properties.getProperty(pName));\n } catch (Exception e) {\n out = Boolean.parseBoolean(defaults.getProperty(pName));\n Log.debug(\"Cannot parse property: \" + pName);\n Log.debug(e);\n }\n return out;\n }",
"public boolean getRequestParamAsBoolean(HttpServletRequest request, String paramName) {\n String paramValue = request.getParameter(paramName);\n if (paramValue == null)\n throw new UserNDotException(\"Param '\" + paramName + \"' Not found in request\");\n\n return Boolean.valueOf(paramValue);\n }",
"public static boolean bVal( Boolean value ) {\n return value != null && value; \n }",
"public boolean getBoolean(String name)\n/* */ {\n/* 845 */ return getBoolean(name, false);\n/* */ }",
"boolean boolField(String name, boolean isDefined, boolean value)\n throws NullField, InvalidFieldValue;",
"boolean isSimpleValue();",
"public void setOptional(boolean optional) {\n\t\tthis.optional = optional;\n\t}",
"public\n boolean getProperty_boolean(String key)\n {\n if (key == null)\n return false;\n\n String val = getProperty(key);\n\n if (val == null)\n return false;\n\n boolean ret_boolean = false;\n if (val.equalsIgnoreCase(\"ON\") ||\n val.equalsIgnoreCase(\"YES\") ||\n val.equalsIgnoreCase(\"TRUE\"))\n {\n ret_boolean = true;\n }\n else\n if (val.equalsIgnoreCase(\"OFF\") ||\n val.equalsIgnoreCase(\"NO\") ||\n val.equalsIgnoreCase(\"FALSE\"))\n {\n ret_boolean = false;\n }\n\n return ret_boolean;\n }",
"public boolean booleanValue(String name)\n\t{\n\t\tString p = _props.getProperty(name);\n\t\tif(p != null && p.length() > 0 \n\t\t\t\t&& (p.toLowerCase().charAt(0) == 'y'\n\t\t\t\t|| p.toLowerCase().charAt(0) == 't'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"@java.lang.Override\n public boolean getBoolValue() {\n if (typeCase_ == 2) {\n return (java.lang.Boolean) type_;\n }\n return false;\n }",
"HasValue<Boolean> getIsOrgUser();",
"public Boolean booleanValue() {\n\t\tif (this.getLiteralValue() instanceof Boolean) {\n\t\t\treturn (Boolean) this.getLiteralValue();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"private static boolean booleanAnnotation(ObjectMeta metadata, String annotation, boolean defaultValue, String... deprecatedAnnotations) {\n String str = annotation(annotation, null, metadata, deprecatedAnnotations);\n return str != null ? parseBoolean(str) : defaultValue;\n }",
"protected boolean getParamAsBoolean(HttpServletRequest request, String paramName) {\n\t\treturn getParamAsBoolean(request, paramName, null);\n\t}",
"public boolean isParameterProvided();",
"boolean get();",
"boolean hasCustomValue();",
"public SimpleBooleanProperty getUseDefault() {\n return useDefault;\n }",
"public static boolean getBool(String aKey, boolean aDefaultValue) {\n return getSharedPreferences().getBoolean(aKey, aDefaultValue);\n }",
"public boolean getBoolean(String jsonData, String key, Boolean defaultValue) {\n\t\tif (TextUtils.isEmpty(jsonData)) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\ttry {\n\t\t\tJSONObject jsonObject = new JSONObject(jsonData);\n\t\t\treturn getBoolean(jsonObject, key, defaultValue);\n\t\t} catch (JSONException e) {\n\t\t\tif (isPrintException) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn defaultValue;\n\t\t}\n\t}",
"private static boolean validateBoolean(Map.Entry<String, CheckState> entry) {\n String prop = System.getProperty(entry.getKey());\n if (entry.getValue().isOptional && prop == null) {\n return true;\n }\n return Boolean.TRUE.toString().equals(prop) || Boolean.FALSE.toString().equals(prop);\n }",
"protected boolean isOptional()\n {\n return false;\n }",
"static public boolean getDefaultBoolean() {\n return defaultBoolean;\n }",
"public boolean isRequiredParam() {\n return this.isRequiredParam;\n }",
"boolean getBoolean();",
"boolean getBoolean();",
"public void setBool(String parName, boolean parVal) throws HibException;",
"public boolean isOptional() {\n return isOptional;\n }",
"public boolean isOptional() {\n\t\treturn optional;\n\t}",
"protected Boolean geBoolValue() {\n return boolValue;\n }",
"@Test\n public void getFirstNonNullValueTest() throws Exception {\n assertTrue(DevHelper.getFirstNonNullValue(null, null, Boolean.valueOf(true)));\n assertTrue(DevHelper.getFirstNonNullValue(null, Boolean.valueOf(true), Boolean.valueOf(false)));\n assertFalse(DevHelper.getFirstNonNullValue(null, Boolean.valueOf(false), Boolean.valueOf(true)));\n assertFalse(DevHelper.getFirstNonNullValue(Boolean.valueOf(false), Boolean.valueOf(true), Boolean.valueOf(false)));\n assertTrue(DevHelper.getFirstNonNullValue(Boolean.valueOf(true), Boolean.valueOf(true), Boolean.valueOf(false)));\n assertFalse(DevHelper.getFirstNonNullValue(null, null, null));\n }",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default boolean asBool() {\n \n return notSupportedCast(BasicTypeID.BOOL);\n }",
"public boolean getBoolean(String name) {\n\t\tObject val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Boolean value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Boolean) {\n\t\t\treturn (Boolean) val;\n\t\t}\n\t\ttry {\n\t\t\treturn Boolean.parseBoolean((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Boolean value required, but found: \" + val);\n\t\t}\n\t}"
] | [
"0.7348394",
"0.7019204",
"0.6997763",
"0.69478226",
"0.68451977",
"0.6713329",
"0.66813666",
"0.6671492",
"0.66564673",
"0.65615666",
"0.6557148",
"0.65103763",
"0.6438882",
"0.642862",
"0.6390779",
"0.63843",
"0.63834274",
"0.6372957",
"0.6277953",
"0.6277953",
"0.61619294",
"0.61396873",
"0.6098004",
"0.6082917",
"0.6072507",
"0.60688746",
"0.60515654",
"0.6027293",
"0.6017826",
"0.6017826",
"0.5979527",
"0.5966563",
"0.5957002",
"0.59454024",
"0.59402305",
"0.5923516",
"0.5874206",
"0.58660185",
"0.58498377",
"0.5849779",
"0.5849081",
"0.5801356",
"0.5801356",
"0.5799258",
"0.5794434",
"0.57935035",
"0.5789641",
"0.57752216",
"0.57742625",
"0.5730836",
"0.5697089",
"0.56901836",
"0.56838435",
"0.56567705",
"0.56274706",
"0.5621419",
"0.5616077",
"0.56155056",
"0.5595613",
"0.55662686",
"0.55477595",
"0.5528891",
"0.5528439",
"0.5524654",
"0.5524015",
"0.5517898",
"0.55011195",
"0.5500428",
"0.5499561",
"0.5497975",
"0.5495342",
"0.5494692",
"0.54899",
"0.54809207",
"0.5478243",
"0.5475225",
"0.5473002",
"0.54408145",
"0.5439698",
"0.54361093",
"0.5435497",
"0.5434495",
"0.5433714",
"0.5427708",
"0.54180044",
"0.54132825",
"0.54119635",
"0.54117006",
"0.5407916",
"0.5405889",
"0.54026055",
"0.5397513",
"0.5397513",
"0.5392723",
"0.5389631",
"0.538911",
"0.5385629",
"0.5385506",
"0.5382867",
"0.5365188"
] | 0.66123444 | 9 |
Return integer from optional parameter with single value. Return default value if parameter was not set. | public static int getSingleIntFromParameter(RuntimeContract contract, String parameter, int def) throws IllegalUsageException {
// If not given, return default
if(!contract.hasArgumentClause(parameter)) return def;
// If given convert to integer
String value = contract.useArgumentClause(parameter).getSingleValue();
try {
return Integer.parseInt(value);
} catch(NumberFormatException e) {
throw new IllegalUsageException(parameter + ": unexpected value '" + value + "'. Expected an integer number");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getParamValueAsInt(String label, int defaultValue);",
"public int getInt(String key, int defaultValue);",
"int getInt(String key, int defaultValue);",
"public static int getIntParameter( HttpServletRequest request, String paramName, int defaultNum ) {\n String temp = request.getParameter(paramName);\n if( temp != null && !temp.equals(\"\") ) {\n int num = defaultNum;\n try {\n num = Integer.parseInt(temp);\n }\n catch( Exception ignored ) {}\n return num;\n } else {\n return defaultNum;\n }\n }",
"public static int getIntParameter( HttpServletRequest request, String paramName, int defaultNum ) {\n String temp = request.getParameter(paramName);\n if( temp != null && !temp.equals(\"\") ) {\n int num = defaultNum;\n try {\n num = Integer.parseInt(temp);\n }\n catch( Exception ignored ) {}\n return num;\n } else {\n return defaultNum;\n }\n }",
"public Integer getInteger(String key, Integer defaultValue);",
"private int getIntegerProperty(ParameterList key, int defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"The input parameter (\" + key.name + \") was not found\");\n }\n else if(!keyPresent || strValue.equals(\"\")){\n loadedParametersLog.append(key.name).append(\"=\").append(defaultValue).append(\" (DEFAULT)\\n\");\n return defaultValue;\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return Integer.parseInt(strValue);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(e.getMessage() + \"\\nThe input parameter (\" + key.name + \") could not be converted to int.\");\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }",
"private int getOptionalIntegerProperty(String property, int defaultValue) {\n\t\ttry {\n\t\t\tString value = testProperties.getProperty(property);\n\t\t\tif (value == null)\n\t\t\t\treturn defaultValue;\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t}",
"public int getParamAsInt(String paramName);",
"public int getInt(String name, int defaultValue)\n/* */ {\n/* 925 */ String value = getString(name);\n/* 926 */ return value == null ? defaultValue : PApplet.parseInt(value, defaultValue);\n/* */ }",
"int getInfoOrDefault(\n int key,\n int defaultValue);",
"public Integer getParaToInt(String name, Integer defaultValue) {\n\t\treturn toInt(request.getParameter(name), defaultValue);\n\t}",
"public int getPropertyInt(String key, int defaultValue);",
"protected int getParamAsInt(HttpServletRequest request, String paramName, Integer defaultValue) {\n\t\treturn ((Integer) getParamAsNumber(request, paramName, int.class, defaultValue ) ).intValue();\n\t}",
"private int getOptionalIntegerProperty(String[] propertyNameList, int defaultValue) {\n\t\ttry {\n\t\t\tString value = getOptionalStringProperty(propertyNameList);\n\t\t\tif (value == null)\n\t\t\t\treturn defaultValue;\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\t\n\t}",
"public static int getParameterInt(String key, int defaultValue)\n throws Exception {\n int kv = ini.getInt(key, defaultValue);\n systemlog(LogType.DEBUG, \"getParam \" + key + \" value: \" + kv);\n return kv;\n }",
"public int getIntValue(CallArgument arg, int defaultValue) {\n if (arg != null) {\n String val = arg.getValue();\n if (StringUtils.isNotBlank(val)) {\n try {\n return Integer.parseInt(val);\n } catch (NumberFormatException e) {\n // allow to pass through\n }\n }\n }\n return defaultValue;\n }",
"public int getIntValue(String opt) {\n return Integer.parseInt((String)m_commandLine.getValue(opt));\n }",
"public static int getParameterInt(String section, String key,\n int defaultValue) throws Exception {\n int kv = ini.getInt(section + \".\" + key, defaultValue);\n systemlog(LogType.DEBUG, \"getParam [\" + section + \"] \" + key + \" value: \"\n + kv);\n return kv;\n }",
"public static Optional<String> optString(String param) {\n if (param == null) {\n return Optional.empty();\n } else {\n return Optional.of(param + 1);\n }\n }",
"int getInt( String key, int def);",
"public Integer getInt(int defaultVal) {\n return get(ContentType.IntegerType, defaultVal);\n }",
"public int getAsInt(String key, int defaultVal) {\n String val = entries.getProperty(key);\n return val == null ? defaultVal : Integer.parseInt(val);\n }",
"public int getMandatoryInt(String key) throws ConfigNotFoundException;",
"int provideValue();",
"public static int getIntParam(String key) throws InvalidParam {\n return getCurrentConfig().getInt(key);\n }",
"public static int verifyAndFetchOptionalProperty(String key,\r\n\t\t\tint defaultValue, Properties prop) {\r\n\t\tString property;\r\n\t\tproperty = fetchProperty(key, prop);\r\n\r\n\t\t// Property should not be blank.\r\n\t\tif (property == null || (property != null && property.trim().isEmpty())) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn Integer.parseInt(property);\r\n\t\t} catch (NumberFormatException numEx) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t}",
"public static final int getIntegerParam(Map<String,String> params, String key, int def) {\n\t\ttry {\n\t\t\treturn Integer.parseInt(params.get(key));\n\t\t} catch (Exception e) {\n\t\t\treturn def;\n\t\t}\n\t}",
"@Deprecated\n public int getParameter(String name, int defaultValue) {\n String value = parameters.get(name);\n if (value == null)\n return defaultValue;\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException e) {\n return defaultValue;\n }\n }",
"public Integer getAsInteger(String itemName, Integer defaultValue);",
"public int getIntegerParam(String theAlias) {\n String name = getAlias(theAlias);\n\n if (!allParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter hasn't been added...\");\n System.exit(1);\n }\n if (!intParams.containsKey(name)) {\n System.out.println(\"Careful, you are getting the value of parameter: \" + name + \" but the parameter isn't an int parameter...\");\n System.exit(1);\n }\n\n return intParams.get(name);\n }",
"OptionalInt peek();",
"public int getParameterAsInt(String name)\n\t{\n\t\tassert name != null;\n\n\t\tConverter c = ConvertUtils.lookup(java.lang.Integer.class);\n\n\t\treturn ((Integer) c.convert(java.lang.Integer.class, getParameterAsString(name))).intValue();\n\t}",
"public static int getIntAttribute( HttpServletRequest request, String attribName, int defaultNum ) {\n String temp = (String)request.getAttribute(attribName);\n if( temp != null && !temp.equals(\"\") ) {\n int num = defaultNum;\n try {\n num = Integer.parseInt(temp);\n }\n catch( Exception ignored ) {}\n return num;\n } else {\n return defaultNum;\n }\n }",
"public static int getIntAttribute( HttpServletRequest request, String attribName, int defaultNum ) {\n String temp = (String)request.getAttribute(attribName);\n if( temp != null && !temp.equals(\"\") ) {\n int num = defaultNum;\n try {\n num = Integer.parseInt(temp);\n }\n catch( Exception ignored ) {}\n return num;\n } else {\n return defaultNum;\n }\n }",
"public int getDefault(){\n return number;\n }",
"protected synchronized int getIntegerValue(String tag, int defaultValue) {\n int returnInt = defaultValue;\n String defaultReturnString = Integer.toString(defaultValue);\n if (actualProperties != null) {\n returnInt = Integer.decode(actualProperties.getProperty(tag, defaultReturnString));\n }\n return returnInt;\n }",
"@Override\r\n\tpublic int getInt(int arg) {\n\t\treturn 0;\r\n\t}",
"public static Integer extractInteger(Object value, Object defaultValue){\n if(value == null){\n return convertToInt(defaultValue);\n }\n return convertToInt(value);\n }",
"protected abstract int getValue(int paramInt);",
"private int getInt(Node node, int defaultValue) {\r\n int value = defaultValue;\r\n if (node != null) {\r\n try {\r\n value = Integer.parseInt(node.getNodeValue());\r\n } catch (Exception e) {\r\n value = defaultValue;\r\n }\r\n }\r\n return value;\r\n }",
"public Integer getInteger(String key, Integer defaultValue) {\n if (!jsonData.has(key)) {\n return defaultValue;\n }\n try {\n return jsonData.getInt(key);\n } catch (Exception ex) {\n return null;\n }\n }",
"public int getInfoOrDefault(\n int key,\n int defaultValue) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"public int getInteger(String name, int defaultValue) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).intValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Integer.parseInt((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Integer value required, but found: \" + val);\n\t\t}\n\t}",
"public Integer getInt(String key,int defautl){\n\t\treturn this.getParam(key,defautl);\n\t}",
"protected Integer getIntParam(HttpServletRequest request, String name) {\r\n String[] p = request.getParameterValues(name);\r\n \r\n Integer result = null;\r\n \r\n try{\r\n if (p != null) {\r\n \t//TODO: add the apache common package for pom.xml\r\n// result = NumberUtils.createInteger(p[0]);\r\n }\r\n }catch(NumberFormatException ex){\r\n \r\n }\r\n return result;\r\n }",
"public static Integer getInteger(String key, int defaultValue, String consumer) {\n systemPropertyQueried(key, consumer);\n return Integer.getInteger(key, defaultValue);\n }",
"@Override\n public int getInt(String key, int defaultVal) {\n return mSharedPreferences.getInt(key, defaultVal);\n }",
"static public int getDefaultInt () {\n return defaultInt;\n }",
"public Integer getParaToInt(String name) {\n\t\treturn toInt(request.getParameter(name), null);\n\t}",
"Optional<Integer> getId(Point coordinate);",
"public abstract int getPreferredValue();",
"public int getInfoOrDefault(\n int key,\n int defaultValue) {\n \n java.util.Map<java.lang.Integer, java.lang.Integer> map =\n internalGetInfo().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"public static Integer getInteger(String key, Integer defaultValue, String consumer) {\n systemPropertyQueried(key, consumer);\n return Integer.getInteger(key, defaultValue);\n }",
"public Long getLong(String key, Long defaultValue);",
"public int getInteger(String key) {\n\t\tint defaultValue = 0;\n\t\tif (getDefault(key) != null)\n\t\t\tdefaultValue = (Integer) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tint value;\n\t\ttry {\n\t\t\tvalue = Integer.parseInt(sp);\n\t\t} catch (NumberFormatException ex) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}",
"public long getLong(String key, long defaultValue);",
"public int parseIntDefault(String numb, int defaultVal) {\r\n \ttry {\r\n \t\treturn Integer.parseInt(numb);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn defaultVal;\r\n \t}\r\n }",
"public static int getIntParam(String key, int dfault) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return dfault;\n }\n return cur.getInt(key, dfault);\n }",
"private static int getIntegerProperty(String key) {\n String value = PROPERTIES.getProperty(key);\n // if the key is not found, Properties will return null and we should return a default value\n if (value == null) {\n return 0;\n }\n return Integer.parseInt(value);\n }",
"public static int parseIntOrDefault(String s, int defaultInt) {\n try {\n return Integer.parseInt(s);\n } catch (NumberFormatException e) {\n Logger.trace(MESSAGE, s, e);\n return defaultInt;\n }\n }",
"private long getLongProperty(ParameterList key, long defaultValue) \n throws NumberFormatException, NullPointerException, MissingOptionException{\n try {\n boolean keyPresent = fileParameters.containsKey(key.name);\n String strValue = keyPresent ? fileParameters.getProperty(key.name).replaceAll(\"\\\\s\", \"\") : null;\n if (!keyPresent && key.mandatory) {\n throw new MissingOptionException(\"The input parameter (\" + key.name + \") was not found\");\n }\n else if(!keyPresent || strValue.equals(\"\")){\n loadedParametersLog.append(key.name).append(\"=\").append(defaultValue).append(\" (DEFAULT)\\n\");\n return defaultValue;\n }\n loadedParametersLog.append(key.name).append(\"=\").append(strValue).append(\"\\n\");\n return Integer.parseInt(strValue);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(e.getMessage() + \"\\nThe input parameter (\" + key.name + \") could not be converted to long.\");\n } catch (NullPointerException e) {\n throw new NullPointerException(e.getMessage() + \"\\nThe parameter file was not initialized.\");\n }\n }",
"public int getInt(@NonNull String name) {\n return getInt(name, /* defaultValue */ 0);\n }",
"T getDefaultValue();",
"@Override\n public int getValue(String name, int defaultValue) {\n Integer iResult = StatusRepository.getModel(name);\n if(iResult == null) return 0;\n return iResult;\n }",
"public static int getInt(Integer value, int defaultValue)\r\n\t{\r\n\t\treturn value == null ? defaultValue : value.intValue();\r\n\t}",
"protected int getParamAsInt(HttpServletRequest request, String paramName) {\n\t\treturn getParamAsInt(request, paramName, null);\n\t}",
"OptionalInt getAge();",
"public int getRequestParamAsInteger(HttpServletRequest request, String paramName) {\n String paramValue = request.getParameter(paramName);\n if (paramValue == null)\n throw new UserNDotException(\"Param '\" + paramName + \"' Not found in request\");\n\n try {\n return Integer.parseInt(paramValue);\n } catch (NumberFormatException nfe) {\n throw new UserNDotException(\"Param '\" + paramName + \"' does not have an integer value(\" + paramValue + \")\");\n }\n }",
"public int getInt( String key, int defaultValue )\n {\n int value = defaultValue;\n try\n {\n if ( config != null )\n {\n value = config.getInt( key, defaultValue );\n LOG.debug( \"getInt name [{}] value [{}]\", key, value );\n }\n else\n {\n LOG.warn( \"getInt invalid config, can't read prop [{}], using default [{}]\", key, defaultValue );\n }\n }\n catch (java.lang.IllegalStateException e )\n {\n LOG.debug( \"getInt - illegal state exception [{}], using default [{}]\", key, defaultValue );\n }\n catch (org.apache.commons.configuration.ConversionException e)\n {\n LOG.debug( \"getInt name [{}], conversion exception using default [{}]\", key, defaultValue );\n }\n return value;\n }",
"@Value.Parameter\n OptionalInt optimize();",
"Integer getValue();",
"Integer getValue();",
"public static int getInt(String value, int defaultValue)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn Integer.parseInt(value);\r\n\t\t}\r\n\t\tcatch (NumberFormatException e)\r\n\t\t{\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t}",
"public static Optional<Integer> parseOptionalInt(final String input)\n {\n try\n {\n return Optional.ofNullable(input).map(Integer::parseInt);\n }\n catch(NumberFormatException e)\n {\n return Optional.empty();\n }\n }",
"public static final int getInt(String pname, int defaultValue)\n\t{\n\t\tConfigReader cr = getCR();\n\t\tString p = cr.m_properties.getProperty(pname);\n\t\t\n\t\ttry {\n\t\t\treturn Integer.parseInt(p);\n\t\t} catch(Exception e) {\n\t\t\tput(pname, defaultValue);\n\t\t\treturn defaultValue;\n\t\t}\n\t}",
"int intValue();",
"private static int getInt(String prompt) {\n \t\n Scanner input;\n \n int result = 10; // default if there's no input\n \n \n try {\n \n \tinput = new Scanner(System.in);\n \n System.out.println(prompt);\n \n result = input.nextInt(); //take input\n \n //in case user enters something else than int\n } catch (NumberFormatException e) {\n System.out.println(\"Could not convert to int\");\n System.out.println(e.getMessage());\n System.out.println(\"Value has been set to default (10)\");\n \n //other error exception\n } catch (Exception e) {\n System.out.println(\"There was an error with System.in\");\n System.out.println(e.getMessage()); \n System.out.println(\"Value has been set to default (10)\");\n }\n return result;\n }",
"public static int getInt(String pName) {\n int out = 0;\n try {\n out = Integer.parseInt(properties.getProperty(pName));\n } catch (NumberFormatException e) {\n out = Integer.parseInt(defaults.getProperty(pName));\n Log.debug(\"Cannot parse property: \" + pName);\n Log.debug(e);\n }\n return out;\n }",
"float getWithDefault(int idx, float defaultVal);",
"public static int getInt(final String key, final int defaultValue) {\r\n if (PROP == null) {\r\n return defaultValue;\r\n }\r\n if (PROP.containsKey(key)) {\r\n try {\r\n return Integer.parseInt(PROP.getProperty(key));\r\n } catch (NumberFormatException e) {\r\n return defaultValue;\r\n }\r\n }\r\n\r\n return defaultValue;\r\n }",
"Object getDefaultValue(String key);",
"private Integer parseIntegerValue(String value, Integer defaultValue) {\n Integer ival = defaultValue;\n if (value != null) {\n try {\n ival = Integer.parseInt(value);\n } catch (NumberFormatException nfe) {\n ival = defaultValue;\n }\n }\n return (ival);\n }",
"int value(String name);",
"int getIntValue();",
"private OptionalInt getDiscPortQueryParam() {\n final int listeningPort = getListeningPortOrZero();\n final int discoveryPort = getDiscoveryPortOrZero();\n if (listeningPort == discoveryPort) {\n return OptionalInt.empty();\n }\n return OptionalInt.of(discoveryPort);\n }",
"public int getInt(String name)\n/* */ {\n/* 908 */ return getInt(name, 0);\n/* */ }",
"protected synchronized int getIntegerValue(String tag) {\n int returnInt = 0;\n if (actualProperties != null) {\n returnInt = Integer.decode(actualProperties.getProperty(tag, \"0\"));\n }\n return returnInt;\n }",
"public static int getInt() throws Exception {\n return getInt(null);\n }",
"public final int getInt(final String tagToGet) {\n try {\n return Integer.parseInt(getStr(tagToGet));\n } catch (final Exception t) {\n return 0;\n }\n }",
"int getInt();",
"int getInt();",
"public static int getInt(String key) throws UnknownID, ArgumentNotValid {\n\t\tString value = get(key);\n\t\ttry {\n\t\t\treturn Integer.parseInt(value);\n\t\t} catch (NumberFormatException e) {\n\t\t\tString msg = \"Invalid setting. Value '\" + value + \"' for key '\" + key\n\t\t\t\t\t+ \"' could not be parsed as an integer.\";\n\t\t\tthrow new ArgumentNotValid(msg, e);\n\t\t}\n\t}",
"public long getLong(String name, int defaultValue) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).longValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Long.parseLong((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Integer value required, but found: \" + val);\n\t\t}\n\t}",
"int getFromValue();",
"public int getPortIfSpecified() {\n String portAsString = getPropertyAsString(PORT);\n if(portAsString == null || portAsString.isEmpty()) {\n return UNSPECIFIED_PORT;\n }\n \n try {\n return Integer.parseInt(portAsString.trim());\n } catch (NumberFormatException e) {\n return UNSPECIFIED_PORT;\n }\n }",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"int getParamType(String type);",
"@SuppressWarnings(\"unused\")\n public int getInt(String path) {\n return yml.getInt(path);\n }"
] | [
"0.71336615",
"0.69211924",
"0.6915256",
"0.67761755",
"0.67761755",
"0.6768065",
"0.67666674",
"0.6540317",
"0.6511332",
"0.6483308",
"0.6414603",
"0.6372322",
"0.6334148",
"0.6264259",
"0.6238509",
"0.6238012",
"0.62160814",
"0.61585957",
"0.61346626",
"0.61081403",
"0.6104636",
"0.606352",
"0.6054966",
"0.6012898",
"0.60065424",
"0.6006434",
"0.5955627",
"0.59546465",
"0.5920218",
"0.59128124",
"0.5910628",
"0.5891364",
"0.588375",
"0.58769226",
"0.58769226",
"0.58707446",
"0.58675313",
"0.58148146",
"0.5806904",
"0.5784977",
"0.57799846",
"0.57717484",
"0.57658094",
"0.5741967",
"0.5738918",
"0.5732706",
"0.57239574",
"0.5695364",
"0.56866235",
"0.5678449",
"0.56758136",
"0.56646746",
"0.566325",
"0.56580955",
"0.5657635",
"0.5641232",
"0.5625657",
"0.56132084",
"0.5598996",
"0.5597737",
"0.5596681",
"0.5594207",
"0.5560099",
"0.555078",
"0.5526679",
"0.5507309",
"0.5505392",
"0.5496209",
"0.5495823",
"0.5487537",
"0.5484374",
"0.5477033",
"0.5477033",
"0.54642063",
"0.5461285",
"0.5442316",
"0.54343885",
"0.54121095",
"0.5401009",
"0.53933567",
"0.5388672",
"0.5383",
"0.53800327",
"0.5376378",
"0.53704816",
"0.53576726",
"0.53526115",
"0.5349021",
"0.5344993",
"0.53420377",
"0.5332874",
"0.5332874",
"0.5331303",
"0.5314421",
"0.53101104",
"0.53093183",
"0.5302342",
"0.5302342",
"0.53008723",
"0.53008014"
] | 0.61767477 | 17 |
Return string from optional parameter with single value. Return default value if parameter was not set. | public static String getSingleStringFromParameter(RuntimeContract contract, String parameter, String def) throws IllegalUsageException {
// If not given, return default
return contract.hasArgumentClause(parameter)? contract.useArgumentClause(parameter).getSingleValue():def;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getOptionalValue();",
"public String getParamValueAsString(String label, String defaultValue);",
"String getDefaultValue();",
"String getDefaultValue();",
"public static Optional<String> optString(String param) {\n if (param == null) {\n return Optional.empty();\n } else {\n return Optional.of(param + 1);\n }\n }",
"private static String getPropertyValueOrDefault(String value) {\n return value != null ? value : \"\";\n }",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n optionalValue_ = s;\n }\n return s;\n }\n }",
"@Override public String getParamDefault(final String param) {\n final String common = getDrbdInfo().getParamSaved(param);\n if (common != null) {\n return common;\n }\n return getBrowser().getDrbdXML().getParamDefault(param);\n }",
"String getString(String key, String defaultValue);",
"String getString(String key, String defaultValue);",
"public String getString(String key, String defaultValue);",
"public String getString(String key, String defaultValue);",
"public java.lang.String getOptionalValue() {\n java.lang.Object ref = optionalValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n optionalValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"String optString(int index, String defaultValue) {\n Object object = this.opt(index);\n return PropertyObject.NULL.equals(object) ? defaultValue : object.toString();\n }",
"public String getDefault();",
"String getOptionsOrDefault(\n String key,\n String defaultValue);",
"String getOptionsOrDefault(\n String key,\n String defaultValue);",
"String getOptionsOrDefault(\n String key,\n String defaultValue);",
"public String get(Object requestor, String field, String defaultString);",
"public String get(Object requestor, String field, int type,\n String defaultString);",
"java.lang.String getFieldOrDefault(\n java.lang.String key,\n java.lang.String defaultValue);",
"public String get(Class requestor, String field, String defaultString);",
"public String get(Class requestor, String field, int type,\n String defaultString);",
"private String getParameterValue(final String parameterValue, final String defaultValue)\r\n {\r\n if (parameterValue == null || \"\".equals(parameterValue.trim()))\r\n {\r\n return defaultValue;\r\n }\r\n return parameterValue;\r\n }",
"private String getFlagValue(String flag, String defaultValue){\n \treturn (flag == null) ? defaultValue : flag;\n }",
"public String get(Class requestor, String field, String defaultString,\n Object param1);",
"protected static Optional<String> optionValue(String arg) {\n checkArgument(arg.startsWith(\"-\"), \"expected option string: %s\", arg);\n List<String> option = Splitter.on('=').limit(2).splitToList(arg);\n return option.size() > 1 ? Optional.of(option.get(1)) : Optional.empty();\n }",
"public String get(Class requestor, String field, int type,\n String defaultString, Object param1);",
"public final String getStr(final String tagToGet, final String defaultVal) {\n String thisTag = this.getProperty(tagToGet);\n if ((thisTag == null) && (props[MudHost.MAIN_HOST] != null) && (props[MudHost.MAIN_HOST] != this))\n thisTag = props[MudHost.MAIN_HOST].getStr(tagToGet);\n if ((thisTag == null) || (thisTag.length() == 0))\n return defaultVal;\n return thisTag;\n }",
"public String get(Object requestor, String field, String defaultString,\n Object param1);",
"java.lang.String getDetailsOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue);",
"public String get(Object requestor, String field, int type,\n String defaultString, Object param1);",
"public String getParameter(String pname, String defaultValue) {\n\t\tString value = parameters.get(pname);\n\t\tif (value == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\treturn value;\n\t}",
"public final String getPropertyString(String key, String defaultValue) {\n/* 87 */ Object value = Launch.blackboard.get(key);\n/* 88 */ return (value != null) ? value.toString() : defaultValue;\n/* */ }",
"@NotNull\n private static String maybeName(@NotNull String parameterName) {\n return compiler.parametersOptionSupported() ? String.format(\" '%s'\", parameterName) : \"\";\n }",
"public String get(Class requestor, String field, String defaultString,\n Object param1, Object param2);",
"public String getParameter( String name, String default_value )\n {\n return getParameter(VALDEF, name, default_value, false);\n }",
"public String get(Class requestor, String field, int type,\n String defaultString, Object param1, Object param2);",
"public String get(Object requestor, String field, int type,\n String defaultString, Object param1, Object param2);",
"public static String check(String param, String src_default) {\n if (param == null || param.trim().equals(\"\")) {\n return src_default;\n } else {\n return param;\n }\n }",
"public String get(Class requestor, String field, String defaultString,\n Object[] params);",
"public String get(Class requestor, String field, int type,\n String defaultString, Object[] params);",
"java.lang.String getParameterValue();",
"static String getOptionValue(String args[], String optionName, String defaultVal) {\n String argValue = \"\";\n try {\n int i = 0;\n String arg = \"\";\n boolean found = false;\n\n while (i < args.length) {\n arg = args[i++];\n\n if (arg.equals(optionName)) {\n if (i < args.length)\n argValue = args[i++];\n if (argValue.startsWith(\"-\") || argValue.equals(\"\")) {\n argValue = defaultVal;\n }\n found = true;\n }\n }\n\n if (!found) {\n argValue = defaultVal;\n }\n } catch (Exception e) {\n showError(\"getOptionValue\", e);\n }\n\n return argValue;\n }",
"public String get(Object requestor, String field, String defaultString,\n Object param1, Object param2);",
"protected String getApplicationOrSystemProperty(String parameterName,\n String defaultValue) {\n \n String val = null;\n \n // Try application properties\n val = getApplicationProperty(parameterName);\n if (val != null) {\n return val;\n }\n \n // Try system properties\n val = getSystemProperty(parameterName);\n if (val != null) {\n return val;\n }\n \n return defaultValue;\n }",
"public String getParserParameterValue(String parameterName) {\n\t\tString result = null;\n\t\tif (GenericUtils.assertStringValue(parameterName)) {\n\t\t\tObject tmp = parserParamsProp.get(parameterName);\n\t\t\tresult = tmp == null ? null : tmp.toString();\n\t\t}\n\t\treturn result;\n\t}",
"public static String getParameterString(String key, String defaultValue)\n throws Exception {\n String kv = ini.getString(key, defaultValue);\n systemlog(LogType.DEBUG, \"getParam \" + key + \" value: \" + kv);\n return kv;\n }",
"Optional<String> getOName();",
"Object getDefaultValue(String key);",
"public String getAsString(String key, String defaultVal) {\n return entries.getProperty(key, defaultVal);\n }",
"public String get(Object requestor, String field, int type,\n String defaultString, Object[] params);",
"private String getOptionalStringProperty(String[] propertyNameList) {\n\t\tfor (int i = 0; i < propertyNameList.length; ++i) {\n\t\t\tString value = getOptionalStringProperty(propertyNameList[i]);\n\t\t\tif (value != null)\n\t\t\t\treturn value;\n\t\t}\n\t\treturn null;\n\t}",
"private String resolveStringValue()\n {\n ProjectStage ps = null;\n String value = null;\n keyResolved = keyOriginal;\n int keySuffices = 0;\n\n // make the longest key\n // first, try appending resolved parameter\n if (propertyParameter != null && !propertyParameter.isEmpty())\n {\n if (parameterValue != null && !parameterValue.isEmpty())\n {\n keyResolved += \".\" + parameterValue;\n keySuffices++;\n }\n // if parameter value can't be resolved and strictly\n else if (strictly)\n {\n return null;\n }\n }\n\n // try appending projectstage\n if (projectStageAware)\n {\n ps = getProjectStage();\n keyResolved += \".\" + ps;\n keySuffices++;\n }\n\n // make initial resolution of longest key\n value = getPropertyValue(keyResolved);\n\n // try fallbacks if not strictly\n if (value == null && !strictly)\n {\n\n // by the length of the longest resolved key already tried\n // breaks are left out intentionally\n switch (keySuffices)\n {\n\n case 2:\n // try base.param\n keyResolved = keyOriginal + \".\" + parameterValue;\n value = getPropertyValue(keyResolved);\n\n if (value != null)\n {\n return value;\n }\n\n // try base.ps\n ps = getProjectStage();\n keyResolved = keyOriginal + \".\" + ps;\n value = getPropertyValue(keyResolved);\n\n if (value != null)\n {\n return value;\n }\n\n case 1:\n // try base\n keyResolved = keyOriginal;\n value = getPropertyValue(keyResolved);\n return value;\n\n default:\n // the longest key was the base, no fallback\n return null;\n }\n }\n\n return value;\n }",
"public static String getValueOrDefault(String value, String defaultValue) {\n return value != null && !value.isEmpty() ? value : defaultValue;\n }",
"String getValue(String param)\n\t{\n\t\tString value = null;\n\n\t\tif (userSupplied != null && (value = this.userSupplied.get(param)) != null)\n\t\t{\n\t\t\treturn value;\n\t\t}\n\n\t\tElement element = this.parameters.get(param);\n\t\tif (element == null)\n\t\t{\n\t\t\tlog.debug(\"PISE FILE ERROR, expression uses undefined parameter: \" + param);\n\t\t\treturn null;\n\t\t} \n\t\t// When one parameter has an expression that references the value of a disabled parameter\n\t\t// return \"0\" if it's a switch or \"\" for anything else. Similar to what the gui does in\n\t\t// code generator pise2JSP.ftl getValue() function.\n\t\tif (!element.enabled) \n\t\t{\n\t\t\tif (element.type.equals(\"Switch\"))\n\t\t\t{\n\t\t\t\tlog.debug(\"\\tGETVALUE of disabled parameter: \" + param + \" returns '0'\");\n\t\t\t\treturn \"0\";\n\t\t\t} else\n\t\t\t{\n\t\t\t\tlog.debug(\"\\tGETVALUE of disabled parameter: \" + param + \" returns ''\");\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\treturn element.value;\n\t}",
"private String defaultString(String sValue, String sDefault) {\n if (sValue == null || sValue.length() == 0)\n return sDefault;\n\n return sValue;\n }",
"public String get(Object requestor, String field, String defaultString,\n Object[] params);",
"protected String getParamAsString(HttpServletRequest request, String paramName, String defaultValue ) {\n\t\tString paramValue = request.getParameter(paramName);\n\t\tif ( null == paramValue ) {\n\t\t\tif ( defaultValue != null ) {\n\t\t\t\treturn defaultValue ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new TinyMvcException(\"Param '\" + paramName + \"' required\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn paramValue ;\n\t\t}\n\t}",
"public static String getParameterString(String section, String key,\n String defaultValue) throws Exception {\n String kv = ini.getString(section + \".\" + key, defaultValue);\n systemlog(LogType.DEBUG, \"getParam [\" + section + \"] \" + key + \" value: \"\n + kv);\n return kv;\n }",
"java.lang.String getDetailsOrDefault(\n java.lang.String key,\n java.lang.String defaultValue);",
"String getProperty(String name, String defaultValue);",
"com.google.protobuf.Value getDefaultValue();",
"public String getPara(String name, String defaultValue) {\n\t\tString result = request.getParameter(name);\n\t\treturn result != null && !\"\".equals(result) ? result : defaultValue;\n\t}",
"T getDefaultValue();",
"public String getStringProperty(String propertyName, String defaultValue);",
"com.google.protobuf.ByteString\n getOptionalValueBytes();",
"String getSettingByKey(String key, String defaultValue);",
"public String getValue(String opt) {\n return (String)m_commandLine.getValue(opt);\n }",
"public String param() {\n\tif (param_count >= params.size())\n\t return null;\n\treturn (String) params.elementAt(param_count++);\n }",
"public String getProperty(Object obj, String key, String defaultValue);",
"String getDefaultNull();",
"public String getParameter(String name) {\n String[] values = getParameterValues(name);\n return (values != null) ? values[0] : null;\n }",
"default Optional<T> optional(@NonNull final String key) {\n return Optional.ofNullable(get(key));\n }",
"public static final String getParam(Map<String,String> params, String key, String def) {\n\t\tString val = params.get(key);\n\t\treturn val==null ? def : val;\n\t}",
"public static String getParam(String key) {\n Configuration cur = getCurrentConfig();\n if (cur == null) {\n return null;\n }\n return cur.get(key);\n }",
"public String getOptionalStringProperty(String property) {\n\t\treturn testProperties.getProperty(property);\n\t}",
"java.lang.String getPropertiesOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue);",
"public String getString(String key) {\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\tsp = (String) getDefault(key);\n\t\t}\n\t\treturn sp;\n\t}",
"public Object getDefaultValue();",
"public Object getDefaultValue();",
"public Object get(String aName, Object aDefault)\n{\n Object value = get(aName);\n return value!=null? value : aDefault;\n}",
"String get(Object... parameter);",
"public String getMandatoryString(String key) throws ConfigNotFoundException;",
"public String getAsString(String itemName, String defaultValue);",
"public String getOrElse(String key, String defaultValue) {\n\t\tInstant start = Instant.now();\n\t\tString result;\n\t\ttry {\n\t\t\tresult = get(key);\n\t\t} catch (ConfigException e) {\n\t\t\tLOGGER.warn(\"No value was found for key {}: the default value {} will be returned\", key, defaultValue);\n\t\t\tresult = defaultValue;\n\t\t}\n\t\tLOGGER.debug(\"Access to config {} to getOrElse {} took {}\", uniqueInstance.instanceUUID, key, Duration.between(start, Instant.now()));\t\t\n\t\treturn result;\t\t\n\t}",
"ParameterableElement getDefault();",
"@NonNull\n String getOptionalAttribute(final int field);",
"public String getCGIParam(String param) {\n\t\tString retour = cgiParams.get(param);\n\t\tif( param == null || retour == null) {\n\t\t\treturn \"not set\";\n\t\t}\n\t\telse return retour;\n\t}",
"public static String defaultString(String value) {\n return value == null ? \"\" : value;\n }",
"@java.lang.Override\n public /* nullable */ java.lang.String getOptionsOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map = internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"static Object missingValue(Class type) {\n if (!OptionalParameter.class.isAssignableFrom(type)) {\n return null;\n } else if (type == OptString.class) {\n return OptString.theMissingValue;\n } else if (type == OptBoolean.class) {\n return OptBoolean.theMissingValue;\n } else if (type == OptInteger.class) {\n return OptInteger.theMissingValue;\n } else if (type == OptDouble.class) {\n return OptDouble.theMissingValue;\n } else {\n return null;\n }\n }",
"String getString( String key, String def);",
"@java.lang.Override\n public /* nullable */ java.lang.String getOptionsOrDefault(\n java.lang.String key,\n /* nullable */\n java.lang.String defaultValue) {\n if (key == null) {\n throw new NullPointerException(\"map key\");\n }\n java.util.Map<java.lang.String, java.lang.String> map = internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"java.lang.String getStringValue();",
"java.lang.String getStringValue();",
"Optional<String> getFirstname();",
"public String getParameter(String name) {\n String[] values = getParameterValues(name);\n if (values != null && values.length > 0) {\n return values[0];\n }\n else {\n return null;\n }\n }",
"@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }",
"@Override\n\n public String getOptionsOrDefault(\n String key,\n String defaultValue) {\n if (key == null) { throw new NullPointerException(); }\n java.util.Map<String, String> map =\n internalGetOptions().getMap();\n return map.containsKey(key) ? map.get(key) : defaultValue;\n }"
] | [
"0.77982324",
"0.66970664",
"0.6649908",
"0.6649908",
"0.6504792",
"0.63130194",
"0.6281477",
"0.6275971",
"0.627488",
"0.627488",
"0.61925584",
"0.61925584",
"0.6137935",
"0.61085105",
"0.61081636",
"0.60938656",
"0.60938656",
"0.60938656",
"0.60587424",
"0.60325444",
"0.60262764",
"0.6020773",
"0.6015087",
"0.5925836",
"0.5915969",
"0.5905227",
"0.59044385",
"0.5854768",
"0.5854704",
"0.5847509",
"0.58369124",
"0.58335644",
"0.5833257",
"0.5818327",
"0.5813527",
"0.5799497",
"0.5777092",
"0.5769704",
"0.5742745",
"0.5740339",
"0.57394814",
"0.57363164",
"0.57321644",
"0.57262874",
"0.57198143",
"0.56965584",
"0.56751347",
"0.5656284",
"0.56526023",
"0.5651616",
"0.56453943",
"0.5641119",
"0.562771",
"0.5624153",
"0.5610443",
"0.5606934",
"0.56046623",
"0.5582573",
"0.55812925",
"0.5574965",
"0.55666804",
"0.55596614",
"0.55358",
"0.55298233",
"0.5523736",
"0.55133265",
"0.55088407",
"0.54982823",
"0.5469752",
"0.5467372",
"0.54622066",
"0.5441657",
"0.5435834",
"0.54354894",
"0.54275113",
"0.5421388",
"0.5417739",
"0.5417474",
"0.54123324",
"0.541227",
"0.541227",
"0.5402743",
"0.5396404",
"0.53857774",
"0.5378126",
"0.53780144",
"0.5371126",
"0.5364347",
"0.53596467",
"0.53518754",
"0.5349708",
"0.53481036",
"0.53411776",
"0.5327761",
"0.53246325",
"0.53246325",
"0.53190994",
"0.53146195",
"0.53084797",
"0.53084797"
] | 0.6226246 | 10 |
Return Character set decoder for encoding with an InputStreamReader from optional parameter with single value. Return null if parameter was not set. Parameter is "encoding". | public static CharsetDecoder getEncoding(RuntimeContract contract, String parameter) throws IllegalUsageException {
if (contract.hasArgumentClause(parameter)) try {
return getEncoding(contract.useArgumentClause(parameter).getSingleValue());
}
catch(IllegalArgumentException e) {
throw new IllegalUsageException(e.getMessage());
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private CharsetDecoder decoderFromExternalDeclaration(String encoding)\n throws SAXException {\n if (encoding == null) {\n return null;\n }\n encoding = encoding.toUpperCase();\n if (\"ISO-8859-1\".equals(encoding)) {\n encoding = \"Windows-1252\";\n }\n if (\"UTF-16\".equals(encoding) || \"UTF-32\".equals(encoding)) {\n swallowBom = false;\n }\n try {\n Charset cs = Charset.forName(encoding);\n String canonName = cs.name();\n if (canonName.startsWith(\"X-\") || canonName.startsWith(\"x-\")\n || canonName.startsWith(\"Mac\")) {\n if (encoding.startsWith(\"X-\")) {\n err(\"The encoding \\u201C\"\n + encoding\n + \"\\u201D is not an IANA-registered encoding. (Charmod C022)\");\n } else {\n err(\"The encoding \\u201C\"\n + encoding\n + \"\\u201D is not an IANA-registered encoding and did\\u2019t start with \\u201CX-\\u201D. (Charmod C023)\");\n }\n } else if (!canonName.equalsIgnoreCase(encoding)) {\n err(\"The encoding \\u201C\"\n + encoding\n + \"\\u201D is not the preferred name of the character encoding in use. The preferred name is \\u201C\"\n + canonName + \"\\u201D. (Charmod C024)\");\n }\n if (EncodingInfo.isObscure(canonName)) {\n warn(\"The character encoding \\u201C\"\n + encoding\n + \"\\u201D is not widely supported. Better interoperability may be achieved by using \\u201CUTF-8\\u201D.\");\n }\n return cs.newDecoder();\n } catch (IllegalCharsetNameException e) {\n err(\"Illegal character encoding name: \\u201C\" + encoding\n + \"\\u201D. Will sniff.\");\n } catch (UnsupportedCharsetException e) {\n err(\"Unsupported character encoding name: \\u201C\" + encoding\n + \"\\u201D. Will sniff.\");\n swallowBom = true;\n }\n return null; // keep the compiler happy\n }",
"private CharsetDecoder getJavaEncoding(String encoding) {\n Charset charset = Charset.forName(encoding);\n return charset.newDecoder();\n }",
"Charset getEncoding();",
"public static CharsetDecoder getEncoding(String encode) throws IllegalArgumentException {\r\n\t\tCharsetDecoder charsetDecoder = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tcharsetDecoder = Charset.forName(encode).newDecoder();\r\n\t\t\tcharsetDecoder.onMalformedInput(CodingErrorAction.REPLACE);\r\n\t\t\tcharsetDecoder.onUnmappableCharacter(CodingErrorAction.REPLACE);\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e) {\r\n\t\t\t// Add a hint to error message\r\n\t\t\tthrow new IllegalArgumentException(\"Not a supported character set \\\"\" + encode + \"\\\". Try UTF-8. \" + e.getMessage());\r\n\t\t}\r\n\t\treturn charsetDecoder;\r\n\t}",
"String getEncoding();",
"private static Charset lookup(String enc) {\n try {\n if (enc != null && Charset.isSupported(enc)) {\n return Charset.forName(enc);\n }\n } catch (IllegalArgumentException ex) {\n // illegal charset name\n // unsupport charset\n }\n return null;\n }",
"public EncodingOptions getEncodingOptions();",
"public String decode(String str, String charsetName) throws DecoderException, UnsupportedEncodingException {\n/* 276 */ if (str == null) {\n/* 277 */ return null;\n/* */ }\n/* 279 */ return new String(decode(StringUtils.getBytesUsAscii(str)), charsetName);\n/* */ }",
"String getSupportedEncoding(String acceptableEncodings);",
"public String getDeclaredEncoding();",
"String getCharset();",
"EncodingEnum getEncoding();",
"public interface CharsetDecoder {\r\n\r\n /** Minimum number of characters produced per byte using\r\n * this decoder.\r\n */\r\n public int minBytesPerChar();\r\n\r\n /** Minimum number of characters produced per byte using\r\n * this decoder.\r\n */\r\n public int maxBytesPerChar();\r\n\r\n\r\n /**\r\n * Decodes an array of bytes into characters.\r\n *\r\n * @param in_buf input byte buffer\r\n * @param in_off starting byte buffer offset\r\n * @param in_len max number of bytes to read\r\n * @param out_buf output character buffer\r\n * @param out_off char buffer offset at which to start writing\r\n * @param out_len max number of chars to write\r\n * @param result an array of size >= 2 where results are returned:\r\n * result[0] = number of bytes read.\r\n * result[1] = number of chars written\r\n */\r\n public void decode(byte[] in_buf, int in_off, int in_len,\r\n char[] out_buf, int out_off, int out_len, int[] result)\r\n throws CharConversionException;\r\n\r\n public CharsetDecoder newCharsetDecoder();\r\n public void reset();\r\n}",
"private static CharsetEncoder getCoder(String charset) throws UnsupportedEncodingException\n\t{\n\t\tcharset = charset.toLowerCase();\t\t\n\t\tif (charset.equals(\"iso-8859-1\") || charset.equals(\"latin1\"))\t\t\t\n\t\t\treturn new Latin1Encoder();\n\t\tif (charset.equals(\"utf-8\") || charset.equals(\"utf8\"))\t\t\t\n\t\t\treturn new UTF8Encoder();\n\t\t\n\t\tthrow new UnsupportedEncodingException(\"unsupported encoding \"+charset);\n\t}",
"public Charset getPreferredCharset();",
"public String getEncoding() {\n \t return null;\n \t }",
"public String getEncoding() {\n \t return null;\n \t }",
"public InputStreamReader getInputStreamReader()\n/* */ {\n/* 118 */ InputStream in = ResourceUtils.getResourceAsStream(this, this);\n/* */ \n/* 120 */ if (in == null) {\n/* 121 */ return null;\n/* */ }\n/* */ \n/* 124 */ InputStreamReader reader = new InputStreamReader(in);\n/* */ \n/* 126 */ return reader;\n/* */ }",
"@Override\n\t\tpublic String getCharacterEncoding() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic String getCharacterEncoding() {\n\t\treturn null;\n\t}",
"public String getEncoding() {\n return null;\n }",
"public void setEncoding (String encoding) {\n this.encoding = encoding;\n }",
"public String getResponseCharset()\r\n {\r\n Header header = httpMethod.getResponseHeader( \"Content-Type\" );\r\n if( header != null )\r\n {\r\n for( HeaderElement headerElement : header.getElements() )\r\n {\r\n NameValuePair parameter = headerElement.getParameterByName( \"charset\" );\r\n if( parameter != null )\r\n return parameter.getValue();\r\n }\r\n }\r\n \r\n Header contentEncodingHeader = httpMethod.getResponseHeader( \"Content-Encoding\" );\r\n if( contentEncodingHeader != null )\r\n {\r\n try\r\n {\r\n String value = contentEncodingHeader.getValue();\r\n if( CompressionSupport.getAvailableAlgorithm( value ) == null )\r\n {\r\n new String( \"\" ).getBytes( value );\r\n return value;\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n }\r\n }\r\n \r\n return null;\r\n }",
"public void setEncoding(String encoding) {\n this.encoding = encoding == null ? null : encoding.trim();\n }",
"public Optional<String> charset() {\n return body.contentType()\n .flatMap(\n h -> {\n String[] parts = SPLIT_CHARSET.split(h, 2);\n if (parts.length > 1) {\n String charset = parts[1];\n return Optional.of(charset.trim());\n } else {\n return Optional.empty();\n }\n });\n }",
"public String decode(String str) throws DecoderException {\n/* 295 */ if (str == null) {\n/* 296 */ return null;\n/* */ }\n/* */ try {\n/* 299 */ return decode(str, getDefaultCharset());\n/* 300 */ } catch (UnsupportedEncodingException e) {\n/* 301 */ throw new DecoderException(e.getMessage(), e);\n/* */ } \n/* */ }",
"protected final void setEncoding( String encoding )\n throws SAXException\n {\n if ( _inputSource.getByteStream() != null ) {\n if ( ! encoding.equalsIgnoreCase( _inputSource.getEncoding() ) ) {\n _inputSource.setEncoding( encoding );\n try {\n _reader = new InputStreamReader( new BufferedInputStream( _inputSource.getByteStream() ), encoding );\n } catch ( UnsupportedEncodingException except ) {\n error( WELL_FORMED, format( \"Parser014\", encoding ) );\n }\n }\n }\n else\n if ( isWarning() && _inputSource.getEncoding() != null &&\n ! encoding.equalsIgnoreCase( _inputSource.getEncoding() ) )\n warning( format( \"Parser015\", _inputSource.getEncoding(), encoding ) ); \n }",
"public void setEncoding(String encoding) {\r\n this.encoding = encoding;\r\n }",
"String getUseNativeEncoding();",
"@Override\n public String getCharacterEncoding() {\n return null;\n }",
"public void setInputEncoding(String inputEncoding) {\r\n this.inputEncoding = inputEncoding;\r\n }",
"public void setEncoding(String encoding) {\n this.encoding = encoding;\n }",
"public void setEncoding(String encoding) {\n this.encoding = encoding;\n }",
"public void setEncoding(String encoding) {\n this.encoding = encoding;\n }",
"public String getCharacterEncoding() {\n\t\treturn null;\n\t}",
"public interface ExtraEncoding {\n \n /**\n * Converts an Unicode string to a byte array according to some encoding.\n * @param text the Unicode string\n * @param encoding the requested encoding. It's mainly of use if the same class\n * supports more than one encoding.\n * @return the conversion or <CODE>null</CODE> if no conversion is supported\n */ \n public byte[] charToByte(String text, String encoding);\n \n /**\n * Converts an Unicode char to a byte array according to some encoding.\n * @param char1 the Unicode char\n * @param encoding the requested encoding. It's mainly of use if the same class\n * supports more than one encoding.\n * @return the conversion or <CODE>null</CODE> if no conversion is supported\n */ \n public byte[] charToByte(char char1, String encoding);\n \n /**\n * Converts a byte array to an Unicode string according to some encoding.\n * @param b the input byte array\n * @param encoding the requested encoding. It's mainly of use if the same class\n * supports more than one encoding.\n * @return the conversion or <CODE>null</CODE> if no conversion is supported\n */\n public String byteToChar(byte b[], String encoding); \n}",
"@java.lang.Override\n public int getEncodingValue() {\n return encoding_;\n }",
"public String getCharSet()\n\t{\n\t\tParameterParser parser = new ParameterParser();\n\t\tparser.setLowerCaseNames(true);\n\t\t// Parameter parser can handle null input\n\t\tMap<?, ?> params = parser.parse(getContentType(), ';');\n\t\treturn (String)params.get(\"charset\");\n\t}",
"public interface Encoding {\n String encode(String encodeValue);\n String decode(String encodedValue);\n}",
"public void setEncoding(String encoding) {\n this.encoding = encoding;\n }",
"public String decode(String encoding) {\n\t\tString decoded = \"\";\n\t\tString currCode = \"\";\n\t\tMap<String, Character> revMap = new HashMap<String, Character>();\n\t\t\n\t\t// Build hashmap from value to key\n\t\tfor (Character code: this.mapping.keySet()) {\n\t\t\trevMap.put(this.mapping.get(code), code);\n\t\t}\n\t\t\n\t\tfor (Character c: encoding.toCharArray()) {\n\t\t\tcurrCode += c;\n\t\t\tCharacter toAdd = revMap.get(currCode);\n\t\t\tif (toAdd != null) {\n\t\t\t\tdecoded += toAdd;\n\t\t\t\tcurrCode = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn decoded;\n\t}",
"private static CharSequence decodedString(String string) {\n\t\treturn null;\r\n\t}",
"public void setEncoding(String encoding) {\n\t\tthis.encoding = encoding;\n\t}",
"public String getJavaEncoding();",
"public void setEncoding(String e) {\n\t\tthis.encoding = e;\n\t}",
"public String decode(String pString, String charset) \n throws DecoderException, UnsupportedEncodingException \n {\n if (pString == null) {\n return null;\n }\n return new String(decode(pString.getBytes(US_ASCII)), charset);\n }",
"@Nullable\n private static HttpEncodingType determineEncoding(String acceptEncoding) {\n float starQ = -1.0f;\n final Map<HttpEncodingType, Float> encodings = new LinkedHashMap<>();\n for (String encoding : acceptEncoding.split(\",\")) {\n float q = 1.0f;\n final int equalsPos = encoding.indexOf('=');\n if (equalsPos != -1) {\n try {\n q = Float.parseFloat(encoding.substring(equalsPos + 1));\n } catch (NumberFormatException e) {\n // Ignore encoding\n q = 0.0f;\n }\n }\n if (encoding.contains(\"*\")) {\n starQ = q;\n } else if (encoding.contains(\"br\") && Brotli.isAvailable()) {\n encodings.put(HttpEncodingType.BROTLI, q);\n } else if (encoding.contains(\"gzip\")) {\n encodings.put(HttpEncodingType.GZIP, q);\n } else if (encoding.contains(\"deflate\")) {\n encodings.put(HttpEncodingType.DEFLATE, q);\n }\n }\n\n if (!encodings.isEmpty()) {\n final Entry<HttpEncodingType, Float> entry = Collections.max(encodings.entrySet(),\n Entry.comparingByValue());\n if (entry.getValue() > 0.0f) {\n return entry.getKey();\n }\n }\n if (starQ > 0.0f) {\n if (!encodings.containsKey(HttpEncodingType.BROTLI) && Brotli.isAvailable()) {\n return HttpEncodingType.BROTLI;\n }\n if (!encodings.containsKey(HttpEncodingType.GZIP)) {\n return HttpEncodingType.GZIP;\n }\n if (!encodings.containsKey(HttpEncodingType.DEFLATE)) {\n return HttpEncodingType.DEFLATE;\n }\n }\n return null;\n }",
"@java.lang.Override\n public int getEncodingValue() {\n return encoding_;\n }",
"public void setEncoding(Encoding encoding) {\n this.encoding = encoding;\n }",
"public interface Encoding {\n\t/**\n\t * Encoding a string.\n\t * \n\t * @param source\n\t * @return The encoded string\n\t * @throws Exception\n\t */\n\tpublic String encode(String source) throws Exception;\n\n\t/**\n\t * Decoding a string.\n\t * \n\t * @param source\n\t * @return The decoded string\n\t * @throws Exception\n\t */\n\tpublic String decode(String source) throws Exception;\n\n}",
"@Override\n\t\tpublic void setCharacterEncoding(String env) throws UnsupportedEncodingException {\n\t\t\t\n\t\t}",
"public org.apache.xmlbeans.XmlAnySimpleType getInputEncoding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlAnySimpleType target = null;\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_store().find_attribute_user(INPUTENCODING$16);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlAnySimpleType)get_default_attribute_value(INPUTENCODING$16);\n }\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public String getEncoding () {\n return encoding;\n }",
"public String getEncoding() {\n return encoding;\n }",
"private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private Encoding retrieveEncoding(Path file) {\n if (this.fileEncodings != null) {\n Encoding encoding = this.fileEncodings.get(file.toString());\n if (encoding != null) {\n return encoding;\n }\n }\n return this.encoding == null ? Encoding.DEFAULT_ENCODING : this.encoding;\n }",
"private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }",
"public static String readString(InputStream is, String encoding) {\n \t\tif (is == null)\n \t\t\treturn null;\n \t\tBufferedReader reader= null;\n \t\ttry {\n \t\t\tStringBuffer buffer= new StringBuffer();\n \t\t\tchar[] part= new char[2048];\n \t\t\tint read= 0;\n \t\t\treader= new BufferedReader(new InputStreamReader(is, encoding));\n \n \t\t\twhile ((read= reader.read(part)) != -1)\n \t\t\t\tbuffer.append(part, 0, read);\n \t\t\t\n \t\t\treturn buffer.toString();\n \t\t\t\n \t\t} catch (IOException ex) {\n \t\t\tCompareUIPlugin.log(ex);\n \t\t} finally {\n \t\t\tif (reader != null) {\n \t\t\t\ttry {\n \t\t\t\t\treader.close();\n \t\t\t\t} catch (IOException ex) {\n \t\t\t\t\t// silently ignored\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\treturn null;\n \t}",
"public boolean isSetEncoding() {\n return this.encoding != null;\n }",
"public NonAnnotatedEncodeableEncoderDecoderSpecifiedUsingConfiguration() {}",
"public String getEncoding() {\n return encoding;\n }",
"public String getEncoding() {\n return encoding;\n }",
"public String getEncoding() {\n return encoding;\n }",
"String getContentEncoding();",
"@Override\n\tpublic void setCharacterEncoding(String env) throws UnsupportedEncodingException {\n\t\t\n\t}",
"TextDecoder getTextDecoder();",
"private void setContentType(String contentType) throws IOException {\n if (localEncoding !=\"\"){ return; } // Don't change Encoding Twice\n StringTokenizer tok = new StringTokenizer(contentType,\";\");\n if (tok.countTokens()<2){ return;}\n tok.nextToken();\n String var = tok.nextToken(\"=\");\n if (var.length()<1){ return; }\n if (var.charAt(0)==';'){ var = var.substring(1); }\n int j=0;\n for(int i=0; i<var.length();i++){\n if (var.charAt(i)==' '){ j++;} else { break;}\n }\n var = var.substring(j);\n if (!var.equalsIgnoreCase(\"charset\")){ return;}\n String charSet = tok.nextToken();\n if (charSet.equals(characterEncoding)){ return; } // Already correct Encoding\n if (inputStream == null){\n throw new IOException(\"HTML Parser called with Reader cannot change Encoding\");\n }\n if (! (inputStream instanceof OpenByteArrayInputStream) ){\n throw new IOException(\"HTML Parser not called with OpenByteArrayInputStream\");\n }\n OpenByteArrayInputStream obais = (OpenByteArrayInputStream) inputStream;\n byte[] buf = obais.getBuffer();\n int length = obais.getLength();\n int offset = obais.getOffset();\n reader.close();\n obais.close();\n obais = new OpenByteArrayInputStream(buf,offset,length);\n inputStream = obais;\n try {\n reader = new BufferedReader(new InputStreamReader(obais,charSet),1024);\n } catch (UnsupportedEncodingException e){\n Logging.warning(\"Unknown charset \"+charSet+\" parsing with default ISO-8859-1 charSet\");\n System.err.println(\"Unknown charset \"+charSet+\" parsing with default ISO-8859-1 charSet\");\n reader = new BufferedReader(new InputStreamReader(obais),1024);\n charSet = \"iso-8859-1\";\n }\n Logging.info(\"Changed Encoding to \"+charSet);\n System.err.println(\"Changed Encoding to \"+charSet);\n reset();\n characterEncoding = charSet;\n localEncoding = charSet;\n // We will restart reading the file from the beginning\n return;\n }",
"@Override\n public Reader getInputStreamReader() throws IOException {\n return new InputStreamReader(getInputStream());\n }",
"@Override\n public void setCharacterEncoding(String arg0) {\n\n }",
"String decodeString();",
"@Accessor(qualifier = \"encoding\", type = Accessor.Type.GETTER)\n\tpublic EncodingEnum getEncoding()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(ENCODING);\n\t}",
"public Reader getReader(Object templateSource, String encoding)\r\n/* 43: */ throws IOException\r\n/* 44: */ {\r\n/* 45:75 */ Resource resource = (Resource)templateSource;\r\n/* 46: */ try\r\n/* 47: */ {\r\n/* 48:77 */ return new InputStreamReader(resource.getInputStream(), encoding);\r\n/* 49: */ }\r\n/* 50: */ catch (IOException ex)\r\n/* 51: */ {\r\n/* 52:80 */ if (this.logger.isDebugEnabled()) {\r\n/* 53:81 */ this.logger.debug(\"Could not find FreeMarker template: \" + resource);\r\n/* 54: */ }\r\n/* 55:83 */ throw ex;\r\n/* 56: */ }\r\n/* 57: */ }",
"Object decode(String encoded);",
"public String getEncoding() {\r\n\t\treturn encoding;\r\n\t}",
"public void testEncodingAndType() throws Exception {\n \t// check default\n \tSampleResult res = new SampleResult();\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"DataType should be blank\",\"\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n \t\n \t// check null changes nothing\n \tres.setEncodingAndType(null);\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"DataType should be blank\",\"\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n\n \t// check no charset\n \tres.setEncodingAndType(\"text/html\");\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncoding());\n \tassertEquals(SampleResult.DEFAULT_ENCODING,res.getDataEncodingWithDefault());\n \tassertEquals(\"text\",res.getDataType());\n \tassertNull(res.getDataEncodingNoDefault());\n\n \t// Check unquoted charset\n \tres.setEncodingAndType(\"text/html; charset=aBcd\");\n \tassertEquals(\"aBcd\",res.getDataEncodingWithDefault());\n \tassertEquals(\"aBcd\",res.getDataEncodingNoDefault());\n \tassertEquals(\"aBcd\",res.getDataEncoding());\n \tassertEquals(\"text\",res.getDataType());\n\n \t// Check quoted charset\n \tres.setEncodingAndType(\"text/html; charset=\\\"aBCd\\\"\");\n \tassertEquals(\"aBCd\",res.getDataEncodingWithDefault());\n \tassertEquals(\"aBCd\",res.getDataEncodingNoDefault());\n \tassertEquals(\"aBCd\",res.getDataEncoding());\n \tassertEquals(\"text\",res.getDataType()); \t\n }",
"Builder addEncoding(String value);",
"public static String guessAppropriateEncoding(CharSequence contents) {\n for (int i = 0; i < contents.length(); i++) {\n if (contents.charAt(i) > 0xFF) {\n return \"UTF-8\";\n }\n }\n return null;\n }",
"public String decode(String pString) throws DecoderException {\n if (pString == null) {\n return null;\n }\n try {\n return decode(pString, getDefaultCharset());\n } catch(UnsupportedEncodingException e) {\n throw new DecoderException(e.getMessage());\n }\n }",
"@Deprecated\n/* */ public String getEncoding() {\n/* 371 */ return this.charset;\n/* */ }",
"public String getEncoding() {\n return encoding;\n }",
"protected static String parseCharset(String aContentType)\r\n {\r\n if ( AeUtil.isNullOrEmpty(aContentType) )\r\n return null;\r\n\r\n StringTokenizer outer = new StringTokenizer(aContentType, \";\", false); //$NON-NLS-1$\r\n StringTokenizer inner = null;\r\n String element = null;\r\n String charset = null;\r\n int startIndex = 0;\r\n int stopIndex = 0;\r\n while (outer.hasMoreTokens())\r\n {\r\n element = outer.nextToken();\r\n inner = new StringTokenizer(element, \"=\", false); //$NON-NLS-1$\r\n if ( inner.countTokens() == 2 )\r\n {\r\n if ( inner.nextToken().trim().equalsIgnoreCase(\"charset\") ) //$NON-NLS-1$\r\n {\r\n charset = inner.nextToken();\r\n // strip quotes\r\n if ( charset.startsWith(QUOTE) )\r\n {\r\n startIndex = 1;\r\n stopIndex = (charset.length() > 0) ? charset.length() - 1 : 0;\r\n }\r\n else\r\n {\r\n startIndex = 0;\r\n stopIndex = charset.length();\r\n }\r\n\r\n if ( startIndex != 0 || stopIndex != charset.length() )\r\n {\r\n charset = charset.substring(startIndex, stopIndex);\r\n }\r\n return charset;\r\n }\r\n }\r\n }\r\n return null;\r\n }",
"private static String decode(final InputStream input, final String charset) throws XHTMLTidyException {\n\t\ttry {\n\t\t\tfinal CharsetDecoder charsetDecoder = Charset.forName(charset).newDecoder();\n\t\t\tcharsetDecoder.onMalformedInput(CodingErrorAction.REPLACE);\n\t\t\tcharsetDecoder.onUnmappableCharacter(CodingErrorAction.REPORT);\n\t\t\tfinal Reader reader = new InputStreamReader(input, charsetDecoder);\n\t\t\tfinal CharBuffer buffer = CharBuffer.allocate(input.available());\n\t\t\treader.read(buffer);\n\t\t\tbuffer.compact();\n\t\t\tfinal String text = new String(buffer.array());\n\t\t\tbuffer.clear();\n\t\t\treturn text;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new XHTMLTidyException(e);\n\t\t}\n\t}",
"public String getEncoding() {\n\t\treturn this.encoding;\n\t}",
"public MyEncodableWithEncoderDecoderSpecifiedUsingConfiguration() {}",
"@Override\n\tpublic CharsetEncoder newEncoder() {\n\t\treturn null;\n\t}",
"public CharsetDecoder newDecoder() { \n throw new Error(\"Decoder is not implemented for Symbol Charset\");\n }",
"@BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@DOMSupport(DomLevel.THREE)\r\n\t@Property String getInputEncoding();",
"private Charset getCharset(ResponseBody body) {\n MediaType contentType = body.contentType();\n return contentType != null ? contentType.charset(Util.UTF_8) : Util.UTF_8;\n }",
"public static JSONDecoder getDecoder() throws CharonException {\n return decoder;\n }",
"public static ChecksumEncoder getInstance(String encoding,\n Configuration config,\n InputStream in)\n {\n if (encoding == null || config == null || in == null)\n throw new NullPointerException();\n if (encoding.length() == 0)\n throw new IllegalArgumentException();\n try {\n Class clazz = Class.forName(System.getProperty(PROPERTY + encoding));\n if (!ChecksumEncoder.class.isAssignableFrom(clazz))\n throw new IllegalArgumentException(clazz.getName() +\n \": not a subclass of \" +\n ChecksumEncoder.class.getName());\n Constructor c = clazz.getConstructor(new Class[] { Configuration.class,\n InputStream.class });\n return (ChecksumEncoder) c.newInstance(new Object[] { config, in } );\n } catch (ClassNotFoundException cnfe) {\n throw new IllegalArgumentException(\"class not found: \" +\n cnfe.getMessage());\n } catch (NoSuchMethodException nsme) {\n throw new IllegalArgumentException(\"subclass has no constructor\");\n } catch (InvocationTargetException ite) {\n throw new IllegalArgumentException(ite.getMessage());\n } catch (InstantiationException ie) {\n throw new IllegalArgumentException(ie.getMessage());\n } catch (IllegalAccessException iae) {\n throw new IllegalArgumentException(iae.getMessage());\n }\n }",
"public String decode(String cipher)\n {\n \treturn null;\n }",
"public String getEncoding() {\n\t\treturn encoding;\n\t}",
"public void setEncoding(String encoding)\n\t\t{\n\t\t\tm_encoding = encoding;\n\t\t}",
"public MyEncodableUsingEncoderDecoderName() {}",
"public String decode(String cipher)\n\t {\n\t \treturn null;\n\t }",
"private static String decodeString(String encoded) throws NullPointerException {\n byte[] dataDec = Base64.decode(encoded, Base64.DEFAULT);\n String decodedString = \"\";\n try {\n decodedString = new String(dataDec, \"UTF-8\");\n } catch (UnsupportedEncodingException ignored) {\n }\n return decodedString;\n }",
"public static String getContentType(InputStream is) throws IOException {\n\n String encoding = \"UTF-8\"; //default\n\n\n // cerca se il documento specifica un altro encoding\n if (is != null) {\n StringBuilder sb = new StringBuilder();\n String line;\n\n BufferedReader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));//\"UTF-8\"));\n while ((line = reader.readLine()) != null) { //CRASHA\n sb.append(line).append(\"\\n\");\n if ((sb.toString().contains(\"<?\") && sb.toString().contains(\"?>\")) && sb.toString().contains(\"encoding=\")) {\n\n Pattern p = Pattern.compile(\".*<\\\\?.*encoding=.(.*).\\\\?>.*\", Pattern.DOTALL);\n\n Matcher matcher = p.matcher(sb.toString());\n\n if (matcher.matches()) {\n encoding = matcher.group(1);\n }\n\n break;\n }\n }\n\n }\n\n return encoding;\n }",
"public PEASEncoder(Charset charset) {\n if (charset == null) {\n throw new NullPointerException(\"charset\");\n }\n this.charset = charset;\n }",
"@Override\n public Reader getReader(final Object templateSource, final String encoding) throws IOException {\n try (final Reader reader = delegate.getReader(templateSource, encoding)) {\n final String templateText = IOUtils.toString(reader);\n if (!templateText.contains(\"<#ftl\")) {\n return new StringReader(ESCAPE_PREFIX + templateText + ESCAPE_SUFFIX);\n } else {\n return new StringReader(templateText);\n }\n }\n }"
] | [
"0.6713104",
"0.6434402",
"0.6026648",
"0.59954363",
"0.55920887",
"0.55829126",
"0.55101585",
"0.5440929",
"0.5408859",
"0.5352376",
"0.5291885",
"0.5272735",
"0.52616453",
"0.5233905",
"0.5164617",
"0.50983447",
"0.50983447",
"0.50861746",
"0.5085846",
"0.50815463",
"0.502456",
"0.50237143",
"0.5023646",
"0.5010147",
"0.5009793",
"0.5008996",
"0.49837986",
"0.49762687",
"0.49692506",
"0.49647614",
"0.49569726",
"0.49424893",
"0.49424893",
"0.49424893",
"0.4935871",
"0.49201152",
"0.4909225",
"0.48917314",
"0.48864064",
"0.48809493",
"0.48755217",
"0.48293635",
"0.4813565",
"0.4788017",
"0.47846103",
"0.47770566",
"0.4768358",
"0.47581562",
"0.47562778",
"0.47472915",
"0.4745072",
"0.4722705",
"0.47222096",
"0.47180587",
"0.4711013",
"0.4711013",
"0.47088614",
"0.47071657",
"0.47036377",
"0.46886903",
"0.46576285",
"0.46559915",
"0.46559915",
"0.46559915",
"0.46556365",
"0.4628751",
"0.4626509",
"0.462528",
"0.46207333",
"0.46125203",
"0.4607255",
"0.46029845",
"0.45959902",
"0.45874155",
"0.45873725",
"0.45846066",
"0.45826006",
"0.45814243",
"0.45739874",
"0.4571148",
"0.45661354",
"0.45608863",
"0.45562842",
"0.45531565",
"0.45504734",
"0.4526177",
"0.45239046",
"0.4521577",
"0.45124465",
"0.45094347",
"0.45006138",
"0.4500354",
"0.4498597",
"0.44973817",
"0.44925722",
"0.44871792",
"0.44862834",
"0.44826755",
"0.44792032",
"0.4471422"
] | 0.63213223 | 2 |
Return Character set decoder for encoding with an InputStreamReader from encoding. | public static CharsetDecoder getEncoding(String encode) throws IllegalArgumentException {
CharsetDecoder charsetDecoder = null;
try {
charsetDecoder = Charset.forName(encode).newDecoder();
charsetDecoder.onMalformedInput(CodingErrorAction.REPLACE);
charsetDecoder.onUnmappableCharacter(CodingErrorAction.REPLACE);
}
catch(IllegalArgumentException e) {
// Add a hint to error message
throw new IllegalArgumentException("Not a supported character set \"" + encode + "\". Try UTF-8. " + e.getMessage());
}
return charsetDecoder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private CharsetDecoder decoderFromExternalDeclaration(String encoding)\n throws SAXException {\n if (encoding == null) {\n return null;\n }\n encoding = encoding.toUpperCase();\n if (\"ISO-8859-1\".equals(encoding)) {\n encoding = \"Windows-1252\";\n }\n if (\"UTF-16\".equals(encoding) || \"UTF-32\".equals(encoding)) {\n swallowBom = false;\n }\n try {\n Charset cs = Charset.forName(encoding);\n String canonName = cs.name();\n if (canonName.startsWith(\"X-\") || canonName.startsWith(\"x-\")\n || canonName.startsWith(\"Mac\")) {\n if (encoding.startsWith(\"X-\")) {\n err(\"The encoding \\u201C\"\n + encoding\n + \"\\u201D is not an IANA-registered encoding. (Charmod C022)\");\n } else {\n err(\"The encoding \\u201C\"\n + encoding\n + \"\\u201D is not an IANA-registered encoding and did\\u2019t start with \\u201CX-\\u201D. (Charmod C023)\");\n }\n } else if (!canonName.equalsIgnoreCase(encoding)) {\n err(\"The encoding \\u201C\"\n + encoding\n + \"\\u201D is not the preferred name of the character encoding in use. The preferred name is \\u201C\"\n + canonName + \"\\u201D. (Charmod C024)\");\n }\n if (EncodingInfo.isObscure(canonName)) {\n warn(\"The character encoding \\u201C\"\n + encoding\n + \"\\u201D is not widely supported. Better interoperability may be achieved by using \\u201CUTF-8\\u201D.\");\n }\n return cs.newDecoder();\n } catch (IllegalCharsetNameException e) {\n err(\"Illegal character encoding name: \\u201C\" + encoding\n + \"\\u201D. Will sniff.\");\n } catch (UnsupportedCharsetException e) {\n err(\"Unsupported character encoding name: \\u201C\" + encoding\n + \"\\u201D. Will sniff.\");\n swallowBom = true;\n }\n return null; // keep the compiler happy\n }",
"private CharsetDecoder getJavaEncoding(String encoding) {\n Charset charset = Charset.forName(encoding);\n return charset.newDecoder();\n }",
"Charset getEncoding();",
"public String decode(String str, String charsetName) throws DecoderException, UnsupportedEncodingException {\n/* 276 */ if (str == null) {\n/* 277 */ return null;\n/* */ }\n/* 279 */ return new String(decode(StringUtils.getBytesUsAscii(str)), charsetName);\n/* */ }",
"public interface CharsetDecoder {\r\n\r\n /** Minimum number of characters produced per byte using\r\n * this decoder.\r\n */\r\n public int minBytesPerChar();\r\n\r\n /** Minimum number of characters produced per byte using\r\n * this decoder.\r\n */\r\n public int maxBytesPerChar();\r\n\r\n\r\n /**\r\n * Decodes an array of bytes into characters.\r\n *\r\n * @param in_buf input byte buffer\r\n * @param in_off starting byte buffer offset\r\n * @param in_len max number of bytes to read\r\n * @param out_buf output character buffer\r\n * @param out_off char buffer offset at which to start writing\r\n * @param out_len max number of chars to write\r\n * @param result an array of size >= 2 where results are returned:\r\n * result[0] = number of bytes read.\r\n * result[1] = number of chars written\r\n */\r\n public void decode(byte[] in_buf, int in_off, int in_len,\r\n char[] out_buf, int out_off, int out_len, int[] result)\r\n throws CharConversionException;\r\n\r\n public CharsetDecoder newCharsetDecoder();\r\n public void reset();\r\n}",
"private static CharsetEncoder getCoder(String charset) throws UnsupportedEncodingException\n\t{\n\t\tcharset = charset.toLowerCase();\t\t\n\t\tif (charset.equals(\"iso-8859-1\") || charset.equals(\"latin1\"))\t\t\t\n\t\t\treturn new Latin1Encoder();\n\t\tif (charset.equals(\"utf-8\") || charset.equals(\"utf8\"))\t\t\t\n\t\t\treturn new UTF8Encoder();\n\t\t\n\t\tthrow new UnsupportedEncodingException(\"unsupported encoding \"+charset);\n\t}",
"String getEncoding();",
"public String decode(String encoding) {\n\t\tString decoded = \"\";\n\t\tString currCode = \"\";\n\t\tMap<String, Character> revMap = new HashMap<String, Character>();\n\t\t\n\t\t// Build hashmap from value to key\n\t\tfor (Character code: this.mapping.keySet()) {\n\t\t\trevMap.put(this.mapping.get(code), code);\n\t\t}\n\t\t\n\t\tfor (Character c: encoding.toCharArray()) {\n\t\t\tcurrCode += c;\n\t\t\tCharacter toAdd = revMap.get(currCode);\n\t\t\tif (toAdd != null) {\n\t\t\t\tdecoded += toAdd;\n\t\t\t\tcurrCode = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn decoded;\n\t}",
"public CharsetDecoder newDecoder() { \n throw new Error(\"Decoder is not implemented for Symbol Charset\");\n }",
"String getCharset();",
"public String getDeclaredEncoding();",
"private static String decode(final InputStream input, final String charset) throws XHTMLTidyException {\n\t\ttry {\n\t\t\tfinal CharsetDecoder charsetDecoder = Charset.forName(charset).newDecoder();\n\t\t\tcharsetDecoder.onMalformedInput(CodingErrorAction.REPLACE);\n\t\t\tcharsetDecoder.onUnmappableCharacter(CodingErrorAction.REPORT);\n\t\t\tfinal Reader reader = new InputStreamReader(input, charsetDecoder);\n\t\t\tfinal CharBuffer buffer = CharBuffer.allocate(input.available());\n\t\t\treader.read(buffer);\n\t\t\tbuffer.compact();\n\t\t\tfinal String text = new String(buffer.array());\n\t\t\tbuffer.clear();\n\t\t\treturn text;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new XHTMLTidyException(e);\n\t\t}\n\t}",
"public InputStreamReader getInputStreamReader()\n/* */ {\n/* 118 */ InputStream in = ResourceUtils.getResourceAsStream(this, this);\n/* */ \n/* 120 */ if (in == null) {\n/* 121 */ return null;\n/* */ }\n/* */ \n/* 124 */ InputStreamReader reader = new InputStreamReader(in);\n/* */ \n/* 126 */ return reader;\n/* */ }",
"public String decode(String str) throws DecoderException {\n/* 295 */ if (str == null) {\n/* 296 */ return null;\n/* */ }\n/* */ try {\n/* 299 */ return decode(str, getDefaultCharset());\n/* 300 */ } catch (UnsupportedEncodingException e) {\n/* 301 */ throw new DecoderException(e.getMessage(), e);\n/* */ } \n/* */ }",
"int decodeCharacter(ByteStream byteStream) throws CharacterDecodingException, IOException;",
"public static CharsetDecoder getEncoding(RuntimeContract contract, String parameter) throws IllegalUsageException {\r\n\t\tif (contract.hasArgumentClause(parameter)) try {\r\n\t\t\treturn getEncoding(contract.useArgumentClause(parameter).getSingleValue());\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e) {\r\n\t\t\tthrow new IllegalUsageException(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"EncodingEnum getEncoding();",
"private static Charset lookup(String enc) {\n try {\n if (enc != null && Charset.isSupported(enc)) {\n return Charset.forName(enc);\n }\n } catch (IllegalArgumentException ex) {\n // illegal charset name\n // unsupport charset\n }\n return null;\n }",
"TextDecoder getTextDecoder();",
"@Override\n public Reader getInputStreamReader() throws IOException {\n return new InputStreamReader(getInputStream());\n }",
"public static JSONDecoder getDecoder() throws CharonException {\n return decoder;\n }",
"private String[] decode(String encoding) {\n ArrayList<String> components = new ArrayList<String>();\n StringBuilder builder = new StringBuilder();\n int index = 0;\n int length = encoding.length();\n while (index < length) {\n char currentChar = encoding.charAt(index);\n if (currentChar == SEPARATOR_CHAR) {\n if (index + 1 < length && encoding.charAt(index + 1) == SEPARATOR_CHAR) {\n builder.append(SEPARATOR_CHAR);\n index += 2;\n } else {\n components.add(builder.toString());\n builder.setLength(0);\n index++;\n }\n } else {\n builder.append(currentChar);\n index++;\n }\n }\n components.add(builder.toString());\n return components.toArray(new String[components.size()]);\n }",
"private void readEncoding(BufferedReader reader) throws IOException {\n String encoding = reader.readLine();\r\n if ( ! AbstractUtf8Message.UTF8_ENCODING_HEADER_STRING.equals(encoding)) {\r\n throw new IOException(\"Expected UTF-8 header when decoding UTF-8 message\");\r\n }\r\n }",
"public NewTextLineCodecFactory(String charset,String encodingDelimiter, String decodingDelimiter){\n\t\tsuper(Charset.forName(charset),encodingDelimiter,decodingDelimiter);\n\t}",
"public static char[] readInputStreamContents(InputStream is, String encoding) throws CoreException {\r\n\t\tCheck.checkArg(is);\r\n\r\n\t\tReader reader;\r\n\t\ttry {\r\n\t \tif (encoding != null)\r\n\t \t\treader = new InputStreamReader(is, encoding);\r\n\t \telse\r\n\t \t\treader = new InputStreamReader(is);\r\n\t\r\n\t return readReaderContents(reader);\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n throw new CoreException(createErrorStatus(e));\r\n }\r\n\t}",
"String getSupportedEncoding(String acceptableEncodings);",
"public BufferedReader getBufferedReader(InputStream inputStream) throws UnsupportedEncodingException {\n return new BufferedReader(new InputStreamReader(inputStream, \"UTF-8\"));\n }",
"public Charset getPreferredCharset();",
"public String decode(String pString, String charset) \n throws DecoderException, UnsupportedEncodingException \n {\n if (pString == null) {\n return null;\n }\n return new String(decode(pString.getBytes(US_ASCII)), charset);\n }",
"public XMLDecoder xmlDecoder(InputStream in) {\n return configure(new XMLDecoder(in));\n }",
"Object decode(String encoded);",
"public EncodingOptions getEncodingOptions();",
"private String decoder(String code, Tree iterator) {\n for (int i = 0; i < code.length(); i++) {\n String decodedChar = iterator.decode(code.substring(0, i + 1));\n\n if (decodedChar != null) {\n decode = decode + decodedChar;\n code = code.substring(i + 1);\n i = -1;\n }\n }\n\n return code;\n }",
"String getContentEncoding();",
"public String decode(Reader input) throws IOException\n\t{\n\t\treturn decode(input, 0);\n\t}",
"String decodeString();",
"public Reader getReader(Object templateSource, String encoding)\r\n/* 43: */ throws IOException\r\n/* 44: */ {\r\n/* 45:75 */ Resource resource = (Resource)templateSource;\r\n/* 46: */ try\r\n/* 47: */ {\r\n/* 48:77 */ return new InputStreamReader(resource.getInputStream(), encoding);\r\n/* 49: */ }\r\n/* 50: */ catch (IOException ex)\r\n/* 51: */ {\r\n/* 52:80 */ if (this.logger.isDebugEnabled()) {\r\n/* 53:81 */ this.logger.debug(\"Could not find FreeMarker template: \" + resource);\r\n/* 54: */ }\r\n/* 55:83 */ throw ex;\r\n/* 56: */ }\r\n/* 57: */ }",
"private static String readStream(InputStream is, String charsetName) throws UnsupportedEncodingException, IOException {\r\n StringBuffer sb = new StringBuffer();\r\n byte[] buffer = new byte[1024];\r\n int length = 0;\r\n while ((length = is.read(buffer)) != -1) {\r\n sb.append(new String(buffer, 0, length, charsetName));\r\n }\r\n return sb.toString();\r\n }",
"public static InputStream toInputStream(final CharSequence input, final String encoding) throws IOException {\n return toInputStream(input, Charset.forName(encoding));\n }",
"private static CharSequence decodedString(String string) {\n\t\treturn null;\r\n\t}",
"public String getJavaEncoding();",
"public ReaderInputStream(Reader reader, String encoding) {\n this(reader);\n this.encoding = encoding;\n }",
"public List<Charset> getAcceptCharset()\r\n/* 107: */ {\r\n/* 108:174 */ List<Charset> result = new ArrayList();\r\n/* 109:175 */ String value = getFirst(\"Accept-Charset\");\r\n/* 110:176 */ if (value != null)\r\n/* 111: */ {\r\n/* 112:177 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 113:178 */ for (String token : tokens)\r\n/* 114: */ {\r\n/* 115:179 */ int paramIdx = token.indexOf(';');\r\n/* 116: */ String charsetName;\r\n/* 117: */ String charsetName;\r\n/* 118:181 */ if (paramIdx == -1) {\r\n/* 119:182 */ charsetName = token;\r\n/* 120: */ } else {\r\n/* 121:185 */ charsetName = token.substring(0, paramIdx);\r\n/* 122: */ }\r\n/* 123:187 */ if (!charsetName.equals(\"*\")) {\r\n/* 124:188 */ result.add(Charset.forName(charsetName));\r\n/* 125: */ }\r\n/* 126: */ }\r\n/* 127: */ }\r\n/* 128:192 */ return result;\r\n/* 129: */ }",
"public void setInputEncoding(String inputEncoding) {\r\n this.inputEncoding = inputEncoding;\r\n }",
"@org.junit.Test\n public void encodeDecode()\n {\n String test = \"just some \\t\\ftes\\rt\\u001B for decoding\\t and...\\n\";\n\n assertEquals(\"encode/decode\", test,\n Encodings.decodeEscapes(Encodings.encodeEscapes(test)));\n assertEquals(\"encode/decode\", \"\",\n Encodings.decodeEscapes(Encodings.encodeEscapes(null)));\n }",
"protected final void setEncoding( String encoding )\n throws SAXException\n {\n if ( _inputSource.getByteStream() != null ) {\n if ( ! encoding.equalsIgnoreCase( _inputSource.getEncoding() ) ) {\n _inputSource.setEncoding( encoding );\n try {\n _reader = new InputStreamReader( new BufferedInputStream( _inputSource.getByteStream() ), encoding );\n } catch ( UnsupportedEncodingException except ) {\n error( WELL_FORMED, format( \"Parser014\", encoding ) );\n }\n }\n }\n else\n if ( isWarning() && _inputSource.getEncoding() != null &&\n ! encoding.equalsIgnoreCase( _inputSource.getEncoding() ) )\n warning( format( \"Parser015\", _inputSource.getEncoding(), encoding ) ); \n }",
"public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }",
"@Override\n\t\tpublic String getCharacterEncoding() {\n\t\t\treturn null;\n\t\t}",
"private CharSequence decode(ByteBuffer buf) {\n CharBuffer isodcb = null;\n CharsetDecoder isodecoder = UTF8.newDecoder();\n try {\n isodcb = isodecoder.decode(buf);\n } catch (CharacterCodingException e) {\n log.error(e);\n }\n return (CharSequence) isodcb;\n }",
"public String decode(String encoded) {\n\t\t// TODO fill this in.\n\t\tStringBuilder output = new StringBuilder();\n\n\t\tint i = 0;\n\t\twhile (i < encoded.length()) {\n\t\t\tStringBuilder characterBuilder = new StringBuilder();\n\n\t\t\twhile (!decodingTable.containsKey(characterBuilder.toString()))\n\t\t\t\tcharacterBuilder.append(encoded.charAt(i++));\n\n\t\t\toutput.append(decodingTable.get(characterBuilder.toString()));\n\t\t}\n\n\t\treturn output.toString();\n\t}",
"private Charset getCharset(ResponseBody body) {\n MediaType contentType = body.contentType();\n return contentType != null ? contentType.charset(Util.UTF_8) : Util.UTF_8;\n }",
"String getStringCharset() {\n\t\treturn this.charset;\n\t}",
"public String getCharacterEncoding() {\n\t\treturn null;\n\t}",
"public String getResponseCharset()\r\n {\r\n Header header = httpMethod.getResponseHeader( \"Content-Type\" );\r\n if( header != null )\r\n {\r\n for( HeaderElement headerElement : header.getElements() )\r\n {\r\n NameValuePair parameter = headerElement.getParameterByName( \"charset\" );\r\n if( parameter != null )\r\n return parameter.getValue();\r\n }\r\n }\r\n \r\n Header contentEncodingHeader = httpMethod.getResponseHeader( \"Content-Encoding\" );\r\n if( contentEncodingHeader != null )\r\n {\r\n try\r\n {\r\n String value = contentEncodingHeader.getValue();\r\n if( CompressionSupport.getAvailableAlgorithm( value ) == null )\r\n {\r\n new String( \"\" ).getBytes( value );\r\n return value;\r\n }\r\n }\r\n catch( Exception e )\r\n {\r\n }\r\n }\r\n \r\n return null;\r\n }",
"public interface Encoding {\n\t/**\n\t * Encoding a string.\n\t * \n\t * @param source\n\t * @return The encoded string\n\t * @throws Exception\n\t */\n\tpublic String encode(String source) throws Exception;\n\n\t/**\n\t * Decoding a string.\n\t * \n\t * @param source\n\t * @return The decoded string\n\t * @throws Exception\n\t */\n\tpublic String decode(String source) throws Exception;\n\n}",
"public interface Encoding {\n String encode(String encodeValue);\n String decode(String encodedValue);\n}",
"@Override\n\tpublic String getCharacterEncoding() {\n\t\treturn null;\n\t}",
"@Override\n public String decode(String code) throws IllegalStateException {\n if (code == null || code.equals(\"\")) {\n throw new IllegalStateException(\"the code cannot be null or empty.\");\n }\n Tree iterator = root;\n decode = \"\";\n\n for (int i = 0; i < code.length(); i++) {\n if (!encodingArray.contains(code.charAt(i))) {\n throw new IllegalStateException(\"The encoded string contains illegal symbol\");\n }\n }\n\n code = decoder(code, iterator);\n\n if (code.length() != 0) {\n throw new IllegalStateException(\"there is some problem with decoding.\");\n }\n\n return decode;\n }",
"public String detectContentCharset() throws IOException {\n\t\tString cs = getContentCharset();\n\t\tif (!Charsets.isSupportedCharset(cs)) {\n\t\t\tcs = CharDetects.detectCharset(getContent());\n\t\t\tif (!Charsets.isSupportedCharset(cs)) {\n\t\t\t\tcs = Charsets.UTF_8;\n\t\t\t}\n\t\t}\n\t\treturn cs;\n\t}",
"@Override\n\t\tpublic void setCharacterEncoding(String env) throws UnsupportedEncodingException {\n\t\t\t\n\t\t}",
"@Override\n public Reader getReader(final Object templateSource, final String encoding) throws IOException {\n try (final Reader reader = delegate.getReader(templateSource, encoding)) {\n final String templateText = IOUtils.toString(reader);\n if (!templateText.contains(\"<#ftl\")) {\n return new StringReader(ESCAPE_PREFIX + templateText + ESCAPE_SUFFIX);\n } else {\n return new StringReader(templateText);\n }\n }\n }",
"private Charset getResponseCharset(NetworkResponse response) {\n String charset = HttpHeaderParser.parseCharset(response.headers);\n try {\n return Charset.forName(charset);\n } catch (UnsupportedCharsetException e) {\n return Charset.forName(\"UTF-8\");\n }\n }",
"public static BufferedReader getReader(InputStream in) {\n try {\n return new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8));\n } catch(Throwable ignored) {\n }\n return null;\n }",
"public Charset getCharset() {\r\n\t\treturn myCharset;\r\n\t}",
"public abstract Object decode(InputStream is) ;",
"public static byte[] toByteArray(final Reader input, final String encoding) throws IOException {\n return toByteArray(input, Charset.forName(encoding));\n }",
"@Override\n public String getCharacterEncoding() {\n return null;\n }",
"@Deprecated\n/* */ public String getEncoding() {\n/* 371 */ return this.charset;\n/* */ }",
"public String getEncoding () {\n return encoding;\n }",
"public void setEncoding (String encoding) {\n this.encoding = encoding;\n }",
"public abstract boolean canDecodeInput(Object source) throws IOException;",
"public PEASEncoder() {\n this(Charset.defaultCharset());\n }",
"public PEASEncoder(Charset charset) {\n if (charset == null) {\n throw new NullPointerException(\"charset\");\n }\n this.charset = charset;\n }",
"public String getCharSet(){\n \treturn charSet;\n }",
"public Charset getCharset() {\n\t\treturn this.charset;\n\t}",
"public InputLexerSource(@Nonnull InputStream input, Charset charset) {\n this(new InputStreamReader(input, charset));\n }",
"public String getCharSet()\n\t{\n\t\tParameterParser parser = new ParameterParser();\n\t\tparser.setLowerCaseNames(true);\n\t\t// Parameter parser can handle null input\n\t\tMap<?, ?> params = parser.parse(getContentType(), ';');\n\t\treturn (String)params.get(\"charset\");\n\t}",
"public static InputStream toInputStream(final CharSequence input, final Charset encoding) {\n return toInputStream(input.toString(), encoding);\n }",
"public Optional<String> charset() {\n return body.contentType()\n .flatMap(\n h -> {\n String[] parts = SPLIT_CHARSET.split(h, 2);\n if (parts.length > 1) {\n String charset = parts[1];\n return Optional.of(charset.trim());\n } else {\n return Optional.empty();\n }\n });\n }",
"public String decode(String pString) throws DecoderException {\n if (pString == null) {\n return null;\n }\n try {\n return decode(pString, getDefaultCharset());\n } catch(UnsupportedEncodingException e) {\n throw new DecoderException(e.getMessage());\n }\n }",
"public CharSequence readCharSequence(int length, Charset charset)\r\n/* 515: */ {\r\n/* 516:526 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 517:527 */ return super.readCharSequence(length, charset);\r\n/* 518: */ }",
"public String getCharset() {\n\t\treturn charset;\n\t}",
"public static InputStream toInputStream(final String input, final String encoding) throws IOException {\n final byte[] bytes = input.getBytes(Charset.forName(encoding));\n return new ByteArrayInputStream(bytes);\n }",
"public final synchronized CharBuffer decode(ByteBuffer bb) {\n\t\ttry {\n\t\t\tif (cachedDecoder == null) {\n\t\t\t\tcachedDecoder = newDecoder().onMalformedInput(\n\t\t\t\t\t\tCodingErrorAction.REPLACE).onUnmappableCharacter(\n\t\t\t\t\t\tCodingErrorAction.REPLACE);\n\t\t\t} else\n\t\t\t\tcachedDecoder.reset();\n\n\t\t\treturn cachedDecoder.decode(bb);\n\t\t} catch (CharacterCodingException e) {\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}",
"public interface Charsets {\n Charset UTF_8 = Charset.forName(\"UTF-8\");\n Charset GBK = Charset.forName(\"GBK\");\n Charset ISO8859_1 = Charset.forName(\"ISO8859-1\");\n}",
"public String getEncoding() {\n return encoding;\n }",
"@Override\n\tpublic void setCharacterEncoding(String env) throws UnsupportedEncodingException {\n\t\t\n\t}",
"public int getCharacterSet() {\r\n return CharacterSet;\r\n }",
"private BufferedReader getBufferedReader(final String fileName)\n throws UnsupportedEncodingException {\n InputStream configStream = Thread.currentThread().\n getContextClassLoader().getResourceAsStream(fileName);\n return new BufferedReader(new InputStreamReader(configStream, \"UTF-8\"));\n }",
"public interface Charset {\n public void setCharset(java.nio.charset.Charset charset);\n }",
"public String getEncoding() {\n return encoding;\n }",
"public String getEncoding() {\n return encoding;\n }",
"public String getEncoding() {\n return encoding;\n }",
"String getUseNativeEncoding();",
"public void setCharset(String charset) {\n this.charset = charset;\n }",
"public TypedXmlParser getNewDecoder(Object token) {\n TypedXmlParser result = new DefaultXmlParser();\n if (factories != null && factories.size() > 0) {\n ContentDecoder dec = (ContentDecoder) result.getProperty(XasUtil.PROPERTY_CONTENT_CODEC);\n for (Enumeration e = factories.elements(); e.hasMoreElements();) {\n ContentCodecFactory fac = (ContentCodecFactory) e.nextElement();\n dec = fac.getChainedDecoder(dec);\n }\n try {\n result.setProperty(XasUtil.PROPERTY_CONTENT_CODEC, dec);\n } catch (XmlPullParserException ex) {\n /*\n * If we got the property, we should be able to set it too.\n */\n }\n }\n return result;\n }",
"@Accessor(qualifier = \"encoding\", type = Accessor.Type.GETTER)\n\tpublic EncodingEnum getEncoding()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(ENCODING);\n\t}",
"public void setEncoding(String e) {\n\t\tthis.encoding = e;\n\t}",
"public void setEncoding(String encoding) {\r\n this.encoding = encoding;\r\n }",
"private String readString(InputStream in) throws IOException {\r\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in, \"iso-8859-1\"));\r\n\t\tString inputLine;\r\n\t\tStringBuffer response = new StringBuffer();\r\n\t\twhile ((inputLine = reader.readLine()) != null) {\r\n\t\t\tresponse.append(inputLine);\r\n\t\t}\r\n\t\tin.close();\r\n\t\treturn response.toString();\r\n\t}"
] | [
"0.6658235",
"0.65755534",
"0.57423824",
"0.557188",
"0.5521262",
"0.52603424",
"0.519042",
"0.51455134",
"0.5145315",
"0.5141027",
"0.5120439",
"0.51029193",
"0.50601065",
"0.5014162",
"0.49912465",
"0.49694782",
"0.4969161",
"0.49640927",
"0.49143967",
"0.489416",
"0.48931572",
"0.48681438",
"0.48506272",
"0.484317",
"0.48377147",
"0.4763784",
"0.47580972",
"0.47178504",
"0.47119272",
"0.46505737",
"0.46446583",
"0.4631234",
"0.4630905",
"0.46253878",
"0.46211326",
"0.46194065",
"0.46123725",
"0.4604665",
"0.45950785",
"0.4575626",
"0.45599723",
"0.45587352",
"0.45360127",
"0.45303252",
"0.45006156",
"0.44976473",
"0.44959763",
"0.44916603",
"0.44867933",
"0.44861707",
"0.44852227",
"0.4483547",
"0.4469542",
"0.446866",
"0.4465375",
"0.4453325",
"0.44513485",
"0.44480902",
"0.44228312",
"0.44218132",
"0.4412635",
"0.43908602",
"0.4389714",
"0.43867058",
"0.4384873",
"0.43709195",
"0.43631253",
"0.43610042",
"0.43574977",
"0.43544778",
"0.43469894",
"0.434594",
"0.43458563",
"0.4345442",
"0.43420273",
"0.43410426",
"0.43406868",
"0.4336836",
"0.43339807",
"0.4322268",
"0.4321501",
"0.4320126",
"0.4319616",
"0.4314251",
"0.43120295",
"0.43091395",
"0.43068644",
"0.43056035",
"0.4301523",
"0.42873743",
"0.42860585",
"0.42860585",
"0.42860585",
"0.42844647",
"0.42819145",
"0.42742264",
"0.42717132",
"0.4271605",
"0.4268118",
"0.42670268"
] | 0.62451 | 2 |
Emit an Integer that might be null | static public void emitNullableInteger(RowEmitter outputEmitter, long value, long nullValue) {
if(value != nullValue)
outputEmitter.addLong(value);
else
outputEmitter.addNull();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Int() {\n super(Expression.X_IS_UNDEFINED);\n this.value = 0;\n }",
"@Override\n public int intValue(int numId) {\n return 0;\n }",
"@Override\n\tpublic Object visitIntLiteral(IntLiteral literal) {\n\t\treturn null;\n\t}",
"@Override\n public String visit(IntegerLiteralExpr n, Object arg) {\n return null;\n }",
"int getNilValue();",
"@java.lang.Override\n public int getNilValue() {\n if (typeCase_ == 1) {\n return (java.lang.Integer) type_;\n }\n return 0;\n }",
"@Override\r\n\tpublic Integer getValue() {\n\t\treturn null;\r\n\t}",
"public static int nullToZero(Integer i)\n {\n if(i == null)\n {\n return 0;\n }\n else\n {\n return i.intValue();\n }\n }",
"@Override\n public int value() {\n return 0;\n }",
"@Override\n\tpublic void outAIntegerExpr(AIntegerExpr node) {\n\t\til.append(new PUSH(cp, Integer.valueOf(node.getNumber().getText()))); \n\n\t}",
"private FinalIntegerNode() { }",
"public int getNilValue() {\n if (typeCase_ == 1) {\n return (java.lang.Integer) type_;\n }\n return 0;\n }",
"int checkNull(int value) {\n return (value != Tables.INTNULL ? value : 0);\n }",
"@Override\r\n\tprotected Integer zero() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int getInt(Ref ref) {\n\t\treturn 0;\r\n\t}",
"public Int(int value) {\n super(Expression.X_IS_UNDEFINED);\n this.value = value;\n }",
"@Override\r\n\tpublic int getInt(int arg) {\n\t\treturn 0;\r\n\t}",
"Integer getValue();",
"Integer getValue();",
"@Override\r\n\tpublic Object visitIntegerLiteralExpression(\r\n\t\t\tIntegerLiteralExpression integerLiteralExpression, Object arg)\r\n\t\t\tthrows Exception {\n\t\tmv.visitLdcInsn(integerLiteralExpression.integerLiteral.getIntVal());\r\n\t\tif(arg != null)\r\n\t\t{\r\n//\t\t mv.visitMethodInsn(INVOKESTATIC, \"java/lang/Integer\", \"valueOf\", \"(I)Ljava/lang/Integer;\");\r\n\t\t}\r\n\t\treturn \"I\";\r\n\t}",
"public LlvmValue visit(IntegerLiteral n) {\n return new LlvmIntegerLiteral(n.value);\n }",
"void emit(int i) {}",
"static int nullNode() {\n\t\treturn -1;\n\t}",
"@Override\r\n\tpublic long txNumber() {\r\n\t\treturn -1; // dummy value\r\n\t}",
"public static String prepareEmptyInt(Object object) {\n return (object == null ? \"-1\" : object.toString());\n }",
"public LlvmValue visit(IntegerType n){\n\t\treturn LlvmPrimitiveType.I32;\n\t}",
"public Optional<UInt> number() {\n\t\t\treturn Optional.ofNullable(_number);\n\t\t}",
"@Override\n public double numValue(int numId) {\n return 0;\n }",
"public static @Nullable Integer readVarIntOrNull(@NonNull Buffer buffer) {\n var i = 0;\n var maxRead = Math.min(5, buffer.readableBytes());\n for (var j = 0; j < maxRead; j++) {\n var nextByte = buffer.readByte();\n i |= (nextByte & 0x7F) << j * 7;\n if ((nextByte & 0x80) != 128) {\n return i;\n }\n }\n return null;\n }",
"public Object visitIntegerConstant(GNode n) {\n xtc.type.Type result;\n \n result = cops.typeInteger(n.getString(0));\n \n return result.getConstant().bigIntValue().longValue();\n }",
"@Test\n public void intInvalidType() throws Exception {\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.INT, new TextNode(\"-13\"));\n assertNull(retVal);\n }",
"OptionalInt peek();",
"@Override\n public Integer reduceInit() { return 0; }",
"public static Value makeAnyNumUInt() {\n return theNumUInt;\n }",
"public Optional<UInt> getNumber() {\n\t\treturn Optional.ofNullable(_number);\n\t}",
"public int intValue();",
"public int getIntegerValue() {\n throw new OurBadException(\" Item '\" + this.serialize() + \"' is not an integer.\");\n }",
"public int getInt() throws Exception\n {\n return 0;\n }",
"@Override\r\n\t\tpublic long getValue() {\n\t\t\treturn -1;\r\n\t\t}",
"public Int() {\n this(0);\n }",
"public Object getNoAccess() {\r\n return new Integer(3 / 0);\r\n }",
"@Override\n\tpublic long javaMethodBaseWithUIntRet() {\n\t\treturn 0;\n\t}",
"public static Value makeAnyNumUIntPos() {\n return theNumUIntPos;\n }",
"@Override\n\tpublic int readScalarInt() throws IOException {\n\t\treturn 0;\n\t}",
"private final int initializeInt() {\n\t\treturn 0;\r\n\t}",
"public Integer getValue();",
"IntegerValue createIntegerValue();",
"IntegerValue createIntegerValue();",
"private static int unbox(Integer i) {\n\t\treturn (i == null) ? 0 : i;\n\t}",
"@Override\n\tpublic String result() {\n\t\tif (!stack.isEmpty())\n\t\t\treturn Integer.toString(stack.peek());\n\t\telse\n\t\t\treturn \"0\";\n\t}",
"public static int toInt(java.lang.Object o)\n {\n if(o == null)\n {\n return 0;\n }\n else if(o.toString().equals(\"\"))\n {\n return 0;\n }\n else\n {\n return Integer.parseInt(o.toString());\n }\n }",
"public T caseIntegerLiteral(IntegerLiteral object)\n {\n return null;\n }",
"@Override\n\tpublic String getValue() {\n\t\treturn integerLiteral;\n\t}",
"protected void writeNullValue() throws IOException {\n _generator.writeNull();\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"public String visit(IntegerType n, LLVMRedux argu) {\n return \"i32\";\n }",
"@Override\n\tpublic void visit(Null n) {\n\t\t\n\t}",
"@Override\n public int getIntValue()\n {\n return value;\n }",
"public T caseInteger(sensorDeploymentLanguage.Integer object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Type generateIntermediateCode(Function fun) {\n\t\tif(number instanceof Double)\n\t\t\treturn Type.FLOAT;\n\t\telse if (number instanceof Integer)\n\t\t\treturn Type.INT;\n\t\treturn Type.NULL;\n\t\t\t\n\t}",
"@Override\n\tpublic int javaMethodBaseWithIntRet() {\n\t\treturn 0;\n\t}",
"public MutableInt() {}",
"public T caseIntegerValue(IntegerValue object) {\n\t\treturn null;\n\t}",
"private void empty_to_int_step( ExpressionNode nd, VMState vms ) {\n Assert.check( vms.top().at( nd ) == null ) ;\r\n \r\n // Clear the selection\r\n vms.top().setSelected( null ) ;\r\n \r\n // Compute the value\r\n long value ;\r\n switch( op_code ) {\r\n case RAND :\r\n if( random == null ) random = new java.util.Random(1) ;\r\n value = random.nextInt() % 32767 ;\r\n if( value < 0 ) value = - value ;\r\n break ;\r\n default: Assert.check(false) ; value = 0 ;\r\n }\r\n \r\n putIntResult(nd, vms, value);\r\n }",
"int intValue();",
"int getIntValue();",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default int asInt() {\n \n return notSupportedCast(BasicTypeID.INT);\n }",
"public void setVoid_Inventory_ID (int Void_Inventory_ID)\n{\nif (Void_Inventory_ID <= 0) set_Value (\"Void_Inventory_ID\", null);\n else \nset_Value (\"Void_Inventory_ID\", new Integer(Void_Inventory_ID));\n}",
"Astro leafInteger(Number integralData, SourceSpan optSpan);",
"public int getIntValue() {\n return (int)getValue();\n }",
"@Override\n\tpublic int getNumericCode() {\n\t\treturn 0;\n\t}",
"public int value();",
"public int ZERO() {\n return getInt(setting.ZERO);\n }",
"public static void logIntegerIfNotZero(Map<String, Object> debugMap, String label, Integer theInt) {\r\n if (theInt == null || theInt == 0) {\r\n debugMap.remove(label);\r\n } else {\r\n debugMap.put(label, theInt);\r\n }\r\n }",
"public Integer newValue(){\n\t\treturn 0;\r\n\t}",
"public T caseExprInt(ExprInt object)\n {\n return null;\n }",
"public static Integer castInt(Object o) {\n\t\tif (o instanceof Number) {\n\t\t\treturn ((Number) o).intValue();\n\t\t}\n\n\t\treturn null;\n\t}",
"public T caseExpression_Integer(Expression_Integer object)\r\n {\r\n return null;\r\n }",
"public void setUNUSED_ID(java.lang.Integer value);",
"public void mo4637a(int i) {\n this.f2766a.bindNull(i);\n }",
"long getNoId();",
"public int intValue( )\n {\n return value;\n }",
"@Override\n\tpublic int isNullable(int arg0) throws SQLException {\n\t\treturn 0;\n\t}",
"IntValue createIntValue();",
"IntValue createIntValue();",
"public IntegerOperand(final Integer constant) {\n super();\n\n value = checkNotNull(constant, \"Received a null pointer as value\");\n }",
"public int getInt(){\n return new BigInteger(this.value).intValue();\n }",
"public static int getInt() throws Exception {\n return getInt(null);\n }",
"public int getValue();",
"public int getValue();",
"public int antalNuller(ArrayList<Integer> list) {\r\n int nuller = 0;\r\n for (int i : list) {\r\n if (i == 0) {\r\n nuller++;\r\n }\r\n }\r\n return nuller;\r\n }",
"protected Int() {}",
"public int intValue(Map<Prop, Object> map) {\n assert type == Integer.class;\n Object o = map.get(this);\n return this.<Integer>typeValue(o);\n }",
"int applyAsInt(T value);",
"public int getIntValue(){\n\t\treturn value.intValue();\n\t}",
"default int asInt() {\n\t\tthrow new EvaluatorException(\"Expecting an integer value\");\n\t}",
"public int getIntValue(){\n return value;\n }",
"protected synchronized int getIntegerValue(String tag) {\n int returnInt = 0;\n if (actualProperties != null) {\n returnInt = Integer.decode(actualProperties.getProperty(tag, \"0\"));\n }\n return returnInt;\n }",
"public int getExceptionNumber(\n ) {return (0);}",
"com.google.protobuf.Int32Value getCode();"
] | [
"0.66006225",
"0.6394871",
"0.6277157",
"0.61729574",
"0.60976374",
"0.6067943",
"0.6054156",
"0.5957511",
"0.5890867",
"0.583415",
"0.5765615",
"0.5746881",
"0.57460076",
"0.5731919",
"0.5731646",
"0.57200944",
"0.5673648",
"0.5606991",
"0.5606991",
"0.5577006",
"0.5570305",
"0.5504168",
"0.5501985",
"0.549967",
"0.54982007",
"0.54929966",
"0.5486373",
"0.54826516",
"0.5465247",
"0.5451361",
"0.5447054",
"0.5441394",
"0.5429443",
"0.5423433",
"0.54186714",
"0.54161066",
"0.54093325",
"0.54065645",
"0.5395347",
"0.5373653",
"0.5352536",
"0.5347751",
"0.5340301",
"0.53264326",
"0.53231984",
"0.53040636",
"0.5296719",
"0.5296719",
"0.52836615",
"0.52716374",
"0.524384",
"0.5226011",
"0.52259284",
"0.52257866",
"0.52149206",
"0.52143085",
"0.5205515",
"0.5204851",
"0.5203855",
"0.51990163",
"0.51974064",
"0.5190169",
"0.5180647",
"0.517895",
"0.51675946",
"0.51652104",
"0.51411813",
"0.5132256",
"0.51314306",
"0.51278114",
"0.5119499",
"0.5115972",
"0.51152766",
"0.5099125",
"0.5096117",
"0.50948733",
"0.509177",
"0.5089781",
"0.50876844",
"0.50854707",
"0.50765336",
"0.5075771",
"0.5071825",
"0.507086",
"0.507086",
"0.5070241",
"0.50702125",
"0.5068528",
"0.5065042",
"0.5065042",
"0.50596035",
"0.5058949",
"0.5058813",
"0.5058085",
"0.50551444",
"0.5054442",
"0.5053497",
"0.5049984",
"0.50402284",
"0.5039825"
] | 0.7159404 | 0 |
Emit a String that might be null. | static public void emitNullableString(RowEmitter outputEmitter, String value) {
if(value != null)
outputEmitter.addString(value);
else
outputEmitter.addNull();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String formatNull() {\n\t\treturn \"null\";\n\t}",
"private String getNullValueText() {\n return getNull();\n }",
"private void serializeNull(final StringBuffer buffer)\n {\n buffer.append(\"N;\");\n }",
"@Override\r\n public String toString() {\r\n return (value == null) ? \"\" : value;\r\n }",
"@Override\n\tpublic String display() {\n\t\treturn \"null\";\n\t}",
"public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }",
"private final void _writeNull()\n/* */ throws IOException\n/* */ {\n/* 1610 */ if (this._outputTail + 4 >= this._outputEnd) {\n/* 1611 */ _flushBuffer();\n/* */ }\n/* 1613 */ int ptr = this._outputTail;\n/* 1614 */ char[] buf = this._outputBuffer;\n/* 1615 */ buf[ptr] = 'n';\n/* 1616 */ buf[(++ptr)] = 'u';\n/* 1617 */ buf[(++ptr)] = 'l';\n/* 1618 */ buf[(++ptr)] = 'l';\n/* 1619 */ this._outputTail = (ptr + 1);\n/* */ }",
"@org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }",
"public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }",
"public static String dispNull (String input) {\n //because of short circuiting, if it's null, it never checks the length.\n if (input == null || input.length() == 0)\n return \"N/A\";\n else\n return input;\n }",
"protected void writeNullValue() throws IOException {\n _generator.writeNull();\n }",
"public String NullSave()\n {\n return \"null\";\n }",
"public static String displayNull (String input)\r\n {\r\n //because of short circuiting, if it's null, it never checks the length.\r\n if (input == null || input.length() == 0)\r\n return \"N/A\";\r\n else\r\n return input;\r\n }",
"private String parseNull () {\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n char chr=next();//get next character\r\n assert chr=='n';//assert correct first character\r\n skip(3);//skip to end of null token\r\n \r\n return \"null\";//return string representation of null\r\n \r\n }",
"@Override\n public String visit(NullLiteralExpr n, Object arg) {\n return null;\n }",
"public static String convertNULLtoString(Object object) {\n return object == null ? EMPTY : object.toString();\n }",
"@Override\n public String createString() {\n return null;\n }",
"@Override\n public String asText() {\n return null;\n }",
"@Override\n\tpublic String toMessageString() {\n\t\treturn null;\n\t}",
"public static String null2String(Object obj) {\n\t\treturn obj == null ? \"\" : obj.toString();\n\t}",
"public String notNull(String text)\n {\n return text == null ? \"\" : text;\n }",
"@Override\n public String visit(UnionType n, Object arg) {\n return null;\n }",
"private String notNull(String value) {\n return value != null ? value : \"\";\n }",
"public java.lang.String toString(){\n return null; //TODO codavaj!!\n }",
"public String toSimpleString() {\n\t\treturn null;\n\t}",
"@Override\npublic String toString(@Nullable Event arg0, boolean arg1) {\n\treturn null;\n}",
"public static String toString(Object obj, String nullStr) {\n return obj == null ? nullStr : obj.toString();\n }",
"@Override\n\tpublic String toXMLString(Object arg0) {\n\t\treturn null;\n\t}",
"public String getNullColumnString() {\n \t\treturn \"\";\n \t}",
"@Override\n\tpublic String toString() {\n\t\treturn getValue() != null ? getValue().toString() : \"null\";\n\t}",
"public static String nullToEmpty ( final String n )\n {\n return null == n ? \"\" : n;\n }",
"public String toString() { return root == null ? \"nil\" : root.toString(); }",
"String nullStrToSpc(Object obj) {\n String spcStr = \"\";\n\n if (obj == null) {\n return spcStr;\n } else {\n return obj.toString();\n }\n }",
"public String toString() {\n return null;\n }",
"public String toString() {\n return null;\n }",
"public static String toString(Object value) {\n if (value != null)\n return value.toString();\n else\n return null;\n }",
"@Override\n public String toString() {\n byte[] buffer = toBuffer();\n return (buffer == null) ? null : new String(buffer, StandardCharsets.UTF_8);\n }",
"@Override\n public String visit(StringLiteralExpr n, Object arg) {\n return null;\n }",
"@Override\n public String visit(EmptyStmt n, Object arg) {\n return null;\n }",
"public String toString() {\n return \"[ \" + nullCheck.toString() + \" is null ]\";\n }",
"private static String getValue(Object o) {\n if (o != null) {\n return o.toString();\n }\n return \"null\";\n }",
"String getDefaultNull();",
"@Override\n\tpublic String toResultString() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String encode() {\n\t\treturn null;\r\n\t}",
"@Override\n public String toString() {\n return new GsonBuilder().serializeNulls().create().toJson(this).toString();\n }",
"@Override\n\tpublic String monHoc() {\n\t\treturn null;\n\t}",
"private String getString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String getAsText() {\n\t\treturn null;\n\t}",
"public String toS(Object o, String empty_val);",
"public String toString() {\n\t\treturn null;\n\t}",
"public String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toStringNoWeight() {\n\t\treturn null;\n\t}",
"@Override\n public String visit(VoidType n, Object arg) {\n return null;\n }",
"@Override\n public String visit(ExpressionStmt n, Object arg) {\n return null;\n }",
"@Override\n public String visit(TextBlockLiteralExpr n, Object arg) {\n return null;\n }",
"@Override\r\n\t\t\tpublic String toExibir() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String asText() {\n\t\treturn \"\";\n\t}",
"public String getNullAttribute();",
"private String replaceNull(Time s) {\n\t\treturn s == null ? \"--\" : s.toString();\n\t}",
"@Override\n public String visit(UnknownType n, Object arg) {\n return null;\n }",
"@Override\r\n\t@JsonIgnore\r\n\tpublic String asText() {\n\t\treturn null;\r\n\t}",
"@NotNull\n protected String format(@NotNull final Object value) {\n return value != null\n ? value.toString()\n : \"\";\n }",
"@Override\n public String visit(BinaryExpr n, Object arg) {\n return null;\n }",
"@Override\n public String visit(LambdaExpr n, Object arg) {\n return null;\n }",
"public String toString()\n {\n\tif (data() == null) {\n\t return \"null\";\n\t} else {\n\t return data().toString();\n\t}\n }",
"public String toString() {\n \t\treturn null;\n \t}",
"@Override\n public String visitLiteralExpr(Expr.Literal expr) {\n if(expr.getValue() == null) return \"null\";\n if(expr.getValue() instanceof String) return String.format(\"\\\"%s\\\"\", expr.getValue());\n return expr.getValue().toString();\n }",
"@Override\n\tpublic String onTxString(String name) {\n\t\treturn null;\n\t}",
"public String toString() { return \"\"; }",
"public String toString() { return \"\"; }",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn null;\n\t}",
"private static String toString(Object obj) {\n return (obj == null ? null : obj.toString());\n }",
"public String str() {\n/* 207 */ String str = this.m_DTMXRTreeFrag.getDTM().getStringValue(this.m_dtmRoot).toString();\n/* */ \n/* 209 */ return (null == str) ? \"\" : str;\n/* */ }",
"@Test\n void nullProblem() {\n var x = (Void) null;\n var z = (String) null;\n System.out.println(x + \", \" + z);\n }",
"@Override\n public String visit(VarType n, Object arg) {\n return null;\n }",
"@Override\n public String visit(ReceiverParameter n, Object arg) {\n return null;\n }",
"public String generateLuaEquivalent() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toString()\n\t{\n\t\treturn null;\n\t}",
"@Override\n public String visit(CharLiteralExpr n, Object arg) {\n return null;\n }",
"@Override\n\tprotected String wavRegleJeu() {\n\t\treturn null;\n\t}",
"private String getStringOrNull (String value) {\n if (value == null || value.isEmpty()) value = null;\n return value;\n }",
"public static String toString(Object o) {\n\t\treturn o == null ? \"null\" : o.toString();\n\t}",
"@Override\n public String visit(ThisExpr n, Object arg) {\n return null;\n }",
"public static String checkNullObject(Object val) {\n\n if (val != null) {\n if (\"\".equals(val.toString().trim())) {\n return \"\";\n }\n return val.toString();\n } else {\n return \"\";\n }\n }",
"public String msg() {\n return null;\n }",
"private String getString(Node node) {\n\n\t\tif (stringWriter == null) {\n\t\t\tprtln(\"ERROR: trying to execute sp without a stringWriter\");\n\t\t\treturn null;\n\t\t}\n\t\tStringWriter sw = new StringWriter();\n\n\t\ttry {\n\t\t\tstringWriter.setWriter(sw);\n\t\t\tstringWriter.write(node);\n\t\t\tstringWriter.flush();\n\t\t} catch (Exception e) {\n\t\t\tprtln(\"sp: \" + e.getMessage());\n\t\t}\n\t\treturn sw.toString();\n\t}",
"public final String toString()\n\t{\n\t\tif (dataValue == null)\n\t\t{\n\t\t\tif ((stream == null) && (_blobValue == null) )\n\t\t\t{\n\t\t\t\treturn \"NULL\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (SanityManager.DEBUG)\n\t\t\t\t\tSanityManager.THROWASSERT(\n\t\t\t\t\t\t\"value is null, stream or blob is not null\");\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn org.apache.derby.iapi.util.StringUtil.toHexString(dataValue, 0, dataValue.length);\n\t\t}\n\t}",
"public String getNoneText() {\r\n return ValueBindings.get(this, \"noneText\", noneText, \"None\");\r\n }",
"@Override\r\n\tpublic String toString() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic String display() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String display() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String display() {\n\t\treturn null;\r\n\t}",
"@Override\n public Object string(Object node) {\n Node<E> myNode = (Node<E>)node;\n String parentString = \"null\";\n if (myNode.parent != null) {\n parentString = myNode.parent.element.toString();\n }\n return myNode.element + \"_p(\" + parentString + \")\"; }",
"@Override\n public String convertToString(LinkedProperty property, Object val) {\n return null;\n }"
] | [
"0.701798",
"0.6800801",
"0.6431547",
"0.6374998",
"0.6359629",
"0.63418925",
"0.62980175",
"0.6275251",
"0.6273014",
"0.6273014",
"0.6239307",
"0.62298465",
"0.61892056",
"0.6183135",
"0.6145009",
"0.6111872",
"0.60638064",
"0.6058117",
"0.60240746",
"0.602194",
"0.6014142",
"0.6004689",
"0.5994862",
"0.59828293",
"0.59615505",
"0.5928906",
"0.5914969",
"0.5898296",
"0.58950466",
"0.5893211",
"0.5855602",
"0.58418137",
"0.5836851",
"0.5831879",
"0.5831879",
"0.5825742",
"0.58226955",
"0.5818327",
"0.5812136",
"0.57465154",
"0.5733284",
"0.57278174",
"0.57219386",
"0.57129014",
"0.57121885",
"0.5691439",
"0.56715614",
"0.5669376",
"0.5669305",
"0.5658352",
"0.5658352",
"0.56346816",
"0.56309056",
"0.56265897",
"0.5623023",
"0.56125176",
"0.5601818",
"0.5589012",
"0.55852103",
"0.55844057",
"0.5571633",
"0.55605745",
"0.55435646",
"0.5536869",
"0.5535478",
"0.55295557",
"0.5520776",
"0.5506459",
"0.54817855",
"0.54817855",
"0.5476401",
"0.5476401",
"0.5476401",
"0.5476401",
"0.5476401",
"0.5476401",
"0.5476401",
"0.5474102",
"0.5467518",
"0.54464585",
"0.5444546",
"0.5436277",
"0.54316205",
"0.5424576",
"0.54190034",
"0.5406107",
"0.54022056",
"0.5400335",
"0.5393305",
"0.5386554",
"0.5380441",
"0.53799915",
"0.53762794",
"0.5371754",
"0.5371629",
"0.537097",
"0.5365416",
"0.5365416",
"0.53421795",
"0.53413767"
] | 0.72169065 | 0 |
Emit a time stamp that might be null. | static public void emitNullableTimestamp(RowEmitter outputEmitter, long value, long nullValue) {
if(value != nullValue) {
Calendar creationTimestamp = Calendar.getInstance();
creationTimestamp.setTimeInMillis(value);
outputEmitter.addTimestamp(new Timestamp(
SqlType.getType("timestamp with time zone"),
creationTimestamp.get(Calendar.YEAR),
creationTimestamp.get(Calendar.MONTH)+1,
creationTimestamp.get(Calendar.DAY_OF_MONTH),
creationTimestamp.get(Calendar.HOUR_OF_DAY),
creationTimestamp.get(Calendar.MINUTE),
creationTimestamp.get(Calendar.SECOND),
creationTimestamp.get(Calendar.MILLISECOND)*1000000));
}
else
outputEmitter.addNull();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setTimestamp() {\n timestamp = System.nanoTime();\n }",
"private String makeEventStamp() {\n String name = \"DTSTAMP\";\n return formatTimeProperty(LocalDateTime.now(), name) + \"\\n\";\n }",
"private void stamp() {\n mInternalStamp = SystemClock.elapsedRealtime();\n }",
"@Override\r\n\tpublic long getTimestamp() {\n\t\treturn -1;\r\n\t}",
"UtcT time_stamp () throws BaseException;",
"private String getcurrentTimeStamp() {\n\t\tDateTimeFormatter format = DateTimeFormatter\n\t\t\t\t.ofPattern(RidGeneratorPropertyConstant.TIMESTAMP_FORMAT.getProperty());\n\t\treturn LocalDateTime.now().format(format);\n\t}",
"void now(HplsqlParser.Expr_func_paramsContext ctx) {\n if (ctx != null) {\n evalNull();\n return;\n }\n evalVar(currentTimestamp(3));\n }",
"java.lang.String getTimestamp();",
"java.lang.String getTimestamp();",
"String getTimestamp();",
"String getTimestamp();",
"@Override\n\tpublic Long updateStartTime() {\n\t\treturn null;\n\t}",
"public Timestamp() {\n makeNow();\n }",
"@Override\n default String getTs() {\n return null;\n }",
"public String toString() {\n return this.time != null ? this.time.format(TIME_FORMATTER) : \"\";\n }",
"@Override\n\tpublic String getTimestamp()\n\t{\n\t\treturn new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss.SSS\").format(new Date());\n\t}",
"public static String timestamp()\n\t{\n\t\t/**\n\t\t * Get the current time formatted as HH:mm:ss.\n\t\t */\t\t\n\t\treturn new SimpleDateFormat(\"HH:mm:ss\").format(new Date());\n\t}",
"public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }",
"public boolean hasTimestamp() {\n return timestamp_ != null;\n }",
"public void setTimeStamp(java.lang.String param){\r\n \r\n if (param != null){\r\n //update the setting tracker\r\n localTimeStampTracker = true;\r\n } else {\r\n localTimeStampTracker = false;\r\n \r\n }\r\n \r\n this.localTimeStamp=param;\r\n \r\n\r\n }",
"private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}",
"@Override\n\tpublic Date getUpdateTime() {\n\t\treturn null;\n\t}",
"public long getTimestamp_() {\n return timestamp_;\n }",
"private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }",
"public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }",
"protected synchronized void updateTimestamp() {\n\t\ttimestamp = System.currentTimeMillis();\n\t}",
"public Builder clearTimestamp() {\r\n bitField0_ = (bitField0_ & ~0x00000001);\r\n timestamp_ = 0L;\r\n onChanged();\r\n return this;\r\n }",
"public Builder clearTimestamp() {\r\n bitField0_ = (bitField0_ & ~0x00000001);\r\n timestamp_ = 0L;\r\n onChanged();\r\n return this;\r\n }",
"public boolean hasTimestamp() {\n return timestampBuilder_ != null || timestamp_ != null;\n }",
"public String getTimestamp()\n {\n return timestamp;\n }",
"public Builder clearTimestamp() {\n bitField0_ = (bitField0_ & ~0x00000040);\n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public Builder clearTimestamp() {\n bitField0_ = (bitField0_ & ~0x00000002);\n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"private String replaceNull(Time s) {\n\t\treturn s == null ? \"--\" : s.toString();\n\t}",
"public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}",
"private void updateTimeStamp() {\n\t\tthis.timeStamp = new Timestamp(System.currentTimeMillis());\n\t}",
"public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}",
"@NonNull\n public Date getTimestamp() {\n return timestamp;\n }",
"public Builder clearTimestamp() {\n bitField0_ = (bitField0_ & ~0x00000001);\n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public long getTimestamp();",
"public long getTimestamp();",
"@Override\n public long getTimestamp() {\n return timestamp;\n }",
"public long getStamp() {\n return stamp;\n }",
"@JsProperty(name = \"timestamp\")\n public native void setTimestamp(@DoNotAutobox Number value);",
"synchronized public String get_and_increment_timestamp()\n {\n return String.format(CLOCK_FORMAT_STRING,++counter);\n }",
"public Builder clearTimestamp() {\n bitField0_ = (bitField0_ & ~0x00000008);\n timestamp_ = 0;\n onChanged();\n return this;\n }",
"public long getTimeStamp() {return timeStamp;}",
"public String getTimeStamp() {\n return timeStamp;\n }",
"int getTimestamp();",
"public static String getTimestamp() {\n\t\tCalendar cal = Calendar.getInstance();\n\t\t//define the format of time stamp\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\treturn sdf.format(cal.getTime());\n\n\t}",
"protected void writeNullValue() throws IOException {\n _generator.writeNull();\n }",
"public void setTimeStamp(long t)\n\t{attributes.add(TIMESTAMP,String.valueOf(t));}",
"public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"long getTimestamp();",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"public long getTimestamp() {\r\n return timestamp_;\r\n }",
"long getTimeStamp();",
"public long getTimestamp() {\n return timestamp_;\n }",
"public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}",
"TimeStamp getT();",
"public Builder clearTimestamp() {\n \n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public static Timestamp getNowTimestamp()\n {\n return new Timestamp(System.currentTimeMillis());\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"public long getTimestamp() {\n return timestamp_;\n }",
"@Nullable\n default Long extractTimestamp(OUT record) {\n return null;\n }",
"public long getTimeStamp() {\n return timestamp;\n }",
"public static String timestamp(){\n\t\tDate date = new Date();\n\t\tDateFormat hourdateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss \");\n\t\treturn hourdateFormat.format(date);\n\t}",
"public java.lang.String getTimestamp() {\n return timestamp;\n }",
"public static Timestamp getNowTimestamp() {\n return new Timestamp(System.currentTimeMillis());\n }",
"@Override\n\tpublic int getStartTime() {\n\t\treturn 0;\n\t}",
"public long getTimestamp() {\r\n return timestamp;\r\n }",
"public Builder clearTimestamp() {\n \n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public Builder clearTimestamp() {\n \n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public Builder clearTimestamp() {\n \n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public Builder clearTimestamp() {\n \n timestamp_ = 0L;\n onChanged();\n return this;\n }",
"public Builder clearTimestamp() {\n if (timestampBuilder_ == null) {\n timestamp_ = null;\n onChanged();\n } else {\n timestamp_ = null;\n timestampBuilder_ = null;\n }\n\n return this;\n }",
"@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }",
"public long getTimestamp() {\r\n return timestamp;\r\n }"
] | [
"0.6272049",
"0.61817425",
"0.604535",
"0.58795834",
"0.58790064",
"0.5878477",
"0.5797694",
"0.5787003",
"0.5787003",
"0.5760858",
"0.5760858",
"0.5752503",
"0.57511324",
"0.5725851",
"0.5719451",
"0.5707585",
"0.563505",
"0.5610618",
"0.5609994",
"0.559438",
"0.5563163",
"0.5559619",
"0.5557953",
"0.55484504",
"0.5540047",
"0.5533686",
"0.5533184",
"0.5533184",
"0.55321187",
"0.552966",
"0.55202997",
"0.55110705",
"0.5502016",
"0.55015266",
"0.5499402",
"0.54950356",
"0.54878426",
"0.54732627",
"0.5461788",
"0.5461788",
"0.5458136",
"0.5449464",
"0.5426731",
"0.5424712",
"0.5414685",
"0.541073",
"0.5400323",
"0.53997517",
"0.5395791",
"0.5387206",
"0.53740835",
"0.53718555",
"0.5362451",
"0.5362451",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.53561646",
"0.5345411",
"0.5345411",
"0.53423655",
"0.5341568",
"0.5339014",
"0.5322966",
"0.53226876",
"0.53082323",
"0.53026545",
"0.53026545",
"0.53026545",
"0.53026545",
"0.53026545",
"0.53026545",
"0.53026545",
"0.53026545",
"0.5290631",
"0.5287508",
"0.5279969",
"0.52787626",
"0.5278156",
"0.52741927",
"0.5273948",
"0.5268112",
"0.5268112",
"0.5268112",
"0.5268112",
"0.52678",
"0.5262726",
"0.5257156"
] | 0.7267401 | 0 |
Print the prefix, an opening bracket, new line, each column content in a line with leading tab and newline at the end and a closing bracket. | public static String rowToString(String prefix, RowView rowView) {
if(rowView == null) return "";
StringBuilder sb = new StringBuilder();
sb.append(prefix);
sb.append("(\n");
try {
for(int i = 0; i < rowView.getColumnCount(); i++) {
sb.append('\t');
ValueHolder valueHolder = new ValueHolder(rowView.getColumnTypes().get(i));
rowView.getValueAt(i, valueHolder);
if(valueHolder.isNull())
sb.append("(null)");
else if(valueHolder.getValueType() == SqlType.getType("bytea"))
sb.append("(bytea)");
else if(valueHolder.getValueType() == SqlType.getType("character varying")) {
String value = valueHolder.toString();
if(value.length() > 70) value = value.substring(0, 67) + "...";
sb.append(value);
}
else
valueHolder.toString(sb);
sb.append('\n');
}
}
catch(RuntimeException e) {
sb.append('\t');
sb.append(e.getMessage());
sb.append('\n');
}
sb.append(')');
return sb.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void print() {\n \tfor (int i=0; i < this.table.height; i++) {\n \t\tfor (int j=0; j < this.table.width; j++) {\n \t\t\tString tmp = \"e\";\n \t\t\tif(this.table.field[i][j].head != null) {\n \t\t\t\ttmp = \"\";\n \t\t\t\tswitch (this.table.field[i][j].head.direction) {\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\ttmp+=\"^\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\ttmp+=\">\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\ttmp+=\"V\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\ttmp+=\"<\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n \t\t\t}\n \t\t\telse if(this.table.field[i][j].obj != null) {\n \t\t\t\ttmp = this.table.field[i][j].obj.name;\n \t\t\t}\n \t\t\tSystem.out.print(\" \" + tmp);\n \t\t}\n \t\t\tSystem.out.println(\"\");\n \t}\n }",
"private void tabPrinter() {\n IntStream.range(0, tabs).forEach(i -> writer.print(\" \"));\n }",
"public void print() {\n System.out.println();\n for (int level = 0; level < 4; level++) {\n System.out.print(\" Z = \" + level + \" \");\n }\n System.out.println();\n for (int row = 3; row >= 0; row--) {\n for (int level = 0; level < 4; level++) {\n for (int column = 0; column < 4; column++) {\n System.out.print(get(column, row, level));\n System.out.print(\" \");\n }\n System.out.print(\" \");\n }\n System.out.println();\n }\n System.out.println();\n }",
"@Override\n public void printable()\n {\n\tfor (int i = 0; i < width; i++)\n\t{\n\t for (int k = 0; k < length; k++)\n\t {\n\t\tif (k == 0 || k == length - 1)\n\t\t System.out.print(\"O \");\n\t\telse if (i == 0 || i == width - 1)\n\t\t System.out.print(\"O \");\n\t\telse\n\t\t System.out.print(\" \");\n\t }\n\n\t System.out.println();\n\t}\n }",
"public void print() {\n for (int i = 0; i < headers.length; i++) {\n System.out.printf(headers[i] + \", \"); // Print column headers.\n }\n System.out.printf(\"\\n\");\n for (int i = 0; i < (data.length - 1); i++) {\n for (int j = 0; j < data[i].length; j++) {\n System.out.printf(data[i][j] + \" \"); // Print value at i,j.\n }\n System.out.printf(\"\\n\");\n }\n }",
"void print() {\n for (int i = 0; i < 8; i--) {\n System.out.print(\" \");\n for (int j = 0; j < 8; j++) {\n System.out.print(_pieces[i][j].textName());\n }\n System.out.print(\"\\n\");\n }\n }",
"public void printBoard() {\r\n // Print column numbers.\r\n System.out.print(\" \");\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\" %d \", i+1);\r\n }\r\n System.out.println(\"\\n\");\r\n\r\n\r\n for (int i = 0; i < BOARD_SIZE; i++) {\r\n System.out.printf(\"%c %c \", 'A' + i, board[i][0].mark);\r\n\r\n for (int j = 1; j < BOARD_SIZE; j++) {\r\n System.out.printf(\"| %c \", board[i][j].mark);\r\n }\r\n\r\n System.out.println(\"\");\r\n\r\n if (i < BOARD_SIZE - 1) {\r\n System.out.print(\" \");\r\n for (int k = 1; k < BOARD_SIZE * 3 + BOARD_SIZE; k++) {\r\n System.out.print(\"-\");\r\n }\r\n System.out.println(\"\");\r\n }\r\n }\r\n System.out.println(\"\");\r\n }",
"public void print() {\r\n\r\n\t\tfor (int row=0; row<10; row++) \r\n\t\t{\r\n\t\t\tfor (int col=0; col<10; col++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\t\"+nums[row][col]); //separated by tabs\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}",
"public void printTable() {\n System.out.print(\"\\033[H\\033[2J\"); // Clear the text in console\n System.out.println(getCell(0, 0) + \"|\" + getCell(0, 1) + \"|\" + getCell(0, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(1, 0) + \"|\" + getCell(1, 1) + \"|\" + getCell(1, 2));\n System.out.println(\"-+-+-\");\n System.out.println(getCell(2, 0) + \"|\" + getCell(2, 1) + \"|\" + getCell(2, 2));\n }",
"public void printString()\r\n\t{\r\n\t\t//print the column labels\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"Word\", \"Occurrences [form: (Paragraph#, Line#)]\");\r\n\t\tSystem.out.printf(\"%-20s %s\\n\", \"----\", \"-----------\");\r\n\t\troot.printString();\r\n\t}",
"public void print() {\n int rows = this.getNumRows();\n int cols = this.getNumColumns();\n\n for (int r = 0; r < rows; r++) {\n\n for (int c = 0; c < cols; c++) {\n System.out.print(this.getString(r, c) + \", \");\n }\n\n System.out.println(\" \");\n }\n }",
"public void print(String title, String prefix, int colwidth)\n {\n\tif (0 < title.length()) {\n\t System.out.println(title);\n\t}\n\tif (null == head) {\n\t System.out.println(prefix + \"(empty list)\");\n\t return;\n\t}\n\tSystem.out.println(prefix + \"head: \" + head.value);\n\tfor (StringListNode current = head; null != current; current = current.next) {\n\t System.out.print(prefix + \" \");\n\t pstring(current.value, colwidth);\n\t System.out.print(\" p: \");\n\t if (null == current.prev) {\n\t\tpstring(\"(null)\", colwidth);\n\t }\n\t else {\n\t\tpstring(current.prev.value, colwidth);\n\t }\n\t System.out.print(\" n: \");\n\t if (null == current.next) {\n\t\tpstring(\"(null)\", colwidth);\n\t }\n\t else {\n\t\tpstring(current.next.value, colwidth);\n\t }\n\t System.out.println();\n\t}\n\tSystem.out.println(prefix + \"tail: \" + tail.value);\n }",
"public void display() {\n\t\tdisplayColumnHeaders();\n\t\taddHyphens();\n\t\tfor (int row = 0; row < 3; row++) {\n\t\t\taddSpaces();\n\t\t\tSystem.out.print(\" row \" + row + ' ');\n\t\t\tfor (int col = 0; col < 3; col++)\n\t\t\t\tSystem.out.print(\"| \" + getMark(row, col) + \" \");\n\t\t\tSystem.out.println(\"|\");\n\t\t\taddSpaces();\n\t\t\taddHyphens();\n\t\t}\n\t}",
"private void printCodeTable() {\n System.out.println(\"\\nPrinting the code table:\");\n for(int i = 0; i < codeTable.length; i++) {\n if(codeTable[i] != null) {\n if(i == 10) {\n System.out.println(\"\\\\n \" + codeTable[i]);\n } else {\n System.out.println(((char) i) + \" \" + codeTable[i]);\n }\n }\n }\n }",
"@Override\n public void printGrid(){\n for(int row = 0; row < rows; row++){\n System.out.print(\"\\n\");\n if(row==0){\n char row_char='A';\n System.out.print(\" |\");\n for(int i=0; i<rows; i++){\n System.out.print(\"[\" + row_char + \"]\");\n row_char++;\n }\n System.out.print(\"\\n\");\n System.out.print(\"---|\");\n for(int i=0; i<rows;i++){\n System.out.print(\"---\");\n }\n System.out.print(\"\\n\");\n }\n\n for(int column = 0; column < columns; column++){\n if (column==0){System.out.print(\"[\"+row+\"]|\");}\n System.out.print(grid[row][column]);\n }\n }\n }",
"public void print() {\n\n for (int i = 0; i < this.rows; i++) {\n for (int j = 0; j < this.cols; j++) {\n System.out.format(\"%.4f\", data[i][j]);\n if (j != this.cols - 1)\n System.out.print(\" \");\n }\n System.out.println(\"\");\n }\n }",
"public void print() {\n\t\tfor (int i = 0; i < TABLE_SIZE; i++) {\n\t\t\tSystem.out.print(\"|\");\n\t\t\tif (array[i] != null) {\n\t\t\t\tSystem.out.print(array[i].value);\n\t\t\t} else {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.print(\"|\\n\");\n\t}",
"public void printBoard() {\nString xAxis[] = {\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\"};\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\tfor(int i = 0; i<8;i++) {\n\t\t\tSystem.out.print((i + 1) + \"\\t\");\n\t\t\tfor(int j = 0; j<8;j++) {\n\t\t\t\tSystem.out.print(board.getBoard()[i][j] + \"\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tSystem.out.println();\n\t\tfor(int k = 0; k <8; k++) {\n\t\t\tSystem.out.print(\"\\t\" + xAxis[k]);\n\t\t}\n\t\tSystem.out.println();\n\t}",
"private String tabulatorString(int level) {\r\n String tabs = \"\";\r\n for (int i = 0; i < level; i++) {\r\n tabs += \"\\t\";\r\n }\r\n return tabs;\r\n }",
"public void print()\n {\n System.out.println(\"------------------------------------------------------------------\");\n System.out.println(this.letters);\n System.out.println();\n for(int row=0; row<8; row++)\n {\n System.out.print((row)+\"\t\");\n for(int col=0; col<8; col++)\n {\n switch (gameboard[row][col])\n {\n case B:\n System.out.print(\"B \");\n break;\n case W:\n System.out.print(\"W \");\n break;\n case EMPTY:\n System.out.print(\"- \");\n break;\n default:\n break;\n }\n if(col < 7)\n {\n System.out.print('\\t');\n }\n\n }\n System.out.println();\n }\n System.out.println(\"------------------------------------------------------------------\");\n }",
"public String print() {\n StringBuilder sb = new StringBuilder();\n sb.append(tableName).append(System.lineSeparator());\n\n if (columnsDefinedOrder.size() <= 0) {\n columnsDefinedOrder = rows.stream()\n .findFirst()\n .map(x -> new ArrayList<>(x.keySet()))\n .orElse(columnsDefinedOrder);\n }\n\n Map<String, Integer> widthEachColumn = new HashMap<>();\n for (String columnName : columnsDefinedOrder) {\n widthEachColumn.put(columnName, 0);\n }\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n int length = row.get(columnName).length();\n if (length > widthEachColumn.get(columnName)) {\n widthEachColumn.put(columnName, length);\n }\n }\n }\n\n for (String columnName : columnsDefinedOrder) {\n int width = widthEachColumn.get(columnName) + 5;\n widthEachColumn.put(columnName, width);\n }\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", row.get(columnName)));\n }\n sb.append(System.lineSeparator());\n }\n\n return sb.toString();\n }",
"public void print () \r\n\t{\r\n\t\tfor (int index = 0; index < count; index++)\r\n\t\t{\r\n\t\t\tif (index % 5 == 0) // print 5 columns\r\n\t\t\t\tSystem.out.println();\r\n\r\n\t\t\tSystem.out.print(array[index] + \"\\t\");\t// print next element\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t}",
"public void test(){\n\t\tfor(int i =0; i< this.position.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tfor(int p = 0 ; p<this.position.length;p++){\n\t\t\t\tSystem.out.print(this.position[i][p]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\" \");\n\t\tfor(int i =0; i< this.position.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tfor(int p = 0 ; p<this.position.length;p++){\n\t\t\t\tSystem.out.print(this.Ari[i][p]);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n System.out.print(\"\\t\\t\");\r\n for (int i = 0; i <= COLUMN; i++) {\r\n System.out.print(i + \"\\t\");\r\n }\r\n System.out.println();\r\n\r\n // handle printing horizontal border\r\n System.out.print(\"\\t-----\");\r\n for (int i = 0; i <= COLUMN; i++) {\r\n System.out.print(\"----\");\r\n }\r\n System.out.println();\r\n\r\n // handle printing row numbers and vertical border\r\n for (int i = 0; i <= ROW; i++) {\r\n System.out.print(i + \"\\t|\\t\");\r\n // nested loop, creating the multiplication table\r\n for (int j = 0 ; j <= COLUMN; j++) {\r\n System.out.print((i * j) + \"\\t\");\r\n }\r\n System.out.println();\r\n }\r\n }",
"void printPostfix() {\n System.out.println(output+\"\\n\");\n\t\tfor(int i = 0; i < errorNum; i++) {\n\t\t\tSystem.out.println(\"\\nThere is an error:\\\"\" + errorList.get(i) + \"\\\" at:\");\n\t\t\tSystem.out.println(input);\n\t\t\tint n = i;\n\t\t\tfor(int j = 0; j < errorPos.length(); j++) {\n\t\t\t\tif(errorPos.charAt(j) != '^') {\n\t\t\t\t\tSystem.out.write(errorPos.charAt(j));\n\t\t\t\t} else {\n\t\t\t\t\tif(n == 0) {\n\t\t\t\t\t\tSystem.out.write(errorPos.charAt(j));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.write(' ');\n\t\t\t\t\t\tn--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}\n\t}",
"public static void printField(){\n System.out.println(\"---------\");\r\n for (char[] cell : output) {\r\n System.out.print(\"| \");\r\n for (char value : cell) {\r\n System.out.print(value + \" \");\r\n }\r\n System.out.print(\"|\\n\");\r\n }\r\n System.out.println(\"---------\");\r\n }",
"public static void main(String[] args) {\n final int maxRows = 10;\n for (int row = 1; row <= maxRows; row++) {\n for (int blanks = 1; blanks <= maxRows - row; blanks++) {\n System.out.print(\" \");\n }\n for (int star = 1; star <= 2 * row - 1; star++) {\n System.out.print(\"*\");\n }\n System.out.println();\n }\n\n final int trunkHeight = 4;\n final int trunkWidth = 5;\n for (int row = 0; row < trunkHeight; row++) {\n for (int blanks = 0; blanks < maxRows - (trunkWidth / 2 + 1);\n blanks++) {\n System.out.print(\" \");\n }\n for (int star = 0; star < trunkWidth; star++) {\n System.out.print(\"*\");\n }\n System.out.println();\n }\n\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tfor(int row=1;row<=5;row++)\r\n\t\t{\r\n\t\t\tfor(int col=1;col<=4;col++)\r\n\t\t\t{\r\n\t\t\t\tif(((col==1)||(col==4))&&(row==1))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t}\r\n\t\t\t\telse if(((col==2)||(col==3))&&((row==2)||(row==4)||(row==5)))\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"*\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\r\n\t}",
"public void achoo(){\n for(int i = 0;i<12;i++){\n for(int j = 0;j<12;j++){\n System.out.print(\"\\t\"+(i+1)*(j+1));\n }\n System.out.print(\"\\n\");\n }\n }",
"void addSpaces() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"| \");\n\t\tSystem.out.println(\"|\");\n\t}",
"private static void printLine(StringBuffer out, int[] colWidths,\n\t\t\tString left, String sep) {\n\t\tStringBuffer bf = new StringBuffer(120);\n\t\tint tableLength = left.length();\n\n\t\tfor (int i = 0; i < colWidths.length; i++)\n\t\t\ttableLength += colWidths[i] + sep.length();\n\n\t\t// -1 correction for the last sep of length 3, ' | '\n\t\tfor (int i = 0; i < tableLength - 1; i++)\n\t\t\tbf.append('-');\n\n\t\tout.append(bf + \"\\n\");\n\t}",
"public String toString()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\" 1 2 3 4 5 6 7 8\\n\");\n\t\tfor(int i = 0; i < 8; i++)\n\t\t{\n\t\t\tsb.append((char) (i + FIRST_ROW) + \" \");\n\t\t\tfor(int i2 = 0; i2 < 8; i2++)\n\t\t\t{\n\t\t\t\tsb.append(\" \" + fields[i][i2]);\n\t\t\t\tif(i2 == 7)\n\t\t\t\t{\n\t\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sb.toString();\n\t}",
"public void formatPrint() {\n\t\tSystem.out.printf(\"%8d \", codigo);\n\t\tSystem.out.printf(\"%5.5s \", clase);\n\t\tSystem.out.printf(\"%5.5s \", par);\n\t\tSystem.out.printf(\"%5.5s \", nombre);\n\t\tSystem.out.printf(\"%8d \", comienza);\n\t\tSystem.out.printf(\"%8d\", termina);\n\t}",
"public void printGrid() {\n\t\tfor (int row = 0; row < ROWS; row++) {\n\t\t\tif (row % 3 == 0 && row != 0)\n\t\t\t\tSystem.out.println(\" |\\n ------------------------\");\n\t\t\telse if (row % 3 == 0)\n\t\t\t\tSystem.out.println(\" -------------------------\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\" | \");\n\t\t\tfor (int col = 0; col < COLUMNS; col++) {\n\t\t\t\tif (col % 3 == 0)\n\t\t\t\t\tSystem.out.print(\" | \");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tSystem.out.print(grid[row][col]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\" |\\n -------------------------\");\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tint k,n=10;\r\n\t\tk=n-1;\r\n\t\tfor(int i=0;i<=n;i++)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<=k;j++)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tk=k-1;\r\n\t\t\tfor(int j=0;j<=i;j++)\r\n\t\t\t\tSystem.out.print(\"*\"+\" \");\r\n\t\t\tSystem.out.println(\"\\r\");\r\n\t\t}\r\n\t}",
"public void print(){\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tSystem.out.print(table[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void print(){\n for (int i = 0; i < rows; i++)\n {\n for (int j = 0; j < cols; j++)\n {\n if (start.getCol()==j&&start.getRow()==i)\n System.out.print('S');\n else if (end.getCol()==j&&end.getRow()==i)\n System.out.print('E');\n else if (maze[i][j]==1)\n System.out.print('\\u2588');\n else if (maze[i][j]==0)\n System.out.print('\\u2591');\n if (j!=cols-1){\n System.out.print(\" \");\n }\n }\n System.out.println();\n }\n //System.out.println(\"-------\");\n }",
"public void displayHuffCodesTable() {\n\t\tStringBuffer toPrint = new StringBuffer();\n\t\t\n\t\tfor (int i = 0; i < this.huffCodeVals.length; i++) {\n\t\t\t\n\t\t\tif (this.huffCodeVals[i] != null) {\n\t\t\t\tif (i == 9) {\n\t\t\t\t\ttoPrint.append(\"\\\\t\");\n\t\t\t\t\t\n\t\t\t\t} else if (i == 10) {\n\t\t\t\t\ttoPrint.append(\"\\\\n\");\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\ttoPrint.append((char) i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttoPrint.append(\":\" + this.huffCodeVals[i] + \"\\n\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(toPrint.toString());\n\t}",
"void Print()\n {\n int quadLabel = 1;\n String separator;\n\n System.out.println(\"CODE\");\n\n Enumeration<Quadruple> e = this.Quadruple.elements();\n e.nextElement();\n\n while (e.hasMoreElements())\n {\n Quadruple nextQuad = e.nextElement();\n String[] quadOps = nextQuad.GetOps();\n System.out.print(quadLabel + \": \" + quadOps[0]);\n for (int i = 1; i < nextQuad.GetQuadSize(); i++)\n {\n System.out.print(\" \" + quadOps[i]);\n if (i != nextQuad.GetQuadSize() - 1)\n {\n System.out.print(\",\");\n } else System.out.print(\"\");\n }\n System.out.println(\"\");\n quadLabel++;\n }\n }",
"private void boardPrint(){\t\t\n\t\tfor (int i=0;i<size;i++) {\n\t for (int j=0;j<size;j++) {\n\t System.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t for (int j=0;j<size;j++) {\n\t \tint value = (i*size) + j + 1;\n\t \tif(board[i][j] == '\\u0000'){\n\t \t\tif(value < 10)\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t\telse\n\t \t\t\tSystem.out.print(\"| \"+ value + \" |\");\n\t \t}\n\t \telse\n\t \t\tSystem.out.print(\"| \"+ board[i][j] + \" |\");\n\t }\n\t System.out.println();\n\t }\n\n\t for (int i=0;i<size;i++){\n\t \tSystem.out.print(\" ---- \");\n\t }\n\t System.out.println();\n\t}",
"public void print(){\n for(int i=0; i<maze.length;i+=1) {\n for (int j = 0; j < maze[0].length; j += 1){\n if(i == start.getRowIndex() && j == start.getColumnIndex())\n System.out.print('S');\n else if(i == goal.getRowIndex() && j == goal.getColumnIndex())\n System.out.print('E');\n else if(maze[i][j]==1)\n System.out.print(\"█\");\n else if(maze[i][j]==0)\n System.out.print(\" \");\n\n\n }\n System.out.println();\n }\n }",
"private static void printBoard(char[][] board) {\n\n\t\t// header\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tSystem.out.print(\"- \");\n\t\t}\n\n\t\tSystem.out.println();\n\n\t\tfor (int i = 0; i < board.length; i++) {\n\t\t\tfor (int j = 0; j < board[0].length; j++) {\n\t\t\t\tSystem.out.print(board[i][j] + \" \");\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t}\n\n\t\t// footer\n\t\tfor (int j = 0; j < board.length; j++) {\n\t\t\tSystem.out.print(\"- \");\n\t\t}\n\n\t\tSystem.out.println();\n\t}",
"public void print() {\n\t\t\n\t\tfor (int j = 0; j < height(); j++) {\n\t\t\tfor (int i = 0; i < width(); i++) {\n\t\t\t\tSystem.out.printf(\"%3d \", valueAt(i, j));\n\t\t\t}\n\t\t\tSystem.out.printf(\"\\n\");\n\t\t}\n\t\tSystem.out.printf(\"\\n\");\t\n\t}",
"void printNode() {\n\t\tint j;\n\t\tSystem.out.print(\"[\");\n\t\tfor (j = 0; j <= lastindex; j++) {\n\n\t\t\tif (j == 0)\n\t\t\t\tSystem.out.print (\" * \");\n\t\t\telse\n\t\t\t\tSystem.out.print(keys[j] + \" * \");\n\n\t\t\tif (j == lastindex)\n\t\t\t\tSystem.out.print (\"]\");\n\t\t}\n\t}",
"public void printMatrix(){\n for (int row = 0; row < matrix.length; row++){\n for (int count = 0; count < matrix[row].length; count++){\n System.out.print(\"----\");\n }\n System.out.println();\n System.out.print('|');\n for (int column = 0; column < matrix[row].length; column++){\n if (matrix[row][column] == SHIP)\n System.out.print('X' + \" | \");\n else if (matrix[row][column] == HIT)\n System.out.print('+' + \" | \");\n else if (matrix[row][column] == MISS)\n System.out.print('*' + \" | \");\n else\n System.out.print(\" \" + \" | \");\n }\n System.out.println();\n }\n }",
"public void print()\n {\n System.out.println();\n for (int i = 0; i < 6; i++) {\n for (int j = 0; j < 6; j++) {\n int index=0;\n if(j>2)\n index++;\n if(i>2)\n index+=2;\n char c='○';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Black)\n c='B';\n if(blocks[index].getCells()[i%3][j%3]==CellType.Red)\n c='R';\n System.out.print(c+\" \");\n if(j==2)\n System.out.print(\"| \");\n }\n System.out.println();\n if(i==2)\n System.out.println(\"-------------\");\n }\n }",
"public void printTable(){\n \tfor (int i = 0; i < Table.size(); i++) {\n \t\tList<T> data = Table.get(i);\n \t\ttry {\n \t\t\tSystem.out.println(\"Bucket: \" + i);\n \t\t\tSystem.out.println(data.getFirst());\n \t\t\tSystem.out.println(\"+ \" + (data.getLength() - 1) + \" more at this bucket\\n\\n\");\n \t\t} catch (NoSuchElementException e) {\n \t\t\tSystem.out.println(\"This bucket is empty.\\n\\n\");\n \t\t}\n \t}\n }",
"public static void main(String[] args){\n final Object[][] table = new String[6][];\n //each line has 5 items\n table[0] = new String[] { \"Kilograms\", \"Pounds\", \"|\", \"Pounds\", \"Kilograms\" };\n table[1] = new String[] { \"1\", \"2.2 \", \"|\", \"20\", \"9.09\" };\n table[2] = new String[] { \"3\", \"6.6 \", \"|\", \"25\", \"11.36\" };\n table[3] = new String[] { \"...\", \" \", \" \", \" \", \" \" };\n table[4] = new String[] { \"197\", \"433.4 \", \"|\", \"510\", \"231.82\" };\n table[5] = new String[] { \"199\", \"437.8 \", \"|\", \"515\", \"234.09\" };\n \n for (final Object[] row : table) {\n //print out each row with proper spacing\n System.out.format(\"%15s%15s%15s%15s%15s\\n\", row);\n }\n }",
"public void tablero(){\r\n System.out.println(\" X \");\r\n System.out.println(\" 1 2 3\");\r\n System.out.println(\" | |\");\r\n //imprimir primera fila\r\n System.out.println(\" 1 \"+gato[0][0]+\" | \"+gato[0][1]+\" | \"+gato[0][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir segunda fila\r\n System.out.println(\"Y 2 \"+gato[1][0]+\" | \"+gato[1][1]+\" | \"+gato[1][2]+\" \");\r\n System.out.println(\" _____|_____|_____\");\r\n System.out.println(\" | |\");\r\n //imprimir tercera fila\r\n System.out.println(\" 3 \"+gato[2][0]+\" | \"+gato[2][1]+\" | \"+gato[2][2]+\" \");\r\n System.out.println(\" | |\");\r\n }",
"public static void printSeparator() {\n\t\tfor (int i = 1; i <= 7; i++) {\n\t\t\tSystem.out.print(\"+\");\n\t\t\tfor (int j = 1; j <= 5; j++) {\n\t\t\t\tSystem.out.print(\"-\");\n\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"+\");\n\n\t}",
"public static void main(String args[]) {\n\n\t\tint i = 0, j = 0;\n\t\t// 'i' will be the number of rows you want to print\n\t\tfor(i = 0; i < 3; i++) {\n\t\t\tfor(j = 0; j < 5; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\n\t\tSystem.out.println(\"--------------------------------------\");\n\n\t\t// for getting same rows and columns; i &j will be same\n\t\tfor(i = 0; i < 3; i++) {\n\t\t\tfor(j = 0; j < 3; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\t\tSystem.out.println(\"--------------------------------------\");\n\n\t\t// Trick for building a triangular output like, use j <= i as the conditional\n\t\t/*\n\n\t\t\t*\n\t\t\t* *\n\t\t\t* * *\n\t\t\t* * * *\n\n\t\t*/\n\t\tfor(i = 0; i < 3; i++) {\n\t\t\tfor(j = 0; j <= i; j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\t\tSystem.out.println(\"--------------------------------------\");\n\n\t\t// Print numbers\n\t\t/* this combines printing row numbers 1,2,3 etc combined with above logic for triangular shape.\n\n\t\t\t1\n\t\t\t2 2\n\t\t\t3 3 3\n\n\t\t * */\n\t\tfor(i = 1; i <= 3; i++) {\n\t\t\tfor(j = 1; j <= i; j++) {\n\t\t\t\tSystem.out.print(i+ \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\"); // bring to new line\n\t\t}\n\n\t\t// combining other smaller tricks like for i+j, if odd number print x and\n\t\t// for even print y in a specific way can give rise to many such pattern problems\n\n\t}",
"public void Print()\n\t{\n\t\tSystem.out.print(\"\\n_____GRID______\");\n\t\n\t\tfor(int x = 0; x < 9; x++)\n\t\t{\n\t\t\t\tif(x%3 == 0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\tif(grid[x] !=0)\n\t\t\t\t{\n\t\t\t\t\tif(grid[x] == -1)\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"O\" + \"_|\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"|_\"+ \"X\" + \"_|\");\n\t\t\t\t}\n\t\t\t\telse // blank square\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"|_\"+ \" \" + \"_|\");\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\tSystem.out.println(\"\");\n\t}",
"private void printSeparator() {\r\n\t\tthis.printLineGap();\r\n\t}",
"private ConfigurationHTMLPrinter startTable() {\n return println(\"<table border='0' cellspacing='0' cellpadding='0'>\").incrementIndent();\n }",
"public void print(int tabOrder);",
"private void printTable() {\n System.out.println(\"COMPLETED SLR PARSE TABLE\");\n System.out.println(\"_________________________\");\n System.out.print(\"\\t|\");\n // print header\n for(int i = 0; i < pHeader.size(); i++) {\n pHeader.get(i);\n System.out.print(\"\\t\" + i + \"\\t|\");\n }\n System.out.println();\n // print body\n for(int i = 0; i < parseTable.size(); i++) {\n System.out.print(i + \"\\t|\");\n for(int j = 0; j < parseTable.get(i).size(); j++) {\n System.out.print(\"\\t\" + parseTable.get(i).get(j) + \"\\t|\");\n }\n System.out.println();\n }\n System.out.println();\n System.out.println(\"END OF SLR PARSE TABLE\");\n System.out.println();\n }",
"public void printG(){\n\t\tfor(int i = 0; i < this.area.length;i++){\n\t\t\tSystem.out.println(\" \");\n\t\t\tSystem.out.print(\" \");\n\t\t\tfor(int p = 0 ; p < this.area.length; p++){\n\t\t\t\tif(this.Garret[i][p] == 1){\n\t\t\t\t\tSystem.out.print(\":( \");\n\t\t\t\t}\n\t\t\t\telse if(this.position[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" + \");\n\t\t\t\t}\n\t\t\t\telse if(this.Items[i][p] != null){\n\t\t\t\t\tSystem.out.print(\"<$>\");\n\t\t\t\t}\n\t\t\t\telse if(this.Door[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" D \");\n\t\t\t\t}\n\t\t\t\telse if(this.Stairs[i][p] ==1){\n\t\t\t\t\tSystem.out.print(\" S \");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.print(this.area[i][p]);\n\t\t\t\t}\n\t\t\t}//end of inner for print\n\t\t}//end of outter for print\n\t}",
"@Override\n public String toString() {\n String result = \"\";\n\n for (int position = 0; position < 64; position++) {\n if (position > 0) {\n if (position % 16 == 0) { // New level\n result += '|';\n } else if (position % 4 == 0) {\n result += ' '; // New row\n }\n }\n result += get(position);\n }\n return result;\n }",
"void displayColumnHeaders() {\n\t\tSystem.out.print(\" \");\n\t\tfor (int j = 0; j < 3; j++)\n\t\t\tSystem.out.print(\"|col \" + j);\n\t\tSystem.out.println();\n\t}",
"public void printTable() {\r\n System.out.println(frame+\") \");\r\n for (int y = 0; y < table.length; y++) {\r\n System.out.println(Arrays.toString(table[y]));\r\n }\r\n frame++;\r\n }",
"@Override\n public String toString() {\n String r = \"\" + value[0];\n for (int i = 1; i < DIM; i++) {\n r += DELIMITER + value[i];\n }\n \n r += DELIMITER + count;\n\n return r;\n }",
"public void print() {\n for (int i = 0; i < table.length; i++) {\n System.out.printf(\"%d: \", i);\n \n HashMapEntry<K, V> temp = table[i];\n while (temp != null) {\n System.out.print(\"(\" + temp.key + \", \" + temp.value + \")\");\n \n if (temp.next != null) {\n System.out.print(\" --> \");\n }\n temp = temp.next;\n }\n \n System.out.println();\n }\n }",
"private void outputIndentation() {\n\t for (int i = 0; i < indent; i++) {\n\t out.print(basicIndent);\n\t }\n\t}",
"public void display() {\n\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t\n\t\tfor (byte r = (byte) (b.length - 1); r >= 0; r--) {\n\t\t\tSystem.out.print(r + 1);\n\t\t\t\n\t\t\tfor (byte c = 0; c < b[r].length; c++) {\n\t\t\t\tSystem.out.print(\" | \" + b[r][c]);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\" |\");\n\t\t\tSystem.out.println(\" ---------------------------------------\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\" a b c d e f g h\");\n\t}",
"public static void main(String args[]) \n {\n int i, j, row=6;\n //OUTER LOOP FOR ROWS \n for(i=0; i<row; i++) \n { \n //INNER LOOP FOR COLUMN \n for(j=0; j<=i; j++) \n { \n //USING PRINT NOT PRINTLN BECAUSE WE WANT THE STARS ON THE SAME LINE \n System.out.print(\"* \"); \n } \n //CHANGES LINE OF THE STARS\n System.out.println(); \n } \n }",
"public String toString() {\n\t\tString temp = \"\";\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\ttemp += String.format(\"%d \", i);\n\t\t}\n\t\ttemp += \"\\n\";\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\ttemp += String.format(\"%d | \", i + 1);\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\ttemp += String.format(\"%c | \", board[i][j]);\n\t\t\t}\n\t\t\ttemp += \"\\n\";\n\t\t}\n\t\treturn temp;\n\t}",
"private void tagBracketPrinter(String tag, int printType, String... token) {\n String temp = Arrays.toString(token).substring(1, Arrays.toString(token).length() - 1);\n tabPrinter();\n if (printType == 0) {\n writer.println(\"<\" + tag + \">\");\n tabs++;\n } else if (printType == 1) {\n tabs--;\n writer.println(\"</\" + tag + \">\");\n } else if (printType == 2)\n\n writer.println(\"<\" + tag + \"> \" + temp + \" </\" + tag + \">\");\n\n }",
"public static void printTable(StringBuffer out, String[] header,\n\t\t\tList<?> rows, String left, String sep) {\n\t\tint[] colWidths = colWidths(header, rows);\n\n\t\tprintLine(out, colWidths, left, sep);\n\t\tprintHeader(out, header, colWidths, left, sep);\n\t\tprintLine(out, colWidths, left, sep);\n\n\t\tfor (Iterator<?> iter = rows.iterator(); iter.hasNext();) {\n\t\t\tList<?> row = (List<?>) iter.next();\n\t\t\tStringBuffer bf = new StringBuffer(120);\n\n\t\t\tbf.append(left);\n\n\t\t\tfor (int i = 0; i < row.size(); i++) {\n\t\t\t\tString s = (String) row.get(i);\n\n\t\t\t\tbf.append(s);\n\n\t\t\t\tfor (int j = 0; j < colWidths[i] - s.length(); j++)\n\t\t\t\t\tbf.append(' ');\n\n\t\t\t\tbf.append(sep);\n\t\t\t}\n\n\t\t\tout.append(bf + \"\\n\");\n\t\t}\n\n\t\tprintLine(out, colWidths, left, sep);\n\t}",
"public void prefix() {\n System.out.print(operator.getArithmeticOp() + \" \");\n left.prefix();\n right.prefix();\n System.out.println();\n }",
"@Override\r\n\t\tpublic String toString() {\n\t\t\treturn (this.n + \"\\t\" + this.t);\r\n\t\t}",
"private static void printMatrix(char[][] board) {\n\t\tint row = board.length;\n\t\tint col = board[0].length;\n\t\tfor(int i=0; i<row; i++){\n\t\t\t\n\t\t\tfor(int j=0; j<col; j++){\n\t\t\t\t\n\t\t\t\tSystem.out.print(\" \" + board[i][j]+\"\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t}",
"@Override\n public void println ()\n {\n if (text != null)\n {\n text.append (Out.NL);\n col = 0;\n }\n else\n super.println ();\n }",
"public void dump(String prefix) {\n System.out.print(toString(prefix));\n System.out.println(\" \"+name);\n }",
"@Override\n public void print() {\n for (int i = 1; i <= itertion; i++) {\n if(n <0){\n this.result = String.format(\"%-3d %-3s (%-3d) %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }else {\n this.result = String.format(\"%-3d %-3s %-3d %-3s %d \", i, \"*\", n, \"=\", (n * i));\n System.out.println(this.result);\n }\n }\n }",
"public static void pyramidUsingStart() {\n\t\t\t int rows = 5;\n\t\t\t for (int i = 1; i <=rows ; i++) {\n\t\t\t\tfor (int j = 1; j <= rows-i; j++) {\n\t\t\t\t\t//Printing Space\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}\n\t\t\t\tfor (int j = 1; j <= i ; j++) {\n\t\t\t\t\t/*Printing left start\n\t\t\t\t\t\n\t\t\t\t\t\t *\n\t\t\t\t\t\t **\n\t\t\t\t\t\t ***\n\t\t\t\t\t\t ****\n\t\t\t\t\t\t*****\n\t\t\t\t\t*/\n\t\t\t\t\tSystem.out.print(\"*\"+\"\");\n\t\t\t\t}\n\t\t\t\t//Rest of the right star\n\t\t\t\t/*\n\t\t\t\t\t*\n\t\t\t\t\t**\n\t\t\t\t\t***\n\t\t\t\t\t****\n\t\t\t\t*/\n\t\t\t\tfor (int j = 1; j <= i-1 ; j++) {\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t\t//for new lines\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}",
"public String toString()\n {\n return row0 + \"\\n\" + row1 + \"\\n\" + row2 + \"\\n\" + row3;\n }",
"public static void printBlankLine () {\n\t\t\n\t\t// First part before the +\n\t\tSystem.out.print(\"\\n\\u2012\\u2012\\u2012\\u2012\");\n\t\tSystem.out.print(\"+\");\n\t\t// Loops through and prints the rest\n\t\tfor (int i = 0; i < 89; i++) {\n\t\t\t\n\t\t\tSystem.out.print(\"\\u2012\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"@Override\n public String toString() {\n int numeritosY = 0;\n int numeritosX = 0;\n StringBuilder datos = new StringBuilder(\" \");\n\n //Imprime los numeros de arriba\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\" \").append(numeritosX);\n numeritosX++;\n }\n datos.append(\"\\n \");\n //Imprime la primera linea que corresponde con la parte superior del tablero.\n for (int x = 0; x < casillas.length; x++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n //Imprime el resto del tablero.\n for (int y = 0; y < casillas.length; y++) {\n datos.append(numeritosY).append(\"\\033[33m\"+\" | \"+\"\\033[0m\");\n for (int x = 0; x < casillas[y].length; x++) {\n datos.append(casillas[y][x].toString());\n }\n datos.append(\"\\n\");\n datos.append(\" \");\n for (int i = 0; i < casillas[y].length; i++) {\n datos.append(\"\\033[33m\"+\"+----\"+\"\\033[0m\");\n }\n datos.append(\"\\033[33m\"+\"+\"+\"\\033[0m\");\n datos.append(\"\\n\");\n numeritosY++;\n }\n return datos.toString();\n }",
"public void number_0() {\n\t\tfor(int row=1;row<=7;row++) { \n\t\t\tif(row==1||row==7) { \n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tfor(int col=1;col<=3;col++) { \n\t\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\telse if(row==7) { \n\t\t\t\tfor(int col=1;col<=3;col++) { \n\t\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfor(int col=1;col<=5;col++) { \n\t\t\t\t\tif(col==1||col==5) { \n\t\t\t\t\t\tSystem.out.print(\"*\"+\" \");\n\t\t\t\t\t}\n\t\t\t\t\telse { \n\t\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"static void printGrid (int[][] G){\n for(int i=1; i<G.length; i++){\n for (int j=1; j<G[i].length; j++){\n if (G[i][j]==0){\n System.out.print(\"- \");\n } else System.out.print(G[i][j]+\" \");\n if ( j==3) System.out.print(\" \");\n if ( j==6) System.out.print(\" \");\n if ( j==9) System.out.print(\"\\n\");\n }\n if ( i==3) System.out.print(\"\\n\");\n if ( i==6) System.out.print(\"\\n\");\n }\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tint cols=7;\r\n\t\t\r\n\t\tfor(int i=1; i<=13; i++) {\r\n\t\t\t\r\n\t\t\tfor(int j=1; j<=cols; j++) {\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.print(j+\" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t\t\r\n\t\t\tif(i<7) cols--;\r\n\t\t\telse cols++;\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tint n =7;\n\t\tint row=1;\n\t\tint nst=n/2;\n\t\tint nsp=1;\n\t\twhile(row<=n) {\n\t\t\t// star\n\t\t\tint cst =1;\n\t\t\twhile(cst<=nst) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\tcst++;\n\t\t\t}\n\t\t\t\n\t\t\t// space\n\t\t\tint csp=1;\n\t\t\twhile(csp<=nsp) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\tcsp++;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// star\n\t\t\tcst=1;\n\t\t\twhile(cst<=nst) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\tcst++;\n\t\t\t}\n\t\t\t\n\t\t\t// n = 7\n\t\t\t// next row \n\t\t\tif(row<=n/2) {\n\t\t\tnst--;\n\t\t\tnsp+=2;\n\t\t\t}\n\t\t\t// row == 4 nst =0\n\t\t\telse {\n\t\t\t\tnst++;\n\t\t\t\tnsp-=2;\n\t\t\t}\n\t\t\trow++;\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n for (int i = 0; i <= 1000; i++) {\n if (i % 5 == 0) {\n System.out.print(i + \"\\t\");\n }\n if (i % (5 * 3) == 0) {\n System.out.println();//换行\n }\n }\n }",
"public void print(Table t) {\n\t\t\tCursor current = t.rows();\n\t\t\twhile (current.advance()) {\n\t\t\t\tfor (Iterator columns = current.columns(); columns.hasNext();)\n\t\t\t\t\tSystem.out.print((String) columns.next() + \" \");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t}",
"private void printBoard(int[][] beard) {\n for (int i = 0; i < 9; i++) {\n System.out.println();\n if (i % 3 == 0 && i != 0) {\n System.out.println();\n }\n for (int j = 0; j < 9; j++) {\n if (j % 3 == 0 && j != 0) {\n System.out.print(\" \");\n }\n if (beard[i][j] == 0) {\n if (counter <= i) {\n System.out.print(\"?\");\n } else {\n System.out.print(\"_\");\n }\n }\n else {\n System.out.print(beard[i][j]);\n }\n System.out.print(\" \");\n }\n }\n System.out.println();\n }",
"public void printGrid() {\n // Creation of depth Z\n for (int d = 0; d < grid[0][0].length; d++) {\n System.out.println(\"\");\n int layer = d + 1;\n System.out.println(\"\");\n System.out.println(\"Grid layer: \" + layer);\n // Creation of height Y\n for (int h = 1; h < grid.length; h++) {\n System.out.println(\"\");\n // Creation of width X\n for (int w = 1; w < grid[0].length; w++) {\n if (grid[h][w][d] == null) {\n System.out.print(\" . \");\n } else {\n String gridContent = grid[h][w][d];\n char identifier = gridContent.charAt(0);\n\n int n = 0;\n if(grid[h][w][d].length() == 3) {\n n = grid[h][w][d].charAt(2) % 5;\n } else if (grid[h][w][d].length() == 2) {\n n = grid[h][w][d].charAt(1)%5;\n }\n if(n == 0) n = 6;\n\n // Labelling\n if (identifier == 'G' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'G') {\n System.out.print(\"\\033[47m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n } else if (identifier == 'L' && grid[h][w][d].length() == 3) {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n } else if (identifier == 'L') {\n System.out.print(\"\\033[3\"+ n + \"m\");\n System.out.print(grid[h][w][d]);\n System.out.print(\"\\033[0m\");\n System.out.print(\" \");\n }\n }\n }\n }\n }\n System.out.println(\"\");\n }",
"public void dump(String prefix) {\n\t\tSystem.out.println(prefix+\"Stats \"+hp+\",\"+mp+\",\"+age+\",\"+exp);\n\t}",
"private void printToken() {\n tabPrinter();\n\n if (jackTokenizer.tokenType().equals(JackTokenizer.SYMBOL_TOKEN_TYPE)) {\n\n tagBracketPrinter(currTokenType, FULL_TAG_BRACKET, replaceOpSymbol(currentToken.charAt(0)));\n } else if (jackTokenizer.tokenType().equals(JackTokenizer.STRING_CONST_TOKEN_TYPE)) {\n currentToken = currentToken.substring(1, currentToken.length() - 1);\n tagBracketPrinter(currTokenType, FULL_TAG_BRACKET, replaceOpSymbol(currentToken));\n } else {\n\n tagBracketPrinter(currTokenType, FULL_TAG_BRACKET, currentToken);\n }\n }",
"private static void printHeader(StringBuffer out, String[] header,\n\t\t\tint[] colWidths, String left, String sep) {\n\t\tStringBuffer bf = new StringBuffer(120);\n\n\t\t// Left mark\n\t\tbf.append(left);\n\n\t\tfor (int i = 0; i < header.length; i++) {\n\t\t\tString s = header[i];\n\t\t\tbf.append(s);\n\n\t\t\tfor (int j = 0; j < colWidths[i] - s.length(); j++)\n\t\t\t\tbf.append(' ');\n\n\t\t\tbf.append(sep);\n\t\t}\n\n\t\tout.append(bf + \"\\n\");\n\t}",
"private void printTable(String[][] table) {\n // Find out what the maximum number of columns is in any row\n int maxColumns = 0;\n for (String[] element : table) {\n maxColumns = Math.max(element.length, maxColumns);\n }\n\n // Find the maximum length of a string in each column\n int[] lengths = new int[maxColumns];\n for (String[] element : table) {\n for (int j = 0; j < element.length; j++) {\n lengths[j] = Math.max(element[j].length(), lengths[j]);\n }\n }\n\n // Generate a format string for each column\n String[] formats = new String[lengths.length];\n for (int i = 0; i < lengths.length; i++) {\n formats[i] = \"%1$\" + lengths[i] + \"s\"\n + ((i + 1) == lengths.length ? \"\\n\" : \" \");\n }\n\n // Print 'em out\n StringBuilder sb = new StringBuilder();\n for (String[] element : table) {\n for (int j = 0; j < element.length; j++) {\n sb.append(String.format(formats[j], element[j]));\n }\n }\n this.guiCore.getConsoleController().appendToDisplay(sb.toString());\n }",
"public void dump(){\n int address = 0;\n String lastline = new String(\"junk\");\n String nextline;\n boolean star = false, needNewline = false;\n for (int i = 0; i < memory.length; i+=8){\n nextline = buildLine(i);\n if (! lastline.equals(nextline)){\n star = false;\n if (needNewline) System.out.println(); \n System.out.print(Tools.pad(Integer.toHexString(address), 4, \"0\",\n Direction.RIGHT) + \":\\t\");\n System.out.print(nextline); \n needNewline = true;\n } \n\t\t\telse if (lastline.equals(nextline) && (star == false)){\n System.out.println(\" *\");\n needNewline = false;\n star = true;\n } \n address = address + 32;\n lastline = nextline;\n }\n System.out.println();\n }",
"private static void indent()\r\n {\r\n for (int i = 0; i < indentLevel * 2; i++) {\r\n System.out.print(' ');\r\n }\r\n }",
"private static void displayXCode() {\n if (dvm.getStartingLine() < 0){\n System.out.println(\"====\"+dvm.getCurrentFunction().toUpperCase()+\"====\");\n }else{\n for (int i = dvm.getStartingLine(); i <= dvm.getEndingLine(); i++) {\n if (dvm.isLineABreakPoint(i)){\n //NOTE: (char)249 is extended ascii for a little solid square.\n //I'm sorry if it comes out as something else on your machine\n //I do not know how (or if its possible) to check if the machine\n //that will run this program supports extended ascii. If it doesnt\n //It should just show up as an empty box, which is acceptable\n //For my purposes as well.\n System.out.print((char)249);\n }else\n System.out.print(\" \");\n\n if (i == dvm.getCurrentLine())\n System.out.println(String.format(\"%1$4s %2$s\", i + \")\", dvm.getLineOfSourceCode(i)+ \" <-----------\"));\n else\n System.out.println(String.format(\"%1$4s %2$s\", i + \")\", dvm.getLineOfSourceCode(i)));\n }\n }\n }",
"public void printMap()\r\n {\r\n\t\tint x = 0;\r\n for(Room[] row : rooms)\r\n {\r\n \tStringBuilder top = new StringBuilder(); // top row of room\r\n \tStringBuilder mid = new StringBuilder(); // mid row of room\r\n \tStringBuilder bot = null;\r\n \tif (x == row.length - 1) { // if the last row\r\n \t\tbot = new StringBuilder(); // bot row of room\r\n \t}\r\n \t\r\n for (Room room : row)\r\n {\r\n \tString roomStr = room.toString();\r\n top.append(roomStr.substring(0, 3)); // 0-3 top, 3-6, mid, 6-9 bot\r\n mid.append(roomStr.substring(3, 6)); \r\n if (x == row.length - 1) { //if the last row\r\n \tbot.append(roomStr.substring(6, 9)); //append the bot row\r\n }\r\n }\r\n // add new lines\r\n top.append('\\n');\r\n mid.append('\\n');\r\n \r\n System.out.print(top);\r\n System.out.print(mid);\r\n \r\n if (x == row.length - 1) {\r\n \tbot.append('\\n');\r\n \tSystem.out.print(bot);\r\n }\r\n x++;\r\n }\r\n }",
"public void printNode(){\r\n // make an appropriately lengthed array of formatting\r\n // to separate rows/space coordinates\r\n String[] separators = new String[puzzleSize + 2];\r\n separators[0] = \"\\n((\";\r\n for (int i=0; i<puzzleSize; i++)\r\n separators[i+1] = \") (\";\r\n separators[puzzleSize+1] = \"))\";\r\n // print the rows\r\n for (int i = 0; i<puzzleSize; i++){\r\n System.out.print(separators[i]);\r\n for (int j = 0; j<puzzleSize; j++){\r\n System.out.print(this.state[i][j]);\r\n if (j<puzzleSize-1)\r\n System.out.print(\" \");\r\n }\r\n }\r\n // print the space's coordinates\r\n int x = (int)this.space.getX();\r\n int y = (int)this.space.getY();\r\n System.out.print(separators[puzzleSize] + x + \" \" + y + separators[puzzleSize+1]);\r\n }",
"public static void main(String[] args) {\n\n int level = 50;\n for(int j=0; j<level; j++){\n for(int i=0; i<level-j; i++){\n System.out.print(\" \");\n }\n for(int k=0; k<=j; k++){\n System.out.print(\"* \");\n }\n System.out.println(\"\");\n }\n }",
"public static void main(String[] args) {\n\t\tint xTableNumber = 5;\n\t\t// Table size in y\n\t\tint yTableNumber = 10;\n\n\t\t// Line 1 of table (x line)\n\t\tSystem.out.print(\" * |\");\n\t\tfor (int i = 1; i <= xTableNumber; i++)\n\t\t\tSystem.out.print(addSpace(i) + \" \");\n\t\tSystem.out.println(\"\");\n\n\t\t// Line 2 of table\n\t\tSystem.out.print(\"---+\");\n\t\tfor (int j = 1; j <= xTableNumber; j++)\n\t\t\tSystem.out.print(\"----\");\n\t\tSystem.out.println(\"\");\n\n\t\t// Multiplication (+ y line)\n\t\tfor (int k = 1; k <= yTableNumber; k++) {\n\t\t\tSystem.out.print(addSpace(k) + \"|\");\n\t\t\tfor (int l = 1; l <= xTableNumber; l++) {\n\t\t\t\tSystem.out.print(addSpace(k * l) + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(tableName).append(System.lineSeparator());\n\n if (columnsDefinedOrder.size() <= 0) {\n columnsDefinedOrder = rows.stream()\n .findFirst()\n .map(x -> new ArrayList<>(x.keySet()))\n .orElse(columnsDefinedOrder);\n }\n\n Map<String, Integer> widthEachColumn = new HashMap<>();\n for (String columnName : columnsDefinedOrder) {\n widthEachColumn.put(columnName, 0);\n }\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n int length = row.get(columnName).length();\n if (length > widthEachColumn.get(columnName)) {\n widthEachColumn.put(columnName, length);\n }\n }\n }\n\n int tableWidth = 0;\n for (String columnName : columnsDefinedOrder) {\n int width = widthEachColumn.get(columnName) + 5;\n widthEachColumn.put(columnName, width);\n tableWidth += width;\n }\n\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", columnName));\n }\n sb.append(System.lineSeparator());\n\n for (int i = 0; i < tableWidth; i++) {\n sb.append(\"-\");\n }\n sb.append(System.lineSeparator());\n\n for (Map<String, String> row : rows) {\n for (String columnName : columnsDefinedOrder) {\n sb.append(String.format(\"%-\" + widthEachColumn.get(columnName) + \"s\", row.get(columnName)));\n }\n sb.append(System.lineSeparator());\n }\n\n return sb.toString();\n }",
"public void printBoard() {\n\t\tSystem.out.println();\n\t\tint i;\n\t\tfor (i = 0; i < 7; i++) {\n\t\t\tSystem.out.print(board[13 - i] + \" \");\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.printf(\" \");\n\t\twhile (i < 14) {\n\t\t\tSystem.out.print(board[i - 7] + \" \");\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public String print (final String tab)\n {\n return tab + toString ();\n }",
"public void printGrid(){\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(Grid[i][j]+\" \"); \n\t\t\tSystem.out.println(); \n\t\t}\n\t}"
] | [
"0.6770077",
"0.64384586",
"0.6403647",
"0.64005154",
"0.637772",
"0.6329299",
"0.6321224",
"0.6284474",
"0.6284054",
"0.6256321",
"0.62503964",
"0.62359273",
"0.6226732",
"0.61678195",
"0.61212456",
"0.60865986",
"0.6073277",
"0.60510606",
"0.6038571",
"0.6032579",
"0.6018746",
"0.599923",
"0.5997808",
"0.5974122",
"0.5942855",
"0.5928087",
"0.5921834",
"0.59215677",
"0.58982027",
"0.5896687",
"0.58878124",
"0.5879589",
"0.5875366",
"0.58662105",
"0.5856193",
"0.5846552",
"0.58340937",
"0.5832441",
"0.582931",
"0.58243155",
"0.58203703",
"0.5809043",
"0.5796729",
"0.5786201",
"0.5785667",
"0.5784534",
"0.57566035",
"0.5751562",
"0.5749165",
"0.57469666",
"0.57432026",
"0.5734625",
"0.57305926",
"0.57294387",
"0.5728455",
"0.57266665",
"0.5724411",
"0.57219404",
"0.57175124",
"0.5708315",
"0.5702956",
"0.5701659",
"0.568996",
"0.5665607",
"0.56615233",
"0.5652213",
"0.56517273",
"0.564968",
"0.5629347",
"0.56267107",
"0.5626312",
"0.56190145",
"0.56176263",
"0.5614427",
"0.5600034",
"0.55902326",
"0.558774",
"0.55835325",
"0.5583459",
"0.5583246",
"0.5579686",
"0.5570724",
"0.5568863",
"0.55608356",
"0.55582076",
"0.555369",
"0.5547196",
"0.5546255",
"0.5545833",
"0.55404246",
"0.5538223",
"0.55307746",
"0.55289006",
"0.5521145",
"0.55161726",
"0.551208",
"0.5511062",
"0.5507819",
"0.5505444",
"0.55044806",
"0.5497198"
] | 0.0 | -1 |
Read input as zipped file and return each entry found. | public static void unzip(InputStream inputStream, UnzipCallback unzipListener) throws IOException {
ZipInputStream zis = new ZipInputStream(inputStream);
for(ZipEntry zipEntry = zis.getNextEntry(); zipEntry != null; zipEntry = zis.getNextEntry()) {
unzipListener.newZipEntry(zipEntry, zis);
zis.closeEntry();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 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 static void main(String[] args) throws Exception {\r\n ZipDatabase zipDB = new ZipDatabase();\r\n\r\n BufferedReader br = \r\n new BufferedReader(new InputStreamReader(System.in));\r\n while (true) {\r\n System.out.print(\"Enter zip: \");\r\n String zip = br.readLine();\r\n System.out.println(\"Input: \" + zip);\r\n\r\n ZipInfo info = zipDB.lookup(zip);\r\n System.out.println(\"Output: \" + info);\r\n }\r\n }",
"private ZipEntry processEntry( ZipFile zip, ZipEntry inputEntry ) throws IOException{\n /*\n First, some notes.\n On MRJ 2.2.2, getting the size, compressed size, and CRC32 from the\n ZipInputStream does not work for compressed (deflated) files. Those calls return -1.\n For uncompressed (stored) files, those calls do work.\n However, using ZipFile.getEntries() works for both compressed and \n uncompressed files.\n \n Now, from some simple testing I did, it seems that the value of CRC-32 is\n independent of the compression setting. So, it should be easy to pass this \n information on to the output entry.\n */\n String name = inputEntry .getName();\n if ( ! (inputEntry .isDirectory() || name .endsWith( \".class\" )) ) {\n try {\n InputStream input = zip.getInputStream( zip .getEntry( name ) );\n String className = ClassNameReader .getClassName( input );\n input .close();\n if ( className != null ) {\n name = className .replace( '.', '/' ) + \".class\";\n }\n } catch( IOException ioe ) {}\n }\n ZipEntry outputEntry = new ZipEntry( name );\n outputEntry.setTime(inputEntry .getTime() );\n outputEntry.setExtra(inputEntry.getExtra());\n outputEntry.setComment(inputEntry.getComment());\n outputEntry.setTime(inputEntry.getTime());\n if (compression){\n outputEntry.setMethod(ZipEntry.DEFLATED);\n //Note, don't need to specify size or crc for compressed files.\n } else {\n outputEntry.setMethod(ZipEntry.STORED);\n outputEntry.setCrc(inputEntry.getCrc());\n outputEntry.setSize(inputEntry.getSize());\n }\n return outputEntry;\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 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 static List<String> getZipEntries( final Path zipFile, final Configuration conf) throws IOException\r\n\t{\r\n\t\tif (zipFile==null) {\r\n\t\t\treturn Collections.<String>emptyList();\r\n\t\t}\r\n\t\tFSDataInputStream in = null;\r\n\t\tArrayList<String> entries = new ArrayList<String>();\r\n\t\ttry {\r\n\t\t\tin = zipFile.getFileSystem(conf).open(zipFile);\r\n\t\t\tZipInputStream zin = new ZipInputStream(in);\r\n\t\t\tZipEntry nextEntry;\r\n\t\t\twhile ((nextEntry = zin.getNextEntry())!=null) {\r\n\t\t\t\tentries.add(nextEntry.getName());\r\n\t\t\t}\r\n\t\t\treturn entries;\t\r\n\t\t} finally {\r\n\t\t\tif (in!=null) {\r\n\t\t\t\tin.close();\r\n\t\t\t}\r\n\t\t}\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 static ZipEntries from(byte[] zip, Predicate<String> entryNameMatcher, int maxEntrySizeInBytes, boolean throwIfEntryExceedsMaxSize) {\n\n Options options = Options.standard()\n .pathPredicate(entryNameMatcher)\n .maxSize(2 * (long) Math.pow(1024, 3)) // 2 GB\n .maxEntrySize(maxEntrySizeInBytes)\n .maxEntries(1024)\n .truncateEntry(!throwIfEntryExceedsMaxSize);\n List<ZipEntryWithContent> entries = new ArrayList<>();\n try (ArchiveStreamReader reader = ArchiveStreamReader.ofZip(new ByteArrayInputStream(zip), options)) {\n ArchiveFile file;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n while ((file = reader.readNextTo(baos)) != null) {\n entries.add(new ZipEntryWithContent(file.path().toString(),\n Optional.of(baos.toByteArray()).filter(b -> b.length > 0),\n file.size()));\n baos.reset();\n }\n }\n return new ZipEntries(entries);\n }",
"private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception {\n readZipFile(FILE_NAME);\n }",
"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 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 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 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 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 }",
"private Map<String, SiteData> extractDataFromZip(InputStream attachmentInputStream) {\n\n Map<String, SiteData> sitesData = new HashMap<String, SiteData>();\n\n final NonCloseableZipInputStream zis = new NonCloseableZipInputStream(attachmentInputStream);\n\n try {\n ZipEntry entry;\n while ((entry = zis.getNextEntry()) != null) {\n // Skip directories\n if (entry.isDirectory()) {\n continue;\n }\n String filePath = entry.getName();\n // Skip empty entries (this allows empty zip files to not cause\n // exceptions).\n if (filePath.equals(\"\") || !filePath.startsWith(SiteConstants.SITE_CONTENTS_ROOT_PATH + \"/\")) {\n continue;\n }\n\n String siteName = extractSiteNameFromPath(filePath);\n\n // if we are in a site (for example /content/sites/acme), take only\n // the files relative to this site\n if (importedSiteName != null && !importedSiteName.equals(siteName)) {\n continue;\n }\n\n // metadata file ?\n if (filePath.endsWith(SiteMetaDataExportTask.FILENAME)) {\n // Unmarshall metadata xml file\n XStream xstream = new XStream();\n xstream.alias(\"metadata\", SiteMetaData.class);\n InputStreamReader isr = new InputStreamReader(zis, \"UTF-8\");\n SiteMetaData siteMetadata = (SiteMetaData) xstream.fromXML(isr);\n\n // Save unmarshalled metadata\n SiteData siteData = sitesData.get(siteName);\n if (siteData == null) {\n siteData = new SiteData();\n }\n siteData.setSiteMetadata(siteMetadata);\n sitesData.put(siteName, siteData);\n }\n // seo file ?\n else if (filePath.endsWith(SiteSEOExportTask.FILENAME)) {\n XStream xStream = new XStream();\n xStream.alias(\"seo\", List.class);\n InputStreamReader isr = new InputStreamReader(zis, \"UTF-8\");\n\n @SuppressWarnings(\"unchecked\")\n List<PageMetadataModel> models = (List<PageMetadataModel>) xStream.fromXML(isr);\n if (models != null && !models.isEmpty()) {\n for (PageMetadataModel pageMetadataModel : models) {\n seoService.storePageMetadata(pageMetadataModel, siteName, false);\n }\n }\n }\n // sysview file ?\n else {\n // Unmarshall sysview xml file to String\n log.info(\"Collecting the node \" + filePath);\n String nodeContent = IOUtils.toString(zis, \"UTF-8\");\n\n // Save unmarshalled sysview\n SiteData siteData = sitesData.get(siteName);\n if (siteData == null) {\n siteData = new SiteData();\n }\n Map<String, String> siteNodes = siteData.getNodeExportFiles();\n if (siteNodes == null) {\n siteNodes = new HashMap<String, String>();\n }\n siteNodes.put(filePath, nodeContent);\n siteData.setNodeExportFiles(siteNodes);\n sitesData.put(siteName, siteData);\n }\n }\n\n zis.reallyClose();\n } catch (Exception e) {\n throw new OperationException(this.operationName, \"Exception when reading the underlying data stream from import.\", e);\n }\n\n return sitesData;\n\n }",
"public void extract(List<? extends SuSiFile.Entry> in);",
"private byte[][] getZipFileEntries(byte[] imageData) throws ImageException {\r\n\tif ((imageData == null) || (imageData.length == 0)) {\r\n\t\tthrow new IllegalArgumentException(\"imageData length = 0\");\r\n\t}\r\n\ttry {\r\n\t\tVector<String> keyVector = new Vector<String>();\r\n\t\tHashtable<String, byte[]> hash = new Hashtable<String, byte[]>();\r\n\t\tZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(imageData));\r\n\t\tZipEntry ze = null;\r\n\t\twhile ((ze = zis.getNextEntry()) != null) {\r\n\t\t\t//log(\"Zip entry Name =\" + ze.getName() + \" Size =\" + ze.getSize());\r\n\t\t\tif (ze.isDirectory() == false) {\r\n\t\t\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n\t\t\t\tint count;\r\n\t\t\t\tbyte b[] = new byte[65536];\r\n\t\t\t\twhile ((count = zis.read(b, 0, b.length)) != -1) {\r\n\t\t\t\t\tbos.write(b, 0, count);\r\n\t\t\t\t}\r\n\t\t\t\t//log(\"Zip entry Name =\" + ze.getName() + \" MSiz =\" + ze.getSize());\r\n\t\t\t\tkeyVector.addElement(ze.getName());\r\n\t\t\t\thash.put(ze.getName(), bos.toByteArray());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (hash.size() > 0) {\r\n\t\t\t//\r\n\t\t\t// do a bubble sort of the keys to sort the entries\r\n\t\t\t//\r\n\t\t\tfor (int i=0;i<keyVector.size();i++){\r\n\t\t\t\tfor (int j=i+1;j<keyVector.size();j++){\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// if string[i] > string[j] then swap\r\n\t\t\t\t\t//\r\n\t\t\t\t\tString element_i = keyVector.elementAt(i);\r\n\t\t\t\t\tString element_j = keyVector.elementAt(j);\r\n\t\t\t\t\tif (element_i.compareTo(element_j) > 0){\r\n\t\t\t\t\t\tkeyVector.setElementAt(element_j,i);\r\n\t\t\t\t\t\tkeyVector.setElementAt(element_i,j);\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// now that keyVector is sorted, use it to populate the data array\r\n\t\t\t//\r\n\t\t\tbyte entries[][] = new byte[keyVector.size()][];\r\n\t\t\t\r\n\t\t\tfor (int i=0;i<keyVector.size();i++){\r\n\t\t\t\tentries[i] = hash.get(keyVector.elementAt(i));\r\n\t\t\t}\r\n\r\n\t\t\treturn entries;\r\n\t\t}else{\r\n\t\t\treturn null; // not a zip file\r\n\t\t}\r\n\t} catch (ZipException zex) {\r\n\t\tthrow new ImageException(\"Zip file corrupt \" + zex.getMessage());\r\n\t} catch (Exception e) {\r\n\t\tthrow new ImageException(\"Error Reading Zip Data \" + e.getMessage());\r\n\t}\r\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 void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n final int BUFFER_SIZE = (int) 1e8;\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 }",
"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 StringZipInputStream(InputStream out) {\n\t\tin = new BufferedInputStream(out);\n\t\treadingMap = new String[4096];\n\t\tfor (int charater = 0; charater < 256; charater++)\n\t\t\treadingMap[readingkeysCount++] = \"\" + (char) charater;\n\t\t// readingkeysCount = 256;\n\n\t}",
"public Map<String, Image> loadImages(ZipInputStream in) throws IOException {\n Map<String, Image> images = new HashMap<>();\n ZipEntry entry = in.getNextEntry();\n while (entry != null) {\n String name = entry.getName();\n Image image = imageFactory.makeImage(name, in);\n if (image != null) {\n images.put(name, image);\n }\n entry = in.getNextEntry();\n }\n return images;\n }",
"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}",
"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 extractZipArchive(byte[] zipFileData, String directory) throws IOException {\n new File(directory).mkdirs();\n // get the zip file content\n ZipInputStream inputStream = new ZipInputStream(new ByteArrayInputStream(zipFileData));\n // get the zipped file list entry\n ZipEntry zipEntry = inputStream.getNextEntry();\n byte[] buffer = new byte[BUFFER_SIZE];\n while (zipEntry != null) {\n if (!zipEntry.isDirectory()) {\n String fileName = zipEntry.getName();\n File newFile = new File(directory + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n\n FileOutputStream fos = new FileOutputStream(newFile);\n\n int len;\n while ((len = inputStream.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n\n fos.close();\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"File unzipped: \" + newFile.getAbsoluteFile());\n }\n }\n zipEntry = inputStream.getNextEntry();\n }\n inputStream.closeEntry();\n inputStream.close();\n }",
"public void readEntries() throws FileAccessException;",
"public byte[] readFile(RAFFileEntry fileEntry) throws IOException {\n\t\tarchiveFile.setPosition(fileEntry.getDataOffset());\n\t\tif (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException(\"File too big.\");\n\t\tbyte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());\n\t\treturn data;\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 }",
"Map<String, InputStream> extract(TypedValue<InputStream> archive) throws DecompressionException;",
"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 Stack<Entry> readNodeEntries() {\n FileLocation thisNode = null;\n Stack<Entry> nodeEntries = new Stack<Entry>();\n try {\n int port = FileApp.getMyPort();\n thisNode = new FileLocation(port);\n } catch (UnknownHostException ex) {\n System.err.println(\"Mapper.read node entries uknown host exception\");\n }\n Stack<Integer> nodeHashes = FileApp.getHashes();\n while (!nodeHashes.empty()) {\n nodeEntries.push(new Entry(nodeHashes.pop(), thisNode));\n }//while (!nodeHashes.empty()\n printAct(\">scanned my node's files\");\n return nodeEntries;\n }",
"public String[] read()\n {\n ArrayList<String> input = new ArrayList<String>();\n try\n {\n dir = new File(contextRef.getFilesDir(), filename);\n if (dir.exists())\n {\n Scanner contacts = new Scanner(dir);\n while (contacts.hasNextLine())\n {\n input.add(contacts.nextLine());\n }\n contacts.close();\n }\n }catch (Exception ex)\n {\n //debug(\"read file contents failure\");\n debug = \"test read failure\";\n }\n return input.toArray(new String[1]);\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 }",
"public InputStream getInputStream() throws IOException {\r\n if (!connected)\r\n connect();\r\n\r\n return zipFile.getInputStream(zipEntry);\r\n }",
"public ZipEntry decompress(File compressedFile, File outputDirectory) throws IOException {\n\t\tObjects.requireNonNull(compressedFile);\n\t\tObjects.requireNonNull(outputDirectory);\n\t\tZipEntry ret = null;\n\t\tif (!outputDirectory.exists()) {\n\t\t\toutputDirectory.mkdirs();\n\t\t}\n\t\tZipInputStream input = new ZipInputStream(new FileInputStream(compressedFile));\n\t\tfor (ZipEntry entry = input.getNextEntry(); Objects.nonNull(entry); entry = input.getNextEntry()) {\n\t\t\tif (Objects.isNull(ret)) {\n\t\t\t\tret = entry;\n\t\t\t}\n\n\t\t\tString fileName = entry.getName();\n\t\t\tFile newFile = new File(outputDirectory + File.separator + fileName);\n\n\t\t\t(new File(newFile.getParent())).mkdirs();\n\n\t\t\tif (entry.isDirectory()) {\n\t\t\t\tnewFile.mkdirs();\n\t\t\t} else {\n\t\t\t\tstoreFile(input, newFile);\n\t\t\t}\n\n\t\t}\n\t\tinput.closeEntry();\n\t\tinput.close();\n\t\treturn ret;\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 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 }",
"public static void main(String [] args){\n\t\t String zipFilePath = args[1];\n\t\t //Directory of unzip Files\n\t\t String destDir = \"Dictionary\";\n\t\t //Calling a functions 5to unzip the directory\n\t\t unzip(zipFilePath, destDir);\n\t\t \n\n\t\t// The name of the file to open. File to be passed from arguments\n String fileName = args[0];\t\t\n\n // This will reference one line at a time\n String line = null;\n\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = \n new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = \n new BufferedReader(fileReader);\n\t\t\t\tint count = 0;\t\t\t\t\t\t//For counting how many words are wrong\n while((line = bufferedReader.readLine()) != null) {\n String[] words = line.split(\"\\\\W\");\t\t\t\t//Keeps the words in a line the the array \n int len = words.length;\n for(int i=0;i<len;i++){\n \t//System.out.println(words[i]);\n \tint flag = 0; \t\t\t\t//Just to check whether the words present or not\n \t//System.out.println(\"HI I am reading the file.\");\n \tFile folder = new File(\"Dictionary/dictionaries\");\n\t\t\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\t\t//System.out.println(listOfFiles.length);\n\t\t\t\t\tfor (int i1 = 0; i1 < listOfFiles.length; i1++) {\n\t\t\t\t\t\tif(flag == 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t File file = listOfFiles[i1];\n\t\t\t\t\t if (file.isFile()) {\n\t\t\t\t\t\t//I am checking\n\t\t\t\t\t\t // The name of the file to open.\n //String fileName1 = file;\n\n // This will reference one line at a time\n //String line1 = null;\n\t\t\tScanner myScanner = null;\t\t\t\t//Using Scanner Class to Read the words From file\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmyScanner = new Scanner(file);\n\t\t\t\t\twhile(myScanner.hasNextLine()){\n \t\t\t\t\tif(flag==1){\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tString contents=myScanner.nextLine();\n \t\t\t\t\t//...\n\t\t\t\t\t\tif(words[i].equalsIgnoreCase(contents)){\n\t\t\t\t\t\t//System.out.println(\"The given word is \" + words[i]);\n\t\t\t\t\t\tflag = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//String contents = myScanner.nextLine();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif(myScanner != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmyScanner.close(); \n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t\t } \n\t\t\t\t\t}\n\t\t\t\t\tif(flag==0){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tSystem.out.println(\"The wrong word is \" + words[i]);\n\t\t\t\t\t\t//System.out.println(i+1);\n\t\t\t\t\t}\n }\n //System.out.println(line);\n } \n\n // Always close files.\n bufferedReader.close(); \n System.out.println(\"The total number of wrong words are \");\n System.out.println(count);\n \n }\n catch(FileNotFoundException ex) {\n System.out.println(\n \"Unable to open file '\" + \n fileName + \"'\"); \n }\n catch(IOException ex) {\n System.out.println(\n \"Error reading file '\" \n + fileName + \"'\"); \n // Or we could just do this: \n // ex.printStackTrace();\n }\n \t}",
"private void loadZipFile(String zipFileName, String classIndex)\n {\n InputStream trainSource = null, testSource = null;\n //The instance file is a zipped file containing a file called 'train' and one called 'test'\n try {\n ZipFile zipFile = new ZipFile(zipFileName);\n Enumeration entries = zipFile.entries();\n while(entries.hasMoreElements()) {\n ZipEntry entry = (ZipEntry)entries.nextElement();\n\n String name = entry.getName();\n if (name.equals(\"train.arff\"))\n {\n trainSource = zipFile.getInputStream(entry);\n }\n else if(name.equals(\"test.arff\"))\n {\n testSource = zipFile.getInputStream(entry);\n }\n else\n {\n //What is this?\n throw new RuntimeException(\"Unknown file in zip dataset '\" + name + \"'\");\n }\n }\n } catch (java.io.IOException e) {\n throw new RuntimeException(\"IO Operation failed\", e);\n }\n\n //Get the training data\n try {\n mTraining = Util.loadDataSource(trainSource);\n if (mTraining.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTraining.setClassIndex(mTraining.numAttributes() - 1);\n else\n mTraining.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load training data provided in zip\", e);\n }\n\n //Get the testing data\n try {\n mTesting = Util.loadDataSource(testSource);\n if (mTesting.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTesting.setClassIndex(mTesting.numAttributes() - 1);\n else\n mTesting.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load testing data provided in zip\", e);\n }\n\n }",
"private static void indexFromJarFile(InputStream in) throws IOException {\n\n\t\tZipInputStream zis = new ZipInputStream(in);\n\t\tZipEntry e;\n\n\t\twhile((e = zis.getNextEntry()) != null) {\n\n\t\t\tString name = e.getName();\n\t\t\tzis.closeEntry();\n\n\t\t\tif(name.contains(relationRepositoryPath) && name.endsWith(classExtension)) {\n\n\t\t\t\taddToIndex(name.replace(jarFileRelationRepositoryPath, \"\"));\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t}",
"private int extractZipFile(String fileName) throws FileNotFoundException, BadElementStructureException {\n // Download and extracts zip file\n int nbElement = 0;\n try {\n //Extracting ZIP file\n UnzipUtils.extractZipFile(fileName);\n //Parsing the file using Bio parser\n nbElement = parseOWL(UnzipUtils.getDataFile());\n } catch (FileNotFoundException ex) {\n throw ex;\n } catch (BadElementStructureException ex1) {\n throw ex1;\n } finally {\n UnzipUtils.deleteDataFile();\n }\n return nbElement;\n }",
"private ArrayList<String> readEntriesFromFile(String nameOfFile){\n\t\tArrayList<String> foundEntries = new ArrayList<String>();\n\t\t\n\t\ttry{\n\t\t\tFile file = new File(nameOfFile); \n\t\t\tScanner fileIn = new Scanner(file);\n\t\t\twhile (fileIn.hasNext()){\n\t\t\t\tString currentLine = fileIn.nextLine();\n\t\t\t\tfoundEntries.add(currentLine);\n\t\t\t} \n\t\t\tfileIn.close();\n\t\t}catch (IOException e){\n\t\t}\n\t\t\n\t\tif(foundEntries.size()==0){\n\t\t return null;\n\t\t}else{\n\t\t\treturn foundEntries;\n\t\t}\n\t}",
"public final ZipEntry getEntry()\n\t{\n\t\treturn entry_;\n\t}",
"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 }",
"List<CompressResult> decompress(Path input, Path output) throws IOException;",
"@Override\n\tpublic List<Theater> getTheaterbyZip(String zip) {\n\t\tList<Address> searchResult = searchAddressByZip(zip);\n\t\tList<Theater> theaterList = new ArrayList<Theater>();\n\t\t\n\t\tfor(Address element : searchResult) {\n\t\t\ttheaterList.add( ((TheaterAddressImpl) element).getTheater());\n\t\t}\n\t\t\n\t\treturn theaterList;\n\t}",
"private static void populateZipcodeList() {\n\t\t// only load the data once...\n\t\tif (ZipCodes.zipCodesList.size() > 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> headers = null;\n\t\tList<String> values = null;\n\t\tString line = null;\n\t\t\n\t\t// create handle the source data file\n\t\tInputStream stream = ZipCodes.class.getResourceAsStream(\"zipCodes.csv\");\n\t\tBufferedReader buffer = new BufferedReader(new InputStreamReader(stream));\n\n try {\n\t\t\t// pull header row\n \theaders = Arrays.asList(buffer.readLine().split(\",\"));\n \t\n \t// add data rows\n \twhile((line = buffer.readLine()) != null) {\n \t\n \t\tHashMap<String, String> zip = new HashMap<String, String>();\n \t\tvalues = Arrays.asList(line.split(\",\"));\n \t\tfor (int i = 0; i < headers.size(); i++) {\n \t\t\tzip.put(headers.get(i), values.get(i));\n \t\t}\n \t\tZipCodes.zipCodesList.add(zip);\n\t\t\t}\n\t\t\tstream.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}",
"public static String readTextFromZip(ZipInputStream zis) throws IOException {\n \t\tByteArrayOutputStream out = readZipEntry(zis);\n \t\tString data = out.toString();\n \t\tout.close();\n \t\treturn data;\n \t}",
"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 byte[] getUnzippedFile() throws IOException {\r\n byte[] result = null;\r\n\r\n byte[] zipped = super.getFile();\r\n ByteArrayInputStream bais = new ByteArrayInputStream(zipped);\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n BufferedInputStream bis = new BufferedInputStream(new GZIPInputStream(bais));\r\n BufferedOutputStream bos = new BufferedOutputStream(baos);\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 result = baos.toByteArray();\r\n bos.close();\r\n bis.close();\r\n bais.close();\r\n baos.close();\r\n\r\n return result;\r\n }",
"public void newZipEntry(ZipEntry zipEntry, InputStream inputStream);",
"public interface ExtractorStrategy {\n\n /**\n * Extracts all the entries of an compressed archive and returns a map with the name of the entry as key and\n * the proper data content of the entry as value.\n */\n Map<String, InputStream> extract(TypedValue<InputStream> archive) throws DecompressionException;\n}",
"public static void unzip(File zipFile, File destDir) throws IOException {\n BufferedOutputStream dest = null;\n FileInputStream fis = new FileInputStream(zipFile);\n ZipInputStream zis = new ZipInputStream(new BufferedInputStream(fis));\n ZipEntry entry;\n while ((entry = zis.getNextEntry()) != null) {\n if (log.isDebugEnabled()) {\n log.debug(\"Extracting: \" + entry);\n }\n int count;\n byte[] data = new byte[BUFFER_SIZE];\n FileOutputStream fos = new FileOutputStream(destDir.getAbsolutePath() + \"/\" + entry.getName());\n dest = new BufferedOutputStream(fos, BUFFER_SIZE);\n while ((count = zis.read(data, 0, BUFFER_SIZE)) != -1) {\n dest.write(data, 0, count);\n }\n dest.flush();\n dest.close();\n }\n zis.close();\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}",
"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}",
"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 StreamSource getZipSource(final File requestedDirectory) {\n StreamSource zippedDirSource = new StreamSource() {\n private static final long serialVersionUID = 7060525220398731933L;\n public InputStream getStream() {\n // Pipe bauen, um Steam als Download umzulenken\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 }\n };\n return zippedDirSource;\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 }",
"protected InputStream loadFile(String zipPath) throws Exception {\n\t\treturn Files.newInputStream(Paths.get(zipPath));\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 static List<File> unjar(InputStream in, File dest)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tfinal List<File> back = new ArrayList<File>();\r\n\t\tif (!dest.exists()) {\r\n\t\t\tdest.mkdirs();\r\n\t\t}\r\n\r\n\t\tif (!dest.isDirectory()) {\r\n\t\t\tthrow new IOException(\"Destination must be a directory.\");\r\n\t\t}\r\n\r\n\t\tJarInputStream jin = new JarInputStream(in);\r\n\t\tfinal byte[] buffer = new byte[1024];\r\n\t\tZipEntry entry = jin.getNextEntry();\r\n\t\twhile (entry != null) {\r\n\r\n\t\t\tString fileName = entry.getName();\r\n\t\t\tif (fileName.charAt(fileName.length() - 1) == '/') {\r\n\t\t\t\tfileName = fileName.substring(0, fileName.length() - 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (fileName.charAt(0) == '/') {\r\n\t\t\t\tfileName = fileName.substring(1);\r\n\t\t\t}\r\n\r\n\t\t\tif (File.separatorChar != '/') {\r\n\t\t\t\tfileName = fileName.replace('/', File.separatorChar);\r\n\t\t\t}\r\n\r\n\t\t\tfinal File file = new File(dest, fileName);\r\n\t\t\tif (entry.isDirectory()) {\r\n\t\t\t\t// make sure the directory exists\r\n\t\t\t\tfile.mkdirs();\r\n\t\t\t\tjin.closeEntry();\r\n\t\t\t} else {\r\n\t\t\t\t// make sure the directory exists\r\n\t\t\t\tfinal File parent = file.getParentFile();\r\n\t\t\t\tif (parent != null && !parent.exists()) {\r\n\t\t\t\t\tparent.mkdirs();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// dump the file\r\n\r\n\t\t\t\tfinal OutputStream out = new FileOutputStream(file);\r\n\t\t\t\tint len = 0;\r\n\t\t\t\twhile ((len = jin.read(buffer, 0, buffer.length)) != -1) {\r\n\t\t\t\t\tout.write(buffer, 0, len);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tout.flush();\r\n\t\t\t\tout.close();\r\n\t\t\t\tjin.closeEntry();\r\n\t\t\t\tback.add(file);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tentry = jin.getNextEntry();\r\n\t\t}\r\n\t\tjin.close();\r\n\t\treturn back;\r\n\t}",
"private void readFileList() throws IOException {\n\t\tint entries = metadataFile.readInt();\n\n\t\tfor (int i = 0; i < entries; i++) {\n\t\t\tint hash = metadataFile.readInt();\n\t\t\tlong dataOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tlong dataSize = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathListIndex = metadataFile.readInt();\n\n\t\t\tlong position = metadataFile.getPosition();\n\t\t\tmetadataFile.setPosition(pathListOffset + 8 + (pathListIndex * 8));\n\n\t\t\tlong pathOffset = metadataFile.readInt() & 0xFFFFFFFFL;\n\t\t\tint pathSize = metadataFile.readInt();\n\n\t\t\tmetadataFile.setPosition(pathListOffset + pathOffset);\n\t\t\tString path = metadataFile.readString(pathSize).trim();\n\n\t\t\tif (hash == hash(path)) \n\t\t\t\tfileEntries.add(new RAFFileEntry(dataOffset, dataSize, path));\n\t\t\telse\n\t\t\t\tthrow new IOException(\"Invalid hash for item '\" + path + \"'.\");\n\n\t\t\tmetadataFile.setPosition(position);\n\t\t}\n\t}",
"public Map<String, String> importFilesInSite(String zipReference,\r\n\t String siteId) {\r\n\tMap<File, String> fileMap = (Map<File, String>) getImportedFiles();\r\n\tMap<String, String> fileNameChangesMap = new HashMap<String, String>();\r\n\t// Vars used to retrieve metadata\r\n\tContentHandler handler = null;\r\n\tMetadata metadata = null;\r\n\tParser parser = null;\r\n\tString resourceOutputDir = null;\r\n\ttry {\r\n\t resourceOutputDir = contentHostingService.getSiteCollection(siteId);\r\n\t} catch (Exception e1) {\r\n\t log.error(e1.getMessage());\r\n\t e1.printStackTrace();\r\n\t}\r\n\r\n\tfor (Entry<File, String> entry : fileMap.entrySet()) {\r\n\t File file = entry.getKey();\r\n\t try {\r\n\t\tString fileNameToUse = fileMap.get(file);\r\n\t\tInputStream inputStream = new FileInputStream(file);\r\n\r\n\t\t// Retrieve file extension\r\n\t\tint lastIndexOfPoint = fileNameToUse.lastIndexOf(\".\");\r\n\t\tString fileExtension =\r\n\t\t\tfileNameToUse.substring(lastIndexOfPoint + 1,\r\n\t\t\t\tfileNameToUse.length());\r\n\r\n\t\t// Necessary inits to retreive content type\r\n\t\thandler = new BodyContentHandler();\r\n\t\tmetadata = new Metadata();\r\n\t\tmetadata.set(Metadata.RESOURCE_NAME_KEY, file.getName());\r\n\t\tparser = new AutoDetectParser();\r\n\t\tparser.parse(inputStream, handler, metadata, new ParseContext());\r\n\r\n\t\t// We need to close the inputstream and rebuild it after the\r\n\t\t// parsing here,\r\n\t\t// otherwise the inputstream in unusable\r\n\t\tinputStream.close();\r\n\t\tinputStream = new FileInputStream(file);\r\n\r\n\t\tif (CITATION_EXTENSION.equals(fileExtension)) {\r\n\t\t // read input stream of file to get properties of citation\r\n\t\t fileNameChangesMap.putAll(addCitations(file, siteId,\r\n\t\t\t resourceOutputDir));\r\n\t\t} else {\r\n\t\t String s =\r\n\t\t\t addRessource(fileNameToUse, inputStream,\r\n\t\t\t\t metadata.get(Metadata.CONTENT_TYPE),\r\n\t\t\t\t siteId, resourceOutputDir);\r\n\t\t if (!fileNameToUse.equals(s))\r\n\t\t\tfileNameChangesMap.put(fileNameToUse, s);\r\n\t\t}\r\n\t\tinputStream.close();\r\n\t } catch (Exception e) {\r\n\t\tlog.error(e);\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}\r\n\treturn fileNameChangesMap;\r\n }",
"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 }",
"static void unzip(String zipFilePath, String destDirectory, boolean recursive, boolean teacherZip) throws IOException {\n\n if (students == null) {\n students = new ArrayList<Student>();\n }\n\n ZipInputStream zipIn = null;\n\n try {\n zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n\n // iterates over entries in the zip file\n while (entry != null) {\n createFiles(destDirectory, zipIn, entry, recursive);\n\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n\n } catch (IOException e) {\n System.err.println(e.getMessage());\n Errors.setUnzipperError(true);\n\n } finally {\n if (zipIn != null) {\n zipIn.close();\n }\n }\n }",
"public ASCTerrain(String zfile) {\n int count;\n try {\n ZipInputStream zis = new ZipInputStream(ASCTerrain.class.getResourceAsStream(\"/assets/\" + zfile));\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"Opening file: \" + ze.getName());\n byte[] asc = new byte[(int) ze.getSize()];\n count = 0;\n // Read the entire data for the file.\n while (count < ze.getSize()) {\n count += zis.read(asc, count, (int) (ze.getSize() - count));\n }\n process(readFile(asc));\n zis.closeEntry();\n zis.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static ToscaServiceTemplate decodeFile(String zipEntryName, InputStream entryData) throws CoderException {\n ToscaServiceTemplate toscaServiceTemplate = null;\n if (zipEntryName.endsWith(\".json\")) {\n toscaServiceTemplate = coder.decode(entryData, ToscaServiceTemplate.class);\n } else if (zipEntryName.endsWith(\".yml\")) {\n toscaServiceTemplate = yamlCoder.decode(entryData, ToscaServiceTemplate.class);\n }\n return toscaServiceTemplate;\n }",
"private Map<String, List<ZipEntry>> parseLocalFileHeaderData(List<ZipEntry> entries) {\n /** Maps String to list of ZipEntrys, name -> actual entries. */\n Map<String, List<ZipEntry>> nameMap = new LinkedHashMap<>();\n\n for (ZipEntry entry : entries) {\n long offset = entry.getLocalHeaderOffset();\n archive.position(offset + ZipConstants.LOCNAM);\n\n // Gets the data offset of this entry.\n int fileNameLen = getShort();\n int extraFieldLen = getShort();\n long dataOffset = offset + ZipConstants.LOCEXT + ZipConstants.SHORT_BYTE_SIZE\n + fileNameLen + extraFieldLen;\n entry.setDataOffset(dataOffset);\n\n // Puts the entry into the nameMap.\n String name = entry.getName();\n List<ZipEntry> entriesWithTheSameName;\n if (nameMap.containsKey(name)) {\n entriesWithTheSameName = nameMap.get(name);\n } else {\n entriesWithTheSameName = new ArrayList<>();\n nameMap.put(name, entriesWithTheSameName);\n }\n entriesWithTheSameName.add(entry);\n }\n\n return nameMap;\n }",
"public static List<String> scanFileNamesInArchive(InputStream in)\r\n\t\t\tthrows IOException {\r\n\r\n\t\tfinal List<String> back = new ArrayList<String>();\r\n\r\n\t\tJarInputStream jin = new JarInputStream(in);\r\n\t\tZipEntry entry = jin.getNextEntry();\r\n\t\twhile (entry != null) {\r\n\r\n\t\t\tString fileName = entry.getName();\r\n\t\t\tif (fileName.charAt(fileName.length() - 1) == '/') {\r\n\t\t\t\tfileName = fileName.substring(0, fileName.length() - 1);\r\n\t\t\t}\r\n\r\n\t\t\tif (fileName.charAt(0) == '/') {\r\n\t\t\t\tfileName = fileName.substring(1);\r\n\t\t\t}\r\n\r\n\t\t\tif (File.separatorChar != '/') {\r\n\t\t\t\tfileName = fileName.replace('/', File.separatorChar);\r\n\t\t\t}\r\n\r\n\t\t\tif (!entry.isDirectory()) {\r\n\t\t\t\tback.add(fileName);\r\n\t\t\t}\r\n\r\n\t\t\tentry = jin.getNextEntry();\r\n\t\t}\r\n\t\tjin.close();\r\n\t\treturn back;\r\n\t}",
"public List<T> extract(String filename)\n {\n if (StringUtils.isBlank(filename))\n {\n throw new IllegalStateException(\"Name of the file must be specified!\");\n }\n else\n {\n data = new ArrayList<T>();\n ClassLoader classLoader = getClass().getClassLoader();\n InputStream inputStream = classLoader.getResourceAsStream(filename);\n\n Scanner scanner = new Scanner(inputStream);\n while (scanner.hasNextLine())\n {\n parse(scanner.nextLine());\n }\n scanner.close();\n\n return data;\n }\n }",
"void importDivision(Connection con, ZipFile zip) throws Exception;",
"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}",
"private List<String[]> extract(String file) {\n List<String[]> readIn = null;\n try {\n // instantiate file reader object\n FileReader fr = new FileReader(file);\n\n // instantiate csv reader object\n CSVReader csvReader = new CSVReaderBuilder(fr).build();\n readIn = csvReader.readAll();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return readIn;\n }",
"public void run() {\n try {\n handleZipFiles(file);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }",
"private APKFileDetails analyzeXapkFile(String filePath) {\n try {\n ZipFile zipFile = new ZipFile(filePath);\n Enumeration<? extends ZipEntry> entries = zipFile.entries();\n\n while(entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n if (entry.getName().equalsIgnoreCase(\"manifest.json\")) {\n InputStream stream = zipFile.getInputStream(entry);\n BufferedReader streamReader = new BufferedReader(new InputStreamReader(stream, \"UTF-8\"));\n StringBuilder responseStrBuilder = new StringBuilder();\n String inputStr;\n while ((inputStr = streamReader.readLine()) != null) {\n responseStrBuilder.append(inputStr);\n }\n stream.close();\n zipFile.close();\n return analyzeXapkManifest(responseStrBuilder.toString());\n }\n\n }\n zipFile.close();\n throw new APKFileAnalyzerException(\"Missing manifest in XAPK-file\", new Exception());\n\n } catch (Exception e) {\n log.error(\"Unexpected error while analyzing XAPK-file: {}\", filePath, e);\n throw new APKFileAnalyzerException(\"Unexpected error while analyzing XAPK-file\", e);\n }\n }",
"public List<Clazz> loadAndScanJar()\n\t\t\tthrows ClassNotFoundException, ZipException, IOException {\n\t\tsuper.addURL(new File(path).toURI().toURL());\n\t\tList<Clazz> representations=new ArrayList<Clazz>();\n\n\t\t// Count the classes loaded\n\t\t// Your jar file\n\t\tFile f = new File(path);\n\n\t\tJarFile jar = new JarFile(path);\n\t\t// Getting the files into the jar\n\t\tEnumeration<? extends JarEntry> enumeration = jar.entries();\n\n\t\t// Iterates into the files in the jar file\n\t\twhile (enumeration.hasMoreElements()) {\n\t\t\tZipEntry zipEntry = enumeration.nextElement();\n\t\t\t// Is this a class?\n\t\t\tif (zipEntry.getName().endsWith(\".class\")) {\n\t\t\t\t// Relative path of file into the jar.\n\t\t\t\tString className = zipEntry.getName();\n\t\t\t\t// Complete class name\n\t\t\t\tclassName = className.replace(\".class\", \"\").replace(\"/\", \".\");\n\t\t\t\t// Load class definition from JVM\n\t\t\t\tClass<?> clazz = this.loadClass(className);\n\t\t\t\ttry {\n\t\t\t\t\t\tClazz actual = new Clazz(clazz.getName());\n\t\t\t\t\t\tfor (java.lang.reflect.Method m : clazz.getMethods()) {\n\t\t\t\t\t\t\tactual.addMethod(m.getReturnType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isAbstract(m.getModifiers()), Modifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (java.lang.reflect.Field m : clazz.getFields()) {\n\t\t\t\t\t\t\tactual.addVariable(m.getType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\trepresentations.add(actual);\n\n\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tjar.close();\n\t\treturn representations;\n\t}",
"public static int unzip(String srcZipFile, String specifiedFile, String targetDirectory, String passwd) {\n File srcFile = new File(srcZipFile);\n if (!srcFile.exists() || srcFile.isDirectory()) {\n System.out.println(\"[JZip] Source file does not exist or correct.\");\n return SOURCE_FILE_ERROR;\n }\n \n // Check target directory\n File destDir = new File(targetDirectory);\n destDir.mkdir();\n if (!destDir.isDirectory()) {\n System.out.println(\"[JZip] targetDirectory should be directory.\");\n return TARGET_DIR_ERROR;\n }\n \n // Init and set password\n ZipFile zipFile;\n try {\n zipFile = new ZipFile(srcZipFile);\n \n if (zipFile.isEncrypted()) {\n if (passwd != null && !passwd.isEmpty()) {\n zipFile.setPassword(passwd.toCharArray());\n }\n else {\n System.out.println(\"[JZip] No password indicated for a password-protected file.\");\n return PASSWORD_NOT_FOUND;\n }\n }\n else {\n System.out.println(\"[JZip] This zip file should has password but it doesn't.\");\n return SOURCE_SHOULD_HAS_PASSWORD;\n }\n }\n catch (ZipException e) {\n System.out.println(\"[JZip] Create zip object or set password causes cexception.\");\n return ZIP_INITIAL_ERROR;\n }\n \n // Check content and extract\n String targetFile = targetDirectory + (targetDirectory.endsWith(File.separator) ? \"\" : File.separator) + specifiedFile;\n try {\n \tList<?> fileHeaderList = zipFile.getFileHeaders();\n for (int i = 0; i < fileHeaderList.size(); i++) {\n \tFileHeader fileHeader = (FileHeader)fileHeaderList.get(i);\n \tif (fileHeader != null && fileHeader.getFileName().equals(specifiedFile)) {\n \t\tzipFile.extractFile(specifiedFile, targetDirectory);\n \t\tbreak;\n \t}\n }\n if (!new File(targetFile).isFile()) {\n \tSystem.out.println(\"[JZip] Input zip file does not have correct content.\");\n \treturn SOURCE_CONTENT_ERROR;\n }\n }\n catch (ZipException e) {\n System.out.println(\"[JZip] Extract zip file causes exception.\");\n // It will extract a zero-size file when password is incorrect, should be deleted\n new File(targetFile).delete();\n return EXTRACT_FILE_ERROR;\n }\n \n return NO_ERROR;\n }",
"public static final void unzip(String zipfileName, String baseOutputDir) {\r\n Enumeration entries;\r\n ZipFile zipFile;\r\n try {\r\n zipFile = new ZipFile(zipfileName);\r\n entries = zipFile.entries();\r\n while (entries.hasMoreElements()) {\r\n ZipEntry entry = (ZipEntry) entries.nextElement();\r\n String entryName = entry.getName();\r\n String theName = baseOutputDir + '/' + entryName;\r\n if (entry.isDirectory()) {\r\n // Assume directories are stored parents first then children.\r\n System.out.println(\"Extracting directory: \" + entry.getName());\r\n // This is not robust, just for demonstration purposes.\r\n (new File(theName)).mkdirs();\r\n continue;\r\n }\r\n //(new File(theName)).mkdirs();\r\n forceParentDirectories(theName);\r\n System.out.println(\"Extracting file: \" + theName);\r\n copyInputStream(zipFile.getInputStream(entry), new BufferedOutputStream(new FileOutputStream(theName)));\r\n }\r\n zipFile.close();\r\n } catch (Exception ioe) {\r\n System.err.println(\"Unhandled exception:\");\r\n ioe.printStackTrace();\r\n return;\r\n }\r\n }",
"Map<String, String> Read_File(XmlPullParser xmlPullParser, List<Tags_To_Read> tags, String account_Name) throws NullPointerException, XML_Reader_Exception;",
"private void mergeZipJarContents( ZipOutputStream output, File f ) throws IOException {\n //Check to see that the file with name \"name\" exists.\n if ( ! f .exists() ) {\n return ;\n }\n ZipFile zipf = new ZipFile( f );\n Enumeration entries = zipf.entries();\n while (entries.hasMoreElements()){\n ZipEntry inputEntry = (ZipEntry) entries.nextElement();\n //Ignore manifest entries. They're bound to cause conflicts between\n //files that are being merged. User should supply their own\n //manifest file when doing the merge.\n String inputEntryName = inputEntry.getName();\n int index = inputEntryName.indexOf(\"META-INF\");\n if (index < 0){\n //META-INF not found in the name of the entry. Go ahead and process it.\n try {\n output.putNextEntry(processEntry(zipf, inputEntry));\n } catch (ZipException ex){\n //If we get here, it could be because we are trying to put a\n //directory entry that already exists.\n //For example, we're trying to write \"com\", but a previous\n //entry from another mergefile was called \"com\".\n //In that case, just ignore the error and go on to the\n //next entry.\n String mess = ex.getMessage();\n if (mess.indexOf(\"duplicate\") >= 0){\n //It was the duplicate entry.\n continue;\n } else {\n //I hate to admit it, but we don't know what happened here. Throw the Exception.\n throw ex;\n }\n }\n InputStream in = zipf.getInputStream(inputEntry);\n int len = buffer.length;\n int count = -1;\n while ((count = in.read(buffer, 0, len)) > 0){\n output.write(buffer, 0, count);\n }\n in.close();\n output.closeEntry();\n }\n }\n zipf .close();\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 }",
"JournalEntry read() throws IOException, InvalidJournalEntryException;",
"void onUnzipCompleted(String output);",
"public void sortByZip(String file) throws FileNotFoundException, IOException, ParseException {\n\t\tarrayList = pareseFile(file);\n\t\tFile file1 = new File(file);\n\t\tfor (int i = 0; i < arrayList.size() - 1; i++) {\n\t\t\tfor (int j = 0; j < arrayList.size() - i - 1; j++) {\n\n\t\t\t\tJSONObject person1 = (JSONObject) arrayList.get(j);\n\t\t\t\tJSONObject person2 = (JSONObject) arrayList.get(j + 1);\n\t\t\t\tif ((person1.get(\"zip\").toString()).compareToIgnoreCase(person2.get(\"zip\").toString()) > 0) {\n\t\t\t\t\tJSONObject temp = person1;\n\t\t\t\t\tarrayList.set(j, person2);\n\t\t\t\t\tarrayList.set(j + 1, temp);\n\t\t\t\t}\n\t\t\t}\n\t\t\tmapper.writeValue(file1, arrayList);\n\n\t\t}\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}",
"public static List<String> mainReadFile(String[] args) throws IOException, URISyntaxException {\n List<String> exmp = new ArrayList<>();\n File initialFile = resolveFileFromResources(args[0]);\n // System.out.println(initialFile);\n ObjectMapper obM = getObjectMapper();\n Trades[] exmpTrade = obM.readValue(initialFile, Trades[].class);\n for (Trades trade : exmpTrade) {\n exmp.add(trade.getSymbol());\n }\n printJsonObject(exmp);\n //return Collections.emptyList();\n return exmp;\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}",
"private static void recurseFiles(File file)\r\n throws IOException, FileNotFoundException\r\n {\r\n if (file.isDirectory()) {\r\n //Create an array with all of the files and subdirectories \r\n //of the current directory.\r\nString[] fileNames = file.list();\r\n if (fileNames != null) {\r\n //Recursively add each array entry to make sure that we get\r\n //subdirectories as well as normal files in the directory.\r\n for (int i=0; i<fileNames.length; i++){ \r\n \trecurseFiles(new File(file, fileNames[i]));\r\n }\r\n }\r\n }\r\n //Otherwise, a file so add it as an entry to the Zip file. \r\nelse {\r\n byte[] buf = new byte[1024];\r\n int len;\r\n //Create a new Zip entry with the file's name. \r\n\r\n\r\nZipEntry zipEntry = new ZipEntry(file.toString());\r\n //Create a buffered input stream out of the file \r\n\r\n\r\n//we're trying to add into the Zip archive. \r\n\r\n\r\nFileInputStream fin = new FileInputStream(file);\r\n BufferedInputStream in = new BufferedInputStream(fin);\r\n zos.putNextEntry(zipEntry);\r\n //Read bytes from the file and write into the Zip archive. \r\n\r\n\r\nwhile ((len = in.read(buf)) >= 0) {\r\n zos.write(buf, 0, len);\r\n }\r\n //Close the input stream. \r\n\r\n\r\n in.close();\r\n //Close this entry in the Zip stream. \r\n\r\n\r\n zos.closeEntry();\r\n }\r\n }",
"private static void getResults() {\n\t\t//Variables\n\t\tFile directoryOfChunks = new File(\"output\");\n\t\tFile[] files = directoryOfChunks.listFiles();\n\t\tArrayList<String> filesInFolder = new ArrayList<>();\n\t\tArrayList<String> chunkResults = new ArrayList<>();\n\t\tBufferedReader br = null;\n\t\tReadFromFile rf = new ReadFromFile();\n\n\t\t//Get files from output folder\n\t\tif(directoryOfChunks.exists() && directoryOfChunks.isDirectory()){\n\t\t\tdirectoryName = \"output\";\n\t\t\t//Copy file names into arraylist\n\t\t\tfor (File f: files) {\n\t\t\t\t//Save file names into arraylist.\n\t\t\t\tfilesInFolder.add(f.getName());\n\t\t\t}\n\t\t}\n\t\t//if not a file or directory print error message\n\t\telse{\n\t\t\tSystem.out.println(\"No such file/directory: \" + directoryOfChunks);\n\t\t}\n\n\t\t//for loop to open and read each individual file\n\t\tfor (String file : filesInFolder) {\n\t\t\ttry {\n\n\t\t\t\tFileReader reader = new FileReader(directoryName + \"\\\\\" + file);\n\t\t\t\tbr = new BufferedReader(reader);\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tchunkResults.addAll(rf.readFromChunk(br));\n\t\t}\n\n\t\t//Call sanitizeAndSplit\n\t\tsanitizeAndSplit(chunkResults);\n\t}",
"private void testZipfileOrder(Path out) throws IOException {\n ZipFile outZip = new ZipFile(out.toFile());\n Enumeration<? extends ZipEntry> entries = outZip.entries();\n int index = 0;\n LinkedList<String> entryNames = new LinkedList<>();\n // We expect classes*.dex files first, in order, then the rest of the files, in order.\n while(entries.hasMoreElements()) {\n ZipEntry entry = entries.nextElement();\n if (!entry.getName().startsWith(\"classes\") || !entry.getName().endsWith(\".dex\")) {\n entryNames.add(entry.getName());\n continue;\n }\n if (index == 0) {\n Assert.assertEquals(\"classes.dex\", entry.getName());\n } else {\n Assert.assertEquals(\"classes\" + (index + 1) + \".dex\", entry.getName());\n }\n index++;\n }\n // Everything else should be sorted according to name.\n String[] entriesUnsorted = entryNames.toArray(StringUtils.EMPTY_ARRAY);\n String[] entriesSorted = entryNames.toArray(StringUtils.EMPTY_ARRAY);\n Arrays.sort(entriesSorted);\n Assert.assertArrayEquals(entriesUnsorted, entriesSorted);\n }",
"private ModInfo getModInfo(File file){\n try {\n ZipFile zipFile = new ZipFile(file); //Get the zipfile\n Enumeration<? extends ZipEntry> entries = zipFile.entries(); //Get all the entries\n\n //Loop over each entry.\n while (entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement(); //Next\n if(zipEntry.getName().endsWith(\"info.json\")) //Only take info.json\n return mapper.readValue(zipFile.getInputStream(zipEntry), ModInfo.class);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"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 static ArrayList<JournalEntry> readAllEntries() {\n // TODO: Why isn't it grabbing all entries\n final ArrayList<JournalEntry> resultList = new ArrayList<>();\n\n final String result = NetworkAdapter.httpRequest(READ_ALL_URL);\n try {\n JSONObject topJson = new JSONObject(result);\n for (Iterator<String> it = topJson.keys(); it.hasNext(); ) {\n String key = it.next();\n try {\n final JSONObject jsonEntry = topJson.getJSONObject(key);\n int date = jsonEntry.getInt(\"date\");\n int dayRating = jsonEntry.getInt(\"day_rating\");\n String entryText = jsonEntry.getString(\"entry_text\");\n String image = jsonEntry.getString(\"image\");\n String cacheId = null;\n try {\n cacheId = jsonEntry.getString(\"cache_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n String id = key;\n\n final JournalEntry entry = new JournalEntry(\n date,\n entryText,\n image,\n dayRating,\n id);\n entry.setCacheId(cacheId);\n resultList.add(\n entry);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n Log.i(TAG, \"Finished parsing all entries\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return resultList;\n }",
"public static byte[] getUnzippedFile(byte[] aZippedBytes) throws IOException {\r\n byte[] result = null;\r\n\r\n ByteArrayInputStream bais = new ByteArrayInputStream(aZippedBytes);\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n BufferedInputStream bis = new BufferedInputStream(new GZIPInputStream(bais));\r\n BufferedOutputStream bos = new BufferedOutputStream(baos);\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 result = baos.toByteArray();\r\n bos.close();\r\n bis.close();\r\n bais.close();\r\n baos.close();\r\n\r\n return result;\r\n }",
"public Integer[] compressFileReader() {\n\t\tint index = 0;\n\t\tString input = \"\";\n\t\ttry {\n\t\t\tint nextChar = 0;\n\t\t\twhile (nextChar != (int) '\\n') {\n\t\t\t\tnextChar = 0;\n\t\t\t\tfor (int i = 0; i < codeLength; i++) {\n\t\t\t\t\tnextChar <<= 1;\n\t\t\t\t\tif (bufferCount == 0) {\n\t\t\t\t\t\tbuffer = in.read();\n\t\t\t\t\t\tbufferCount = 8;\n\t\t\t\t\t}\n\t\t\t\t\tif (buffer == -1) {// in.close();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tbufferCount--;\n\t\t\t\t\tif ((buffer >> (bufferCount) & 1) == 1)\n\t\t\t\t\t\tnextChar |= 1;\n\t\t\t\t}\n\t\t\t\tinput = input + nextChar + \",\";\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tString[] str = input.split(\",\");\n\t\tInteger[] inputArray = new Integer[str.length];\n\t\tfor (String st : str)\n\t\t\tinputArray[index++] = Integer.parseInt(st);\n\t\treturn inputArray;\n\n\t}",
"public static void main(String[] args){\r\n List<File> xzQueue = new ArrayList<>();\r\n List<File> unpackQueue = new ArrayList<>();\r\n List<File> packXZQueue = new ArrayList<>();\r\n\r\n for(int i=0; i<args.length; ++i){\r\n if(args[i].equalsIgnoreCase(\"-packxz\")){\r\n if(i+1<args.length){\r\n ++i;\r\n String[] paths = args[i].split(\",\");\r\n for(String s : paths){\r\n packXZQueue.add(new File(s));\r\n }\r\n }\r\n } else if(args[i].equalsIgnoreCase(\"-xz\")){\r\n if(i+1<args.length){\r\n ++i;\r\n String[] paths = args[i].split(\",\");\r\n for(String s : paths){\r\n xzQueue.add(new File(s));\r\n }\r\n }\r\n } else if(args[i].equalsIgnoreCase(\"-pack\")){\r\n if(i+1<args.length){\r\n ++i;\r\n String[] paths = args[i].split(\",\");\r\n for(String s : paths){\r\n unpackQueue.add(new File(s));\r\n }\r\n }\r\n }\r\n }\r\n\r\n for(File f : packXZQueue) unpack(extractXZ(f));\r\n for(File f : xzQueue) extractXZ(f);\r\n for(File f : unpackQueue) unpack(f);\r\n }",
"public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}",
"public File extractTo (File destination) throws IOException\n\t{\n\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t.newDirectoryStream (zipfs.getPath (\"/\"));)\n\t\t{\n\t\t\tfor (Path file : directoryStream)\n\t\t\t{\n\t\t\t\textract (file, destination.toPath ());\n\t\t\t}\n\t\t}\n\t\treturn destination;\n\t}"
] | [
"0.616434",
"0.6162942",
"0.6135082",
"0.60609007",
"0.59911937",
"0.59658194",
"0.59628093",
"0.5951173",
"0.5916676",
"0.587179",
"0.58440685",
"0.57833064",
"0.5777749",
"0.5777749",
"0.576947",
"0.5750043",
"0.5711151",
"0.5653849",
"0.5604094",
"0.55379874",
"0.55065554",
"0.54770017",
"0.5462045",
"0.54488045",
"0.5436008",
"0.53864884",
"0.53732157",
"0.5363584",
"0.53599375",
"0.53234893",
"0.52963865",
"0.52955693",
"0.529003",
"0.5265139",
"0.5258597",
"0.5258256",
"0.5255023",
"0.5245705",
"0.52419275",
"0.5241673",
"0.5236697",
"0.52362055",
"0.5234331",
"0.5232803",
"0.52164745",
"0.52014786",
"0.519839",
"0.5186528",
"0.5185112",
"0.5178314",
"0.51661",
"0.5157062",
"0.5144222",
"0.513783",
"0.51305676",
"0.51235545",
"0.5093614",
"0.5086641",
"0.50782627",
"0.50656444",
"0.5060445",
"0.5037181",
"0.5027295",
"0.5018194",
"0.50161004",
"0.5014598",
"0.5004613",
"0.5000128",
"0.4999593",
"0.4968765",
"0.4947754",
"0.4944698",
"0.49429426",
"0.49413195",
"0.4939659",
"0.4917044",
"0.49159905",
"0.4913431",
"0.4912222",
"0.4887909",
"0.4878251",
"0.48640844",
"0.48456022",
"0.48446926",
"0.48379442",
"0.48271945",
"0.4820843",
"0.4819112",
"0.48187083",
"0.48180985",
"0.48169473",
"0.4814912",
"0.48098323",
"0.4803791",
"0.48036277",
"0.47922575",
"0.47839332",
"0.47796053",
"0.4776111",
"0.4772338",
"0.477119"
] | 0.0 | -1 |
Compress input stream and provide result as chunks. Starts its own thread for piping the data. | public static void zip(final String name, final InputStream inputStream, final int pipeSize, ByteChunkListener byteChunkListener) throws IOException {
// inputStream -> GZIPOutputStream -> Chunkifier -> chunks of Byte to listener
final PipedInputStream readFromPipe = new PipedInputStream(pipeSize);
final PipedOutputStream writeCompressedIntoPipe = new PipedOutputStream(readFromPipe); // Make sure it's connected now
// Start thread that reads from input and pass it to compressor
Thread thread = new Thread(new Runnable() {
public void run() {
byte[] buf = new byte[pipeSize];
try {
ZipOutputStream compressor = new ZipOutputStream(writeCompressedIntoPipe);
compressor.putNextEntry(new ZipEntry(name));
for(int len = inputStream.read(buf); len != -1; len = inputStream.read(buf)) compressor.write(buf, 0, len);
compressor.closeEntry();
compressor.finish();
compressor.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
});
thread.start();
// Read on pipe end compressed data
Chunkifier.read(readFromPipe, pipeSize, byteChunkListener);
// Cleanup
while(thread.isAlive()) try {
thread.join();
} catch (InterruptedException e) {}
writeCompressedIntoPipe.close();
readFromPipe.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<CompressResult> parallelCompress(Path input, Path output, int maxSizeInMB, int nThread) throws IOException;",
"@Override\n\tpublic void run() {\n\n\t\tbyte[] buffer = new byte[BUFFER_SIZE]; \n try { \n while (true) { \n int bytesRead = mInputStream.read(buffer); \n if (bytesRead == -1) \n break; // End of stream is reached --> exit 스트림의 끝에 도달\n \n Filter filter = new Filter(buffer, 0, bytesRead);\n mOutputStream.write(buffer, 0, bytesRead);\n mOutputStream.flush(); \n \n } \n } catch (IOException e) { \n // Read/write failed --> connection is broken \n \t// 쓰기/읽기 실패 --> 연결 끊기\n \tmParent.connectionBroken(); \n } \n \n // Notify parent thread that the connection is broken \n // 부모스레드에게 연결 끊기 전달\n mParent.connectionBroken(); \n }",
"public void run(){\n\t\t\tLog.w(\"Control\",\"Thread Start\");\n\t\t\twhile(true){\n\t\t\t\tif((sdata = queue.Qout())!=null){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tCompressBuffer(encoder, -1, sdata, sdata.length,h264Buff);\n\t\t\t\t\t\tcb.OnEncodeCompleted(++CodedCounter);\n\n\n\t\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\tLog.w(\"Error\",e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\tif(!isRecording&&queue.Qempry()){\n\t\t\t\t\tLog.w(\"Encoder\",\"Thread end\");\n\t\t\t\t\tCompressEnd(encoder);\n\t\t\t\t\tLog.w(\"Control\",\"ended\");\n\t\t\t\t\tflagDone = true;\n\t\t\t\t\tcb.OnFinished();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isDestroy){\n\t\t\t\t\tflagDone = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"public final static void pipe(final InputStream in, final OutputStream out)\n {\n new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n try\n {\n IOUtils.copy(in, out);\n }\n catch (IOException e)\n {\n // Do nothing\n }\n }\n }).start();\n }",
"@Override\n public void pipeStart() {\n // Recursively, start the pipeline steps' threads from back to front.\n if (nextPipeStep != null) {\n nextPipeStep.pipeStart();\n }\n // This is global to all encoders, so start all encoders' threads\n for (Encoder e: instances) {\n e.start(); \n }\n }",
"public void run() {\n \t\ttry {\n \t\t\tout.setHeader(init(in.getHeader()));\n \t\t\tsetSampleProcessed(0); // set the number of samples being processed\n \t\t\t\t\t\t\t\t\t// as zero\n \t\t\twhile (true) {\n \t\t\t\tStreamFrame sf = process(in.recvFrame());\n \t\t\t\tif (sf != null)\n \t\t\t\t\tout.sendFrame(sf);\n \t\t\t}\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}",
"@Override\n synchronized public void run() {\n try {\n BufferedReader bufferedReader = new BufferedReader(\n new InputStreamReader(inputStream, Charset.defaultCharset())\n );\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n this.result.add(line);\n }\n } catch (IOException ex) {\n log.error(\"Failed to consume and display the input stream of type \" + streamType + \".\", ex);\n } finally {\n this.isStopped = true;\n notify();\n }\n }",
"MyInputStream(String name, InputStream in) {\n this.name = name;\n this.in = new BufferedInputStream(in);\n buffer = new StringBuffer(4096);\n Thread thr = new Thread(this);\n thr.setDaemon(true);\n thr.start();\n }",
"public void run()\n{\n try {\n InputStreamReader in = new InputStreamReader(input_stream);\n int c;\n if(is_synchronized){\n\t while ((c = in.read()) != -1) {\n\t synchronized(lock){\n\t contents.append((char) c);\n\t }\n\t }\n }\n else{\n\t while ((c = in.read()) != -1) {\n\t contents.append((char) c);\n\t }\n }\n }\n catch (Exception e) {\n //that's ok\n }\n}",
"StreamsThread(InputStream in, OutputStream out) {\n this.in = in;\n this.out = out;\n }",
"public void run() {\n\t\tboolean completed = false;\n\t\t\n\t\ttry {\n\t\t\twhile (buffer.hasNext()) {\n\t\t\t\tsink.process(buffer.getNext());\n\t\t\t}\n\t\t\t\n\t\t\tsink.complete();\n\t\t\tcompleted = true;\n\t\t\t\n\t\t} finally {\n\t\t\tif (!completed) {\n\t\t\t\tbuffer.setOutputError();\n\t\t\t}\n\t\t\t\n\t\t\tsink.release();\n\t\t}\n\t}",
"public synchronized void readInput() throws InterruptedException, IOException \n\t{\n\t\twhile (getDataSourceEOFlag())\n\t\t{\n\t\t\tcontent.set(incomingPipe.take());\n\t\t\t\n\t\t\t// Ensure thread-timing uniformity (a speed-limiter)\n\t\t\t//Thread.sleep(100);\n\t\t\t\n\t\t\tprocess();\n\t\t\t// Discard the text to free up memory.\n\t\t\tcontent.set(null);\n\t\t}\n\t}",
"List<CompressResult> compress(Path input, Path output, int maxSizeInMB) throws IOException;",
"private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\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 void run() {\n int ch;\n\n try {\n while ((ch = is.read()) != -1) {\n sb.append((char) ch);\n }\n }\n catch (IOException e) {\n sb.append(\"IOException reading stream: \" + e.toString());\n }\n }",
"public CompressionInputStream(InputStream in) {\n super(in);\n }",
"public void run() {\n try {\n byte b[] = new byte[100];\n for (;;) {\n int n = in.read(b);\n String str;\n if (n < 0) {\n break;\n }\n str = new String(b, 0, n);\n buffer.append(str);\n System.out.print(str);\n }\n } catch (IOException ioe) { /* skip */ }\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}",
"public void run() {\n\t\tGenRandomString generator = new GenRandomString();\n\t\tStringToInt converter = new StringToInt();\n\t\t\n\t\tint rawData;\n\t\t\n\t\twhile(true) {\n\t\t\t\n\t\t\trawData = converter.convert(generator.generate());\n\t\t\t\n\t\t\t//synchronization to make sure that queue is filled up in the correct order.\n\t\t\tsynchronized(GlobalInfo.enqueueLock){\n\t\t\t\tSystem.out.format(\"%d got the lock.\\n\",deviceNumber);\n\t\t\t\tGlobalInfo.inputs[deviceNumber] = rawData;\n\t\t\t\tGlobalInfo.pipeLine.add(GlobalInfo.inputs);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tThread.sleep(10000);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"@Test\n\tpublic void generateCompressedFile() throws Exception {\n\t\tint sourceRecords = 10000000;\n\t\tint bufferSize = 1000;\n\t\tAssert.isTrue(sourceRecords % bufferSize == 0); // make sure its divisible without the remainder\n\t\tfinal int outerLoop = sourceRecords / bufferSize;\n\t\tfinal CountDownLatch latch = new CountDownLatch(outerLoop);\n\t\t\n\t\tExecutorService executor = Executors.newFixedThreadPool(8);\n\n\t\tfinal FileOutputStream fos = new FileOutputStream(new File(\"source/compressed.txt\"));\n\t\tfinal BufferedReader br = new BufferedReader(new FileReader(\"source/source.txt\"));\n\t\t\n\t\tfinal ArrayBlockingQueue<String> recordQueue = new ArrayBlockingQueue<String>(outerLoop);\n\t\texecutor.execute(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < outerLoop; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfos.write(recordQueue.poll(1000, TimeUnit.MILLISECONDS).getBytes());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tlatch.countDown();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tlong start = System.currentTimeMillis();\n\t\tfor (int i = 0; i < outerLoop; i++) {\n\t\t\tStringBuffer buffer = new StringBuffer(bufferSize * 230);\n\t\t\tfor (int j = 0; j < bufferSize; j++) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\tbuffer.append(line + \"\\n\");\n\t\t\t}\n\t\t\tfinal String bufferString = buffer.toString();\n\t\t\t\n\t\t\texecutor.execute(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString compressedRecord = compressRecord(bufferString) + \"\\n\";\n\t\t\t\t\t\trecordQueue.offer(compressedRecord);\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});\n\t\t\t\n\t\t}\n\n\t\tlatch.await();\n\t\tlong stop = System.currentTimeMillis();\n\t\tSystem.out.println(\"Compressed and written \" + sourceRecords + \" records in \" + (stop - start) + \" milliseconds\");\n\t\tfos.close();\n\t\tbr.close();\n\t}",
"@Override\n public void run() {\n int bytes;\n\n //keep listening to the InputStream until an exception occurs\n while (true) {\n try {\n //Read from the InputStrea,\n bytes = mInStream.readInt();\n readInInt = bytes;\n //Send the obtained bytes to the UI activity;\n Log.i(\"TRANSFER\", \"received \" + bytes);\n } catch (IOException e) {\n // e.printStackTrace();\n break;\n }\n }\n }",
"@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\twhile(runFlg){\n\t\t\t\ttry{\n\t\t\t\t\t\n\t\t\t\t\twhile(mQueue.getSize() >0 ){\n\t\t\t\t\t\tbyte[] data = getData();\n\t\t\t\t\t\tmOut.write(data);\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\tLog.e(TAG,e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public static void stream(final InputStream in, final OutputStream out) throws IOException {\n\t\tfinal byte buffer[] = new byte[BUFFER_SIZE];\r\n\t\tint len = buffer.length;\r\n\t\twhile (true) {\r\n\t\t\tlen = in.read(buffer);\r\n\t\t\tif (len == -1) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tout.write(buffer, 0, len);\r\n\t\t}\r\n\t\tout.flush();\r\n\t}",
"public Faster(InputStream ins) throws IOException{\n\t\t\t/**************************************************************/\n\t\t\tif (!ins.markSupported()) {\n\t\t\t\tins = new BufferedInputStream(ins);\n\t\t\t}\n\t\t\tins.mark(2);\n\t\t\tint magic = ins.read() & 0xff | ((ins.read() << 8) & 0xff00);\n\t\t\tins.reset();\n\n\n\t\t\tif (magic == GZIPInputStream.GZIP_MAGIC)\n\t\t\t\tthis.in = new GZIPInputStream(ins);\t\t\n\t\t\telse\n\t\t\t\t/**************************************************************/\n\t\t\t\tthis.in = ins;\n\t\t}",
"StreamConnectionIO(Mux mux, OutputStream out, InputStream in) {\n\tsuper(mux);\n\tthis.out = out;\n//\tthis.out = new BufferedOutputStream(out);\n\tthis.in = in;\n\n\toutChannel = newChannel(out);\n\tinChannel = newChannel(in);\n sendQueue = new LinkedList<Buffer>();\n }",
"public interface CompressDecompressService {\n\n /**\n * Run compression in number of threads\n *\n * @param input\n * @param output\n * @param maxSizeInMB\n * @param nThread\n * @return\n * @throws IOException\n */\n List<CompressResult> parallelCompress(Path input, Path output, int maxSizeInMB, int nThread) throws IOException;\n\n /**\n * Run compression in main thread\n *\n * @param input the full path of the folder or file to read from\n * @param output the full path of the folder or file to write, if\n * @param maxSizeInMB\n * @return\n * @throws IOException\n */\n List<CompressResult> compress(Path input, Path output, int maxSizeInMB) throws IOException;\n\n /**\n * Run decompression in main thread\n *\n * @param input\n * @param output\n * @return\n * @throws IOException\n */\n List<CompressResult> decompress(Path input, Path output) throws IOException;\n}",
"private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }",
"public void run() {\n\t\tbyte[] out;\n\t\tshort[] in = new short[0];\n\t\tint read;\n\t\tint consumed;\n\t\t\n\t\ttry {\n\t\t\tconnect();\n\t\t\tin = new short[sock.getReceiveBufferSize()];\n\t\t} catch (Exception ex) {\n\t\t\t// TODO: Fire event to the model, so we can display something that lets the user know what happened.\n\t\t\tex.printStackTrace();\n\t\t\tdisconnect();\n\t\t}\n\t\t\n \t\twhile (sock != null && !sock.isClosed()) {\n\t\t\ttry {\n\t\t\t\tconsumed = 0;\n\t\t\t\t\n\t\t\t\t// Read up to in.length before we're invalid...\n\t\t\t\tinStream.mark(in.length);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tread = inStream.read(in);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tread = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Truncate the read buffer, and process it.\n\t\t\t\tif (read > 0) {\n\t\t\t\t\tshort[] truncIn = new short[read];\n\t\t\t\t\tSystem.arraycopy(in, 0, truncIn, 0, read);\n\t\t\t\t\t\n\t\t\t\t\tconsumed = consumeIncoming(truncIn);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// reset the mark, and then consume the bytes we've \n\t\t\t\t// processed.\n\t\t\t\tinStream.reset();\n\t\t\t\tif (consumed > 0) {\n\t\t\t\t\tinStream.skip(consumed);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Do I have data to write?\n\t\t\t\tout = outgoingBytes();\n\t\t\t\tif (out.length > 0) {\n\t\t\t\t\tsock.getOutputStream().write(out);\n\t\t\t\t\tsock.getOutputStream().flush();\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t\tSystem.err.println(ex.toString());\n\t\t\t}\n\t\t\t// Play nice with thread schedulers.\n\t\t\tThread.yield();\n\t\t}\n\t}",
"public void processStreamInput() {\n }",
"@Override\n public void run() {\n try {\n\n byte[] data = new byte[TcpClient.BUFFER_SIZE * 2];\n\n while(!Rebroadcaster.INSTANCE.isHalted()) {\n int len = is.read(data, 0, data.length);\n os.write(data, 0, len);\n os.flush();\n }\n } catch (IOException ex) {\n LOGGER.log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n\tpublic void run() {\n\t\twhile (!stopThread) {\n\t\t\ttry {\n\t\t\t\t//String outputMessage = mmInStream.available() + \" bytes available\";\n\t\t\t\t//Log.i(TAG, outputMessage);\n\t\t\t\t// Read from the InputStream\n\t\t\t\twhile (mmInStream.available() > 0) {\n\n\t\t\t\t\tsynchronized (buffer) {\n\t\t\t\t\t\tif (bufferLast == buffer.length) {\n\t\t\t\t\t\t\tbyte temp[] = new byte[bufferLast << 1];\n\t\t\t\t\t\t\tSystem.arraycopy(buffer, 0, temp, 0, bufferLast);\n\t\t\t\t\t\t\tbuffer = temp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbuffer[bufferLast++] = (byte) mmInStream.read();\n\t\t\t\t\t}\n\t\t\t\t\tbtSerialEvent();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.e(TAG, e.getMessage());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tInputStream inputStream = mSocket.getInputStream();\n\t\t\tint leng;\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\tByteArrayBuffer[] data = {new ByteArrayBuffer(1024 * 32)};\n\t\t\twhile((leng = inputStream.read(buffer)) != -1 && mConected)\n\t\t\t{\n\t\t\t\tif(mConected)\n\t\t\t\t{\n\t\t\t\t\tdata[0].append(buffer, data[0].length(), leng);\n\t\t\t\t\tprocessMessage(data);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\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\tLog.e(TAG, \"Cannot set InputStream\\nNetwork error\");\n\t\t\tevent.connectionLost();\n\t\t} catch (ProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tevent.connectionLost();\n\t\t}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tMediaCodec encoder = MediaCodec.createEncoderByType(\"audio/mp4a-latm\");\n\t\t\t\n\t\t\tMediaFormat format = MediaFormat.createAudioFormat(\"audio/mp4a-latm\", SampleRate, 2);\n\t\t\tformat.setInteger(MediaFormat.KEY_BIT_RATE, 64000); // 64Kb/s\n\t\t\tformat.setInteger(MediaFormat.KEY_AAC_PROFILE, MediaCodecInfo.CodecProfileLevel.AACObjectHE);\n\t\t\t\n\t\t\tencoder.configure(format, null, null, MediaCodec.CONFIGURE_FLAG_ENCODE);\n\t\t\tencoder.start();\n\t\t\t\n\t\t\tInputHandler input = new InputHandler(encoder);\n\t\t\tOutputHandler output = new OutputHandler(encoder);\n\t\t\t\n\t\t\twhile (!output.isFinished()) {\n\n\t\t\t\tif (!input.isFinished()) {\n\t\t\t\t\tinput.run();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\toutput.run();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tNotifier.INSTANCE.send(Notifier.Mp4WriteFailed);\n\t\t\t\t\tnotifyManager.cancel(notifyId);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n public void run() {\n if (data.isStreaming()) {\n // if (frame < list.size()) {\n try {\n // BufferedImage image = list.get(frame);\n enc.encodeImage(videoImage);\n // frame++;\n } catch (Exception ex) {\n System.out.println(\"Error encoding frame: \" + ex.getMessage());;\n }\n }\n\n }",
"@Override\r\n\tpublic void run() {\r\n\t\t\r\n\t\tLog.d(TAG, \"begin ConnectedThread job\");\r\n\t\t\r\n\t\t// Receive buffer\r\n\t\tbyte[] buffer = new byte[256];\r\n\t\t// Amount of bytes read from InputStream\r\n\t\tint length = 0;\r\n\t\t\r\n\t\twhile(running){\r\n\t\t\t\r\n\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t// Read available bytes from InputStream\r\n\t\t\t\tlength = oInStream.read(buffer);\r\n\t\t\t\t\t\t\r\n\t\t\t\t// Report the obtained bytes to the ConnectedListener\r\n\t\t\t\tif(oListener != null){\r\n\t\t\t\t\toListener.onReceive(buffer, length);\r\n\t\t\t\t}\r\n\t\t\t}catch(IOException e){\r\n\t\t\t\t\r\n\t\t\t\tLog.e(TAG, \"disconnected\", e);\r\n\t\t\t\t\r\n\t\t\t\t// Stop job\r\n\t\t\t\trunning = false;\r\n\t\t\t\t\r\n\t\t\t\t// Report this connection lose to the ConnectedListener \r\n\t\t\t\tif(oListener != null){\r\n\t\t\t\t\toListener.onDisconnect();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\twhile (true) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput = new DataInputStream(socket.getInputStream());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\twhile (input != null) {\n\t\t\t\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\t\t\t\tdecode(input.readUTF());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\tSystem.exit(1);\n\t\t\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"void encode(StreamingContent content, OutputStream out) throws IOException;",
"public void compress(BitInputStream in, BitOutputStream out){\n\n\t\t\tint[] counts = readForCounts(in);\n\t\t\tHuffNode root = makeTree(counts);\n\t\t\tMap<Integer, String> codings = makeCodingsFromTree(root);\n\t\t\twriter(root, out);\n\t\t\tin.reset();\n\t\t\twriteCompressedBits(in, codings, out);\n\t\t\tout.close();\n\t\t}",
"public InputStream inputWrap(InputStream is) \n throws IOException {\n logger.fine(Thread.currentThread().getName() + \" wrapping input\");\n \n // discard any state from previously-recorded input\n this.characterEncoding = null;\n this.inputIsChunked = false;\n this.contentEncoding = null; \n \n this.ris.open(is);\n return this.ris;\n }",
"public void run() {\n byte[] buffer = new byte[1024]; // buffer store for the stream\n int bytes; // bytes returned from read()\n // Keep listening to the InputStream until an exception occurs\n while (true) {\n try {\n // Read from the InputStream\n bytes = mmInStream.available();\n if (bytes != 0) {\n SystemClock.sleep(100); //pause and wait for rest of data. Adjust this depending on your sending speed.\n bytes = mmInStream.available(); // how many bytes are ready to be read?\n bytes = mmInStream.read(buffer, 0, bytes); // record how many bytes we actually read\n mHandler.obtainMessage(MESSAGE_READ, bytes, -1, buffer)\n .sendToTarget(); // Send the obtained bytes to the UI activity\n }\n } catch (IOException e) {\n e.printStackTrace();\n\n break;\n }\n }\n }",
"@Override\r\n public void run() {\r\n byte[] buffer = new byte[1024];\r\n int bytes;\r\n int times = 0;\r\n\r\n while (!mStopped) {\r\n try {\r\n if (times == 0) {\r\n try {\r\n \t// Sometimes lag occurs. Therefore, from time to time\r\n \t// we just ignore a large chunk of data from input stream\r\n \t// in order to synchronize the communication.\r\n mInputStream.skip(1024000);\r\n } catch (Exception e) {}\r\n times = LAG_CUT_TIMEOUT;\r\n }\r\n times--;\r\n\r\n // Read from socket and send to the handler\r\n bytes = mInputStream.read(buffer);\r\n mReceiveHandler.receiveData(buffer, bytes);\r\n\r\n } catch (IOException ioe) {\r\n Log.e(Common.TAG, \"Error receiving from the socket: \" + ioe.getMessage());\r\n mPeer.communicationErrorOccured();\r\n break;\r\n }\r\n }\r\n }",
"private static void pipe(Reader reader, Writer writer) throws IOException {\n char[] buf = new char[1024];\n int read = 0;\n while ( (read = reader.read(buf) ) >= 0) {\n writer.write(buf, 0, read);\n }\n writer.flush();\n }",
"static byte[] compressData(byte data[]) {\n\t\tif (data.length < 8) {\n\t\t\treturn (data);\n\t\t} // Too short to compress effectively...\n\t\ttry {\n\t\t\t// Make a buffer; data expansion is unusual except for short inputs.\n\t\t\tfinal ByteArrayOutputStream baos = new ByteArrayOutputStream(\n\t\t\t\t\tMath.max(data.length, 32));\n\t\t\tfinal DefOutputStream cos = new DefOutputStream(baos);\n\t\t\t// Write uncompressed data to stream.\n\t\t\tcos.write(data);\n\t\t\t// Force everything out...\n\t\t\tcos.finish();\n\t\t\tcos.flush();\n\t\t\t// Maybe we should strip some other headers too?\n\t\t\treturn (baos.toByteArray());\n\t\t} catch (IOException e) {\n\t\t\t// Should never happen...\n\t\t\tthrow new Error(\"unexpected internal error\");\n\t\t}\n\t}",
"@Test\n\tpublic void writeToHDFSCompressedFile() throws Exception {\n\t\tint sourceRecords = 10000000;\n\t\tint bufferSize = 1000;\n\t\tAssert.isTrue(sourceRecords % bufferSize == 0); // make sure its divisible without the remainder\n\t\tfinal int outerLoop = sourceRecords / bufferSize;\n\t\tfinal CountDownLatch latch = new CountDownLatch(outerLoop);\n\t\t\n\t\tExecutorService executor = Executors.newFixedThreadPool(8);\n\n\t\t//final FileOutputStream fos = new FileOutputStream(new File(\"source/compressed.txt\"));\n\t\tConfiguration configuration = new Configuration();\n\t\tconfiguration.set(\"dfs.block.size\", \"134217728\");// play around with this number (in bytes)\n\t\tFileSystem fs = FileSystem.get(new URI(\"hdfs://192.168.47.10:54310\"), configuration, \"hduser\");\n\t\tPath outFilePath = new Path(\"/hduser/input/compressed.txt\");\n\t\tfinal OutputStream fos = fs.create(outFilePath);\n\t\t\n\t\t\n\t\tfinal BufferedReader br = new BufferedReader(new FileReader(\"source/source.txt\"));\n\t\t\n\t\tfinal ArrayBlockingQueue<String> recordQueue = new ArrayBlockingQueue<String>(outerLoop);\n\t\texecutor.execute(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfor (int i = 0; i < outerLoop; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfos.write(recordQueue.poll(1000, TimeUnit.MILLISECONDS).getBytes());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tlatch.countDown();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tSystem.out.println(\"Starting\");\n\t\tlong start = System.currentTimeMillis();\n\t\tfor (int i = 0; i < outerLoop; i++) {\n\t\t\tStringBuffer buffer = new StringBuffer(bufferSize * 230);\n\t\t\tfor (int j = 0; j < bufferSize; j++) {\n\t\t\t\tString line = br.readLine();\n\t\t\t\tbuffer.append(line);\n\t\t\t\tbuffer.append(\"\\n\");\n\t\t\t}\n\t\t\tfinal String bufferString = buffer.toString();\n\t\t\t\n\t\t\texecutor.execute(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString compressedRecord = compressRecord(bufferString) + \"\\n\";\n\t\t\t\t\t\trecordQueue.offer(compressedRecord);\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});\n\t\t\t\n\t\t}\n\n\t\tlatch.await();\n\t\tlong stop = System.currentTimeMillis();\n\t\tSystem.out.println(\"Compressed and written \" + sourceRecords + \" records in \" + (stop - start) + \" milliseconds\");\n\t\tfos.close();\n\t\tbr.close();\n\t}",
"public void flush() {\n\r\n int inflatedSize = buffer.position();\r\n deflator.setInput(buffer.getBuffer(), 0, inflatedSize);\r\n deflator.finish();\r\n int deflatedSize = deflator.deflate(compressionBuffer.array());\r\n deflator.reset();\r\n\r\n try {\r\n outputStream.writeInt(deflatedSize);\r\n outputStream.writeInt(inflatedSize);\r\n outputStream.write(compressionBuffer.array(), 0, deflatedSize);\r\n }\r\n catch (IOException e) {\r\n throw new RuntimeException(\"Failed to write compressed data to stream\", e);\r\n }\r\n\r\n buffer.clear();\r\n compressionBuffer.clear();\r\n }",
"@Override\n\t\tpublic void run() {\n\t\t\ttry{\n\t\t\tInputStream in = mySocket.getInputStream();\n DataInputStream clientData = new DataInputStream(in);\n\n String nameFile = clientData.readUTF();\n long size = clientData.readLong();\n \n OutputStream output = new FileOutputStream(nameFile);\n \n int bytesRead;\n byte[] buffer = new byte[1024];\n while (size > 0 && (bytesRead = clientData.read(buffer, 0, (int) Math.min(buffer.length, size))) != -1) {\n output.write(buffer, 0, bytesRead);\n size -= bytesRead;\n }\t\n\t\t\t}catch(IOException e){\n\t\t\t\t\n\t\t\t}\t\t\t\t\t\n\t\t}",
"public static final void copyInputStream(int bufferSize, InputStream in, OutputStream out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t int len;\r\n\r\n\t while((len = in.read(buffer)) >= 0)\r\n\t out.write(buffer, 0, len);\r\n\r\n\t \r\n\t in.close();\r\n\t out.flush();\r\n\t out.close();\r\n\t \r\n\t}",
"@Override\n\tpublic void pipeOutput() {\n\n\t}",
"public BlockInputStream(InputStream in) {\n\t\t\t// always use a buffered stream, even though we know how\n\t\t\t// much bytes to write/read, since this is just faster for\n\t\t\t// some reason\n\t\t\tsuper(new BufferedInputStream(in));\n\t\t}",
"private void run() throws InterruptedException, IOException {\n endpoint.getWcEvents().take();\n\n //process received data\n processRecv();\n\n for (int i=0; i < 1000000; i++) {\n //change data in remote memory\n writeData(i);\n\n //wait for writing remote memory to complete\n endpoint.getWcEvents().take();\n }\n System.out.println(\"ClientWrite::finished!\");\n }",
"public void useSnappyCompressFile(File in, File out) {\n\n FileInputStream fi = null;\n FileOutputStream fo = null;\n SnappyOutputStream sout = null;\n try {\n fi = new FileInputStream(in);\n fo = new FileOutputStream(out);\n sout = new SnappyOutputStream(fo);\n while (true) {\n int count = fi.read(BUFFER_SIZE, 0, BUFFER_SIZE.length);\n if (count == -1) {\n break;\n }\n sout.write(BUFFER_SIZE, 0, count);\n }\n sout.flush();\n } catch (IOException ex) {\n log.warn(\"compress file failed: {}\",ex.getMessage());\n ex.printStackTrace();\n } finally {\n IOUtils.closeQuietly(sout);\n IOUtils.closeQuietly(fi);\n IOUtils.closeQuietly(fo);\n }\n }",
"public void beginListenForData() {\n stopWorker = false;\n readBufferPosition = 0;\n try {\n inStream = btSocket.getInputStream();\n } catch (IOException e) {\n Log.d(TAG, \"Bug while reading inStream\", e);\n }\n Thread workerThread = new Thread(new Runnable() {\n public void run() {\n while (!Thread.currentThread().isInterrupted() && !stopWorker) {\n try {\n int bytesAvailable = inStream.available();\n if (bytesAvailable > 0) {\n byte[] packetBytes = new byte[bytesAvailable];\n inStream.read(packetBytes);\n for (int i = 0; i < bytesAvailable; i++) {\n // Log.d(TAG, \" 345 i= \" + i);\n byte b = packetBytes[i];\n if (b == delimiter) {\n byte[] encodedBytes = new byte[readBufferPosition];\n System.arraycopy(readBuffer, 0,\n encodedBytes, 0,\n encodedBytes.length);\n final String data = new String(\n encodedBytes, \"US-ASCII\");\n readBufferPosition = 0;\n handler.post(new Runnable() {\n public void run() {\n Log.d(TAG, \" M250 ingelezen data= \" + data);\n ProcesInput(data); // verwerk de input\n }\n });\n } else {\n readBuffer[readBufferPosition++] = b;\n }\n }\n } // einde bytesavalable > 0\n } catch (IOException ex) {\n stopWorker = true;\n }\n }\n }\n });\n workerThread.start();\n }",
"public static void main(String[] args) throws IOException {\n\t\tPipedOutputStream pout = new PipedOutputStream();\n\t\tPipedInputStream pin = new PipedInputStream();\n\t\tpout.connect(pin);\n\t\tpipeout po = new pipeout(pout);\n\t\tpipein pi = new pipein(pin);\n\t\tThread t1 = new Thread(po);\n\t\tThread t2 = new Thread(pi);\n\t\tt1.start();\n\t\tt2.start();\n\t}",
"public static final void duplicateStream(int bufferSize, InputStream in, OutputStream... out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t\tint len;\r\n\t\t\r\n\t while((len = in.read(buffer)) >= 0) {\r\n\t \tfor(OutputStream o : out)\r\n\t\t o.write(buffer, 0, len);\r\n\t }\r\n\t \r\n\t for(OutputStream o : out) {\r\n\t \to.flush();\r\n\t \to.close();\r\n\t }\r\n\t \r\n\t in.close();\r\n\t\t\r\n\t}",
"private void startStreams() {\n InputStream inputStream = process.getInputStream();\n bufferedInputStream = new BufferedReader(new InputStreamReader(inputStream));\n InputStream errorStream = process.getErrorStream();\n bufferedErrorStream = new BufferedReader(new InputStreamReader(errorStream));\n }",
"public StreamRedirectThread(final String name, final InputStream in, final OutputStream out) {\n\t\tsuper(name);\n\t\tthis.in = new InputStreamReader(in);\n\t\tthis.out = new OutputStreamWriter(out);\n\t\tsetPriority(Thread.MAX_PRIORITY-1);\n\t}",
"public void run() {\n byte[] buffer = new byte[1024];\n int bytes;\n while (true) {\n try {\n bytes = mmInStream.read(buffer);\n if (bytes > 0) {\n Log.i(tag, \" ConnectedThread got value: \" + buffer[0]);\n Buffer.write(buffer[0]);\n }\n\n } catch (IOException e) {\n Log.e(tag, \"IOException in ConnectedThread\");\n break;\n }\n }\n }",
"public void run() {\n try {\n DataInputStream in = new DataInputStream(new BufferedInputStream(s.getInputStream()));\n try {\n byte op = (byte) in.read();\n if (op == OP_WRITE_BLOCK) {\n writeBlock(in);\n } else if (op == OP_READ_BLOCK || op == OP_READSKIP_BLOCK ||\n op == OP_READ_RANGE_BLOCK) {\n readBlock(in, op);\n } else {\n while (op >= 0) {\n System.out.println(\"Faulty op: \" + op);\n op = (byte) in.read();\n }\n throw new IOException(\"Unknown opcode for incoming data stream\");\n }\n } finally {\n in.close();\n }\n } catch (IOException ie) {\n LOG.warn(\"DataXCeiver\", ie);\n } finally {\n try {\n xceiverCount.decr();\n LOG.debug(\"Number of active connections is: \"+xceiverCount);\n s.close();\n } catch (IOException ie2) {\n }\n }\n }",
"private StreamSource getZipSource(final File requestedDirectory) {\n StreamSource zippedDirSource = new StreamSource() {\n private static final long serialVersionUID = 7060525220398731933L;\n public InputStream getStream() {\n // Pipe bauen, um Steam als Download umzulenken\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 }\n };\n return zippedDirSource;\n }",
"public void uploadStream(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n {\n uploadStreamInternal(stageName, destPrefix, inputStream,\n destFileName, compressData);\n }",
"public void run() {\n\t try {\n\t in = new DataInputStream(fd.getInputStream());\n\t out = new DataOutputStream(fd.getOutputStream());\n\t\t \twhile (true){\n\t\t String s = in.readUTF();\n\t\t if(s==null) \n\t\t \tbreak;\n\t\t System.out.println(s);\n\t\t out.writeUTF(\"客户,你好,我是服务器\"+Thread.currentThread().getName());\n\t\t \t}\n\t\t \tSystem.out.println(\"in1:\"+in);\n\t \t\tin.close();\n\t \t\tSystem.out.println(\"in2:\"+in);\n\t \t\tout.close();\n\t \t}catch(IOException e) {\n\t \t\ttry {\n\t\t\t\t\tin.close();\n\t\t\t\t\tout.close();\n\t\t\t\t} catch (IOException 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\tSystem.out.println(\"ERROR:\"+e);\n\t \t}\n\t System.out.println(\"Exiting child thread.\");\n\t }",
"synchronized void receive(int preknownDataLength) throws EOFException, IOException {\n byte[] buffer = new byte[preknownDataLength];\n dataInput.readFully(buffer);\n pipedOutputStream.write(buffer);\n }",
"public PooledWebLog(InputStream in, OutputStream out, int numberOfThreads){\n this.in = new BufferedReader(new InputStreamReader(in));\n this.out = new BufferedWriter(new OutputStreamWriter(out));\n this.numberOfThreads = numberOfThreads;\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 }",
"public static byte[] compressBytes(byte[] data) {\n\t\t\tDeflater deflater = new Deflater();\n\t\t\tdeflater.setInput(data);\n\t\t\tdeflater.finish();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\twhile (!deflater.finished()) {\n\t\t\t\tint count = deflater.deflate(buffer);\n\t\t\t\toutputStream.write(buffer, 0, count);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toutputStream.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t\tSystem.out.println(\"Compressed Image Byte Size - \" + outputStream.toByteArray().length);\n\t\t\treturn outputStream.toByteArray();\n\t\t}",
"@Override\n\tpublic void Compress() {\n\t\t\n\t}",
"public static void copy(InputStream input, OutputStream output) throws IOException {\n try {\n byte[] buffer = new byte[GCSFetcher.BUFFER_SIZE];\n int bytesRead = input.read(buffer);\n while (bytesRead != -1) {\n output.write(buffer, 0, bytesRead);\n bytesRead = input.read(buffer);\n }\n } finally {\n input.close();\n output.close();\n }\n }",
"List<File> compress(File directory, int size);",
"public void run() {\n xmitsInProgress++;\n try {\n Socket s = new Socket();\n s.connect(curTarget, READ_TIMEOUT);\n s.setSoTimeout(READ_TIMEOUT);\n DataOutputStream out = new DataOutputStream(new BufferedOutputStream(s.getOutputStream()));\n try {\n long filelen = data.getLength(b);\n DataInputStream in = new DataInputStream(new BufferedInputStream(data.getBlockData(b)));\n try {\n //\n // Header info\n //\n out.write(OP_WRITE_BLOCK);\n out.writeBoolean(true);\n b.write(out);\n out.writeInt(targets.length);\n for (int i = 0; i < targets.length; i++) {\n targets[i].write(out);\n }\n out.write(RUNLENGTH_ENCODING);\n out.writeLong(filelen);\n\n //\n // Write the data\n //\n while (filelen > 0) {\n int bytesRead = in.read(buf, 0, (int) Math.min(filelen, buf.length));\n out.write(buf, 0, bytesRead);\n filelen -= bytesRead;\n }\n } finally {\n in.close();\n }\n } finally {\n out.close();\n }\n LOG.info(\"Transmitted block \" + b + \" to \" + curTarget);\n } catch (IOException ie) {\n LOG.warn(\"Failed to transfer \"+b+\" to \"+curTarget, ie);\n } finally {\n xmitsInProgress--;\n }\n }",
"private static void pipe(final Reader reader, final Writer writer)\n throws IOException {\n final char[] buf = new char[1024];\n int read = 0;\n while ((read = reader.read(buf)) >= 0) {\n writer.write(buf, 0, read);\n }\n writer.flush();\n }",
"public void run() {\n\t\ttry {\n\t\t\t// while (true) {\n\t\t\tos.writeUTF(strContent);\n\t\t\t// }\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void testChunkedOutputToChunkInput() throws Exception {\n final ChunkedInput<String> input = target().path(\"test\").request().get(new javax.ws.rs.core.GenericType<ChunkedInput<String>>() {});\n int counter = 0;\n String chunk;\n while ((chunk = input.read()) != null) {\n Assert.assertEquals((\"Unexpected value of chunk \" + counter), \"test\", chunk);\n counter++;\n } \n Assert.assertEquals(\"Unexpected numbed of received chunks.\", 3, counter);\n }",
"public void compress() {\r\n fCharBuffer.compress();\r\n fStyleBuffer.compress();\r\n fParagraphBuffer.compress();\r\n }",
"private void serviceGZipCompressed(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getContnentType().getMimeType());\n conn.getResponse().setHeader(\"Content-Encoding\", \"gzip\");\n conn.getOutputStream().write(gzipContent);\n }",
"public void start() {\n new Thread(new Runnable() {\n public void run() {\n while (true) {\n // TODO: we may want a way to stop the thread\n try {\n // block until a request arrives\n int x = in.take();\n // compute the answer and send it back\n int y = x * x;\n out.put(new SquareResult(x, y));\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }\n }\n }\n }).start();\n }",
"static protected byte[] readContent( InputStream in )\n \t{\n \t\tBufferedInputStream bin = in instanceof BufferedInputStream\n \t\t\t\t? (BufferedInputStream) in\n \t\t\t\t: new BufferedInputStream( in );\n \t\tByteArrayOutputStream out = new ByteArrayOutputStream( 1024 );\n \t\tbyte[] buffer = new byte[1024];\n \t\tint readSize = 0;\n \t\ttry\n \t\t{\n \t\t\treadSize = bin.read( buffer );\n \t\t\twhile ( readSize != -1 )\n \t\t\t{\n \t\t\t\tout.write( buffer, 0, readSize );\n \t\t\t\treadSize = bin.read( buffer );\n \t\t\t}\n \t\t}\n \t\tcatch ( IOException ex )\n \t\t{\n \t\t\tlogger.log( Level.SEVERE, ex.getMessage( ), ex );\n \t\t}\n \t\treturn out.toByteArray( );\n \t}",
"private static StringBuilder receiveInputStream(InputStream input) throws IOException{\r\n\t\tStringBuilder response = new StringBuilder();\r\n\t\tint i;\r\n\t\twhile((i = input.read())!= -1){//stock the inputstream\r\n\t\t\tresponse.append((char)i); \r\n\t\t}\r\n\t\treturn response;\r\n\t}",
"public OutputStream setStdInStream(int initialSize) throws IOException {\n\t\tif(stdInLatch.getCount()<1) {\n\t\t\treturn pipeOut;\n\t\t}\n\t\tpipeOut = new PipedOutputStream();\n\t\tpipeIn = new PipedInputStream(pipeOut, initialSize);\n\t\tstdInLatch.countDown();\n\t\tlog.debug(Banner.banner(\"Dropped Latch for STDIN Stream\"));\n\t\treturn pipeOut;\n\t}",
"private void uploadStreamInternal(String stageName,\n String destPrefix,\n InputStream inputStream,\n String destFileName,\n boolean compressData)\n throws SQLException\n {\n logger.debug(\"upload data from stream: stageName={}\" +\n \", destPrefix={}, destFileName={}\",\n stageName, destPrefix, destFileName);\n\n if (stageName == null)\n throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,\n ErrorCode.INTERNAL_ERROR.getMessageCode(),\n \"stage name is null\");\n\n if (destFileName == null)\n throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR,\n ErrorCode.INTERNAL_ERROR.getMessageCode(),\n \"stage name is null\");\n\n SnowflakeStatementV1 stmt = new SnowflakeStatementV1(this);\n\n StringBuilder putCommand = new StringBuilder();\n\n // use a placeholder for source file\n putCommand.append(\"put file:///tmp/placeholder \");\n\n // add stage name\n if (!stageName.startsWith(\"@\"))\n putCommand.append(\"@\");\n putCommand.append(stageName);\n\n // add dest prefix\n if (destPrefix != null)\n {\n if (!destPrefix.startsWith(\"/\"))\n putCommand.append(\"/\");\n putCommand.append(destPrefix);\n }\n\n putCommand.append(\" overwrite=true\");\n\n SnowflakeFileTransferAgent transferAgent = null;\n transferAgent = new SnowflakeFileTransferAgent(putCommand.toString(),\n sfSession, stmt.getSfStatement());\n\n transferAgent.setSourceStream(inputStream);\n transferAgent.setDestFileNameForStreamSource(destFileName);\n transferAgent.setCompressSourceFromStream(compressData);\n transferAgent.execute();\n\n stmt.close();\n }",
"public ReadThread (InputStream in)\n {\n this.in = in;\n this.start();\n }",
"public abstract Stream<E> streamBlockwise();",
"static Thread createBackgroundReader(final InputStream in, final OutputStream out) {\r\n\t\treturn new Thread() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tint c;\r\n\t\t\t\ttry {\r\n\t\t\t\t\twhile ((c = in.read()) != -1) {\r\n\t\t\t\t\t\tout.write(c);\r\n\t\t\t\t\t\tif (c == 10) {\r\n\t\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException ex) {\r\n\t\t\t\t\t// ignored\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"private List<byte[]> split(InputStream inStream, long size) throws IOException {\r\n\t\tList<byte[]> chunkList = new ArrayList<byte[]>();\r\n\t\tint totalBytesRead = 0;\r\n\t\ttry {\r\n\t\t\twhile (totalBytesRead < size) {\r\n\t\t\t\tbyte[] buffer = splitNextChunk(inStream, size, totalBytesRead);\r\n\t\t\t\ttotalBytesRead += buffer.length;\r\n\t\t\t\tchunkList.add(buffer);\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tinStream.close();\r\n\t\t}\r\n\t\treturn chunkList;\r\n\t}",
"public PipedOutputStream(PipedInputStream snk) throws IOException {\n connect(snk);\n }",
"Stream<In> getInputStream();",
"@Override public final void compute2() {\n assert _left == null && _rite == null && _res == null;\n if( _hi-_lo >= 2 ) { // Multi-chunk case: just divide-and-conquer to 1 chunk\n final int mid = (_lo+_hi)>>>1; // Mid-point\n _left = clone();\n _rite = clone();\n _left._hi = mid; // Reset mid-point\n _rite._lo = mid; // Also set self mid-point\n addToPendingCount(1); // One fork awaiting completion\n _left.fork(); // Runs in another thread/FJ instance\n _rite.compute2(); // Runs in THIS F/J thread\n return; // Not complete until the fork completes\n }\n // Zero or 1 chunks, and further chunk might not be homed here\n if( _hi > _lo ) { // Single chunk?\n Vec v0 = _fr.firstReadable();\n if( v0.chunkKey(_lo).home() ) { // And chunk is homed here?\n\n // Make decompression chunk headers for these chunks\n Chunk bvs[] = new Chunk[_fr._vecs.length];\n for( int i=0; i<_fr._vecs.length; i++ )\n if( _fr._vecs[i] != null )\n bvs[i] = _fr._vecs[i].elem2BV(_lo);\n\n // Call all the various map() calls that apply\n if( _fr._vecs.length == 1 ) map(bvs[0]);\n if( _fr._vecs.length == 2 && bvs[0] instanceof NewChunk) map((NewChunk)bvs[0], bvs[1]);\n if( _fr._vecs.length == 2 ) map(bvs[0], bvs[1]);\n if( _fr._vecs.length == 3 ) map(bvs[0], bvs[1], bvs[2]);\n if( true ) map(bvs );\n _res = self(); // Save results since called map() at least once!\n // Further D/K/V put any new vec results.\n for( Chunk bv : bvs )bv.close(_lo+_outputChkOffset,_fs);\n }\n }\n tryComplete(); // And this task is complete\n }",
"@Override\r\n\tprotected void process(List<String> chunks) {\r\n\t\tfor (String data: chunks) {\r\n\t\t\thandleData(data);\r\n\t\t}\r\n\t}",
"public void collectInputStreams(Process p, StringBuffer sbInput, StringBuffer sbError) {\n\n InputStreamThread input = new InputStreamThread(p.getInputStream(), sbInput);\n InputStreamThread error = new InputStreamThread(p.getErrorStream(), sbError);\n\n input.start();\n error.start();\n\n try {\n input.join();\n error.join();\n }\n catch (InterruptedException e) {\n }\n }",
"private DataInputStream readBuffer( DataInputStream in, int count ) throws IOException{\n byte[] buffer = new byte[ count ];\n int read = 0;\n while( read < count ){\n int input = in.read( buffer, read, count-read );\n if( input < 0 )\n throw new EOFException();\n read += input;\n }\n \n ByteArrayInputStream bin = new ByteArrayInputStream( buffer );\n DataInputStream din = new DataInputStream( bin );\n return din;\n }",
"public synchronized void run() {\n try {\n String data = in.readUTF();\n String response = FileRequestService.handleRequest(data, sharedWriteQueueService);\n out.writeUTF(response);\n System.out.println(\"server wrote:\" + response);\n } catch(EOFException e) {\n System.out.println(\"EOF:\" + e.getLocalizedMessage() + \" \" + e);\n } catch(IOException e) {\n System.out.println(\"IO:\" + e.getLocalizedMessage() + \" \" + e);\n } finally { \n try {\n clientSocket.close();\n } catch (IOException e){\n System.out.println(\"close:\" + e.getMessage());\n }\n }\n }",
"public void read() throws IOException {\n\t\twhile (this.in.getReadBytes() != size) {\n\t\t\tString chunkID;\n\t\t\ttry {\n\t\t\t\tchunkID = readString(4);\n\t\t\t} catch (EmptyReadException e) {\n\t\t\t\t/**\n\t\t\t\t * T4L bug 15259: Some encoders must write a byte \"0\" to signify\n\t\t\t\t * EOF?\n\t\t\t\t */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong chunkSize = readLong(4);\n\t\t\treadChunk(chunkID, chunkSize);\n\t\t}\n\t}",
"public BaseServerInputStream() {\n data = new ArrayDeque<IoBuffer>();\n marked = false;\n resetCache = null;\n }",
"public static void main(String[] args) throws IOException{\n\t\tSystem.exit((new BitCompresser()).run(args));\n\t}",
"@Override\n public void run() {\n super.run();\n final int READ_BUFFER_SIZE = 16384;\n byte[] buffer = new byte[READ_BUFFER_SIZE];\n int bytesRead;\n boolean stateProgress;\n\n // read loop\n while (!isInterrupted()) {\n try {\n bytesRead = inputStream.read(buffer);\n if (bytesRead == -1) {\n if (isInterrupted()) {\n Log.e(TAG,\"EOF reached, and thread is interrupted\");\n } else {\n Log.i(TAG,\"EOF reached, disconnecting!\");\n connectionLost();\n }\n return;\n }\n if (isInterrupted()) {\n Log.w(TAG,\"Read some data, but thread is interrupted\");\n return;\n }\n if(connectionSuccessful != null && connectionSuccessful == false){\n connectionSuccessful = true;\n }\n byte input;\n for(int i=0;i<bytesRead; i++){\n input=buffer[i];\n stateProgress = psm.handleByte(input);\n if(!stateProgress){//We are trying to weed through the bad packet info until we get something\n //Log.w(TAG, \"Packet State Machine did not move forward from state - \"+ psm.getState()+\". PSM being Reset.\");\n psm.reset();\n continue; //Move to the next iteration of the loop\n }\n\n if(psm.getState() == SdlPsm.FINISHED_STATE){\n synchronized (MultiplexUsbTransport.this) {\n //Log.d(TAG, \"Packet formed, sending off\");\n SdlPacket packet = psm.getFormedPacket();\n packet.setTransportRecord(getTransportRecord());\n handler.obtainMessage(SdlRouterService.MESSAGE_READ, packet).sendToTarget();\n }\n //Reset the PSM now that we have a finished packet.\n //We will continue to loop through the data to see if any other packet\n //is present.\n psm.reset();\n continue; //Move to the next iteration of the loop\n }\n }\n } catch (IOException e) {\n if (isInterrupted()) {\n Log.w(TAG,\"Can't read data, and thread is interrupted\");\n } else {\n Log.w(TAG,\"Can't read data, disconnecting!\");\n connectionLost();\n }\n return;\n } catch (Exception e){\n connectionLost();\n }\n }\n }",
"protected void runOverride() throws IOException,ClassNotFoundException {\n\t\twhile (running) {\n\t\t\twhile (running && !outQueue.isEmpty())\n\t\t\t\tgetOutputStream().writeObject(outQueue.dequeue());\n\t\t\twhile (running && getInputStream().read() > 0)\n\t\t\t\tinQueue.enqueue(getInputStream().readObject());\n\t\t}\n\t}",
"public void run()\n\t{\n\t\t// while we have this stream\n\t\twhile(m_keyboardStream != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// only if someone is requesting us to read do we do so...\n\t\t\t\tif (m_keyboardReadRequest)\n\t\t\t\t{\n\t\t\t\t\t// block on keyboard input and put it onto the end of the queue\n\t\t\t\t\tString s = m_keyboardStream.readLine();\n\t\t\t\t\tm_keyboardInput.add(s);\n\n\t\t\t\t\t// fullfilled request, now notify blocking thread.\n\t\t\t\t\tm_keyboardReadRequest = false;\n\t\t\t\t\tsynchronized(this) { notifyAll(); }\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ttry { Thread.sleep(50); } catch(InterruptedException ie) {}\n\t\t\t}\n\t\t\tcatch(IOException io)\n\t\t\t{\n//\t\t\t\tio.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public PipedOutputStream() {\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 }",
"static PipelineResult runIngestionPipeline(IngestionPipelineOptions options) {\n Pipeline pipeline = Pipeline.create(options);\n long startTime =\n IngestionPipelineOptions.calculatePipelineStart(\n options.getStartTime(), options.getDuration(), 1, Clock.systemUTC());\n PCollection<DataShare> dataShares =\n pipeline\n .apply(new FirestoreReader(startTime))\n // Ensure distinctness of data shares based on document path\n .apply(\n Distinct.<Document, String>withRepresentativeValueFn(\n // Not using a lambda here as Beam has trouble inferring a coder\n new SerializableFunction<Document, String>() {\n @Override\n public String apply(Document document) {\n return document.getName();\n }\n }))\n .apply(ParDo.of(new ConstructDataSharesFn()));\n processDataShares(dataShares).apply(\"SerializePacketHeaderSig\", ParDo.of(new BatchWriterFn()));\n return pipeline.run();\n }"
] | [
"0.57716584",
"0.5563795",
"0.5517943",
"0.54977995",
"0.5485879",
"0.54588205",
"0.5393867",
"0.53240764",
"0.5296495",
"0.52451336",
"0.52247036",
"0.522313",
"0.5187078",
"0.5155993",
"0.5143835",
"0.51176",
"0.51046443",
"0.51024425",
"0.5024808",
"0.50051683",
"0.4991574",
"0.4941302",
"0.49369523",
"0.49094063",
"0.49082702",
"0.4873018",
"0.48708376",
"0.48699948",
"0.4858903",
"0.4852104",
"0.48506507",
"0.47686183",
"0.47618493",
"0.47568268",
"0.47510582",
"0.47470814",
"0.47138914",
"0.47019485",
"0.47011447",
"0.4675404",
"0.46659163",
"0.4626178",
"0.4611482",
"0.4599512",
"0.45597854",
"0.4550825",
"0.45497343",
"0.45449728",
"0.4528436",
"0.44950345",
"0.44942206",
"0.4486127",
"0.44669235",
"0.4466588",
"0.44551465",
"0.44481546",
"0.4443817",
"0.4431256",
"0.4419798",
"0.44142964",
"0.44114593",
"0.44063148",
"0.43982294",
"0.43971404",
"0.43934456",
"0.4389955",
"0.4384936",
"0.43823442",
"0.43784174",
"0.437191",
"0.4368889",
"0.43619",
"0.43588775",
"0.43564433",
"0.43545178",
"0.43501523",
"0.43499395",
"0.43444818",
"0.4343908",
"0.43413895",
"0.43300176",
"0.43235236",
"0.4320485",
"0.431556",
"0.43155485",
"0.43136552",
"0.42998993",
"0.42936695",
"0.42855218",
"0.42853314",
"0.4280297",
"0.42756292",
"0.42686132",
"0.4259993",
"0.42456985",
"0.4239881",
"0.4231686",
"0.42257345",
"0.42225683",
"0.4213395"
] | 0.634461 | 0 |
replace one invalid XML char. Tests are done in order of most occurrences. | static public char replaceInvalid(char in) {
if(0x20 <= in && in <= 0xd7ff) return in;
if(in == 0x9 || in == 0xa || in == 0xd) return in;
if(0xe000 <= in && in <= 0xfffd) return in;
if(0x10000 <= in && in <= 0x10ffff) return in;
return '?';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String escapeInvalidXMLCharacters(String str) {\n StringBuffer out = new StringBuffer();\n final int strlen = str.length();\n final String substitute = \"\\uFFFD\";\n int idx = 0;\n while (idx < strlen) {\n final int cpt = str.codePointAt(idx);\n idx += Character.isSupplementaryCodePoint(cpt) ? 2 : 1;\n if ((cpt == 0x9) ||\n (cpt == 0xA) ||\n (cpt == 0xD) ||\n ((cpt >= 0x20) && (cpt <= 0xD7FF)) ||\n ((cpt >= 0xE000) && (cpt <= 0xFFFD)) ||\n ((cpt >= 0x10000) && (cpt <= 0x10FFFF))) {\n out.append(Character.toChars(cpt));\n } else {\n out.append(substitute);\n }\n }\n return out.toString();\n }",
"private String removeNonValidXMLCharacters(String description) {\r\n StringBuilder output = new StringBuilder();\r\n char current;\r\n\r\n if (description == null || description.compareTo(\"\") == 0) {\r\n return \"\";\r\n }\r\n \r\n for (int i = 0; i < description.length(); i++) {\r\n current = description.charAt(i);\r\n \r\n if ((current == 0x9) || (current == 0xA) || (current == 0xD) ||\r\n ((current >= 0x20) && (current <= 0xD7FF)) ||\r\n ((current >= 0xE000) && (current <= 0xFFFD)) ||\r\n ((current >= 0x10000) && (current <= 0x10FFFF))) {\r\n \r\n output.append(current);\r\n } else {\r\n output.append(' ');\r\n }\r\n }\r\n \r\n return output.toString();\r\n }",
"public String stripBadXMLCharacters( String xml , String rep )\r\n\t{\r\n\t\tStringBuffer result\t= new StringBuffer();\r\n\r\n\t\tint codePoint;\r\n\r\n\t\tif ( ( xml != null ) && ( xml.length() > 0 ) )\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\r\n\t\t\twhile ( i < xml.length() )\r\n\t\t\t{\r\n\t \t\tcodePoint\t= xml.codePointAt( i );\r\n\r\n\t\t\t\tif\t(\t( codePoint == 0x9 ) ||\r\n\t\t\t\t\t\t( codePoint == 0xA ) ||\r\n\t\t\t\t\t\t( codePoint == 0xD ) ||\r\n\t\t\t\t\t\t( ( codePoint >= 0x20 ) && ( codePoint <= 0xD7FF ) ) ||\r\n\t\t\t\t\t\t( ( codePoint >= 0xE000 ) && ( codePoint <= 0xFFFD ) ) ||\r\n\t\t\t\t\t\t( ( codePoint >= 0x10000 ) && ( codePoint <= 0x10FFFF ) )\r\n\t\t\t\t\t)\r\n\t\t\t\t{\r\n\t\t\t\t\tresult.append( Character.toChars( codePoint ) );\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tresult.append( rep );\r\n\t\t\t\t}\r\n\r\n\t\t\t\ti += Character.charCount( codePoint );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result.toString();\r\n\t}",
"@Test\n public void testReplacingFailure()\n {\n String expectedValue=\"datly fry\",actualValue;\n actualValue=replaceingchar.replaceChar(inputString);\n assertNotEquals(expectedValue,actualValue);\n }",
"public static String stripNonValidXMLCharacters(String in) {\n\t\tfinal StringBuffer out = new StringBuffer();\n\t\tchar current;\n\t\tif (in == null || (\"\".equals(in)))\n\t\t\treturn \"\";\n\t\tfor (int i = 0; i < in.length(); i++) {\n\t\t\tcurrent = in.charAt(i);\n\t\t\tif (current == 0x0)\n\t\t\t\tSystem.err.println(\"WARNING: FOUND 0x0 char on index \" + i);\n\t\t\t// eliminiamo in particolare 0x0\n\t\t\tif ((current == 0x9) || (current == 0xA) || (current == 0xD) || ((current >= 0x20) && (current <= 0xD7FF)) || ((current >= 0xE000) && (current <= 0xFFFD)) || ((current >= 0x10000) && (current <= 0x10FFFF)))\n\t\t\t\tout.append(current);\n\t\t}\n\t\treturn out.toString();\n\t}",
"public static String stripNonValidXMLCharacters(String in) {\n if ((in == null) || in.isEmpty()) {\n return \"\"; // vacancy test.\n }\n StringBuilder out = new StringBuilder(in.length()); // Used to hold the output.\n for (int i = 0; i < in.length(); i++) {\n char current = in.charAt(i); // Used to reference the current character.\n // NOTE: No IndexOutOfBoundsException caught here; it should not happen.\n if ((current == 0x9) ||\n (current == 0xA) ||\n (current == 0xD) ||\n ((current >= 0x20) && (current <= 0xD7FF)) ||\n ((current >= 0xE000) && (current <= 0xFFFD)) ||\n ((current >= 0x10000) && (current <= 0x10FFFF)))\n {\n out.append(current);\n }\n }\n return out.toString();\n }",
"private static final boolean isValidXMLChar(int c)\r\n\t {\r\n\t\t \r\n\t\t switch (c)\r\n\t\t {\r\n\t\t case 0x9:\r\n\t\t case 0xa: // line feed, '\\n'\r\n\t\t case 0xd: // carriage return, '\\r'\r\n\t\t return true;\r\n\r\n\t\t default:\r\n\t\t break;\r\n\t\t }\r\n\t\t if(c >= 0x20 && c <= 0xd7ff ) {\r\n\t\t\t \r\n\t\t }\r\n\t\t else if (c > 0xe000 && c <= 0xfffd) {\r\n\t\t\t \r\n\t\t }\r\n\t\t else if( c > 0x10000 && c <= 0x10ffff) {\r\n\t\t\t \r\n\t\t }\r\n\t\t else {\r\n\t\t\t return false;\r\n\t\t }\r\n\t\t return true;\r\n\t \r\n\t }",
"@Test\n\tpublic void testSpecialChars() {\n\t\tString ff = XStreamUtils.serialiseToXml(\"Form feed: \\f\");\n\t\tSystem.out.println(ff);\n\t\tObject s = XStreamUtils.serialiseFromXml(\"<S></S>\");\n\t\tSystem.out.println(ff);\n\t}",
"private void handleNCRValue(int value, boolean inAttribute)\n throws SAXException, IOException {\n if (value >= 0x80 && value <= 0x9f) {\n /*\n * If that number is one of the numbers in the first column of the\n * following table, then this is a parse error.\n */\n err(\"A numeric character reference expanded to the C1 controls range.\");\n /*\n * Find the row with that number in the first column, and return a\n * character token for the Unicode character given in the second\n * column of that row.\n */\n char[] val = Entities.WINDOWS_1252[value - 0x80];\n emitOrAppend(val, inAttribute);\n return;\n } else if (value == 0x0D) {\n err(\"A numeric character reference expanded to carriage return.\");\n emitOrAppend(LF, inAttribute);\n return;\n } else if (value == 0) {\n /*\n * Otherwise, if the number is zero, if the number is higher than\n * 0x10FFFF, or if it's one of the surrogate characters (characters\n * in the range 0xD800 to 0xDFFF), then this is a parse error;\n * return a character token for the U+FFFD REPLACEMENT CHARACTER\n * character instead.\n */\n err(\"Character reference expands to U+0000.\");\n emitOrAppend(REPLACEMENT_CHARACTER, inAttribute);\n return;\n } else if ((contentSpacePolicy != XmlViolationPolicy.ALLOW)\n && (value == 0xB || value == 0xC)) {\n if (contentSpacePolicy == XmlViolationPolicy.ALTER_INFOSET) {\n emitOrAppend(SPACE, inAttribute);\n } else if (contentSpacePolicy == XmlViolationPolicy.FATAL) {\n fatal(\"A character reference expanded to a space character that is not legal XML 1.0 white space.\");\n }\n } else if ((value & 0xF800) == 0xD800) {\n err(\"Character reference expands to a surrogate.\");\n emitOrAppend(REPLACEMENT_CHARACTER, inAttribute);\n return;\n } else if (value <= 0xFFFF) {\n /*\n * Otherwise, return a character token for the Unicode character\n * whose code point is that number.\n */\n char c = (char) value;\n if (c < '\\t' || (c > '\\r' && c < ' ') || isNonCharacter(c)) {\n if (contentNonXmlCharPolicy != XmlViolationPolicy.FATAL) {\n if (contentNonXmlCharPolicy == XmlViolationPolicy.ALTER_INFOSET) {\n c = '\\uFFFD';\n }\n warn(\"Character reference expanded to a character that is not a legal XML 1.0 character.\");\n } else {\n fatal(\"Character reference expanded to a character that is not a legal XML 1.0 character.\");\n }\n }\n if (isPrivateUse(c)) {\n warnAboutPrivateUseChar();\n }\n bmpChar[0] = c;\n emitOrAppend(bmpChar, inAttribute);\n return;\n } else if (value <= 0x10FFFF) {\n if (isNonCharacter(value)) {\n warn(\"Character reference expands to an astral non-character.\");\n }\n if (isAstralPrivateUse(value)) {\n warnAboutPrivateUseChar();\n }\n astralChar[0] = (char) (LEAD_OFFSET + (value >> 10));\n astralChar[1] = (char) (0xDC00 + (value & 0x3FF));\n emitOrAppend(astralChar, inAttribute);\n return;\n } else {\n err(\"Character reference outside the permissible Unicode range.\");\n emitOrAppend(REPLACEMENT_CHARACTER, inAttribute);\n return;\n }\n }",
"private String avoidErrorChar (String original) {\n\t\tStringBuffer modSB = new StringBuffer();\n\t\tfor (int j=0; j < original.length(); j++) {\n\t\t\tchar c = original.charAt(j);\n\t\t\tif (c == '\\n') {\n\t\t\t\tmodSB.append(\"\\\\n\"); // rimpiazzo il ritorno a capo con il simbolo \\n\n\t\t\t} else if (c == '\"') {\n\t\t\t\tmodSB.append(\"''\"); // rimpiazzo le doppie virgolette (\") con due apostofi ('')\n\t\t\t} else if ((int)c > 31 || (int)c !=127){ // non stampo i primi 32 caratteri di controllo\n\t\t\t\tmodSB.append(c);\n\t\t\t}\n\t\t}\n\t\treturn modSB.toString();\n\t}",
"@Test\n public void testReplacingSuccess()\n {\n String expectedValue=\"fatly fry\",actualValue;\n actualValue=replaceingchar.replaceChar(inputString);\n assertEquals(expectedValue,actualValue);\n }",
"@Test(timeout = 4000)\n public void test031() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n char char0 = xPathLexer0.LA(1073);\n assertEquals('\\uFFFF', char0);\n }",
"@Test(timeout = 4000)\n public void test032() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"<\");\n xPathLexer0.consume((-1311));\n // Undeclared exception!\n try { \n xPathLexer0.whitespace();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"private static String removeInvalid(String str){\n char[] chrArr = str.toCharArray();\n int val = 0;\n for(int i = 0; i < chrArr.length; i++){\n if(chrArr[i] == '(') val ++;\n else if(chrArr[i] == ')') val --;\n if(val < 0) {\n chrArr[i] = '#';\n val = 0;\n }\n }\n val = 0;\n for(int i = chrArr.length - 1; i >= 0; i--){\n if(chrArr[i] == ')') val ++;\n else if(chrArr[i] == '(') val --;\n if(val < 0){\n chrArr[i] = '#';\n val = 0;\n }\n }\n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < chrArr.length; i++){\n if(chrArr[i] != '#') sb.append(chrArr[i]);\n }\n return sb.toString();\n}",
"@Test void testHexCharLiteralOutsideRangeFails() {\n final String sql = \"^_unicode'cg'^XCF\";\n final String expected = \"Unknown character set 'unicode'\";\n expr(sql).fails(expected);\n }",
"private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }",
"@Test\n public void testReplacingEmptyString()\n {\n String expectedValue=null,actualValue;\n actualValue=replaceingchar.replaceChar(\" \");\n assertEquals(expectedValue,actualValue);\n }",
"@Override\n\tpublic String strreplace(String str, char oldchar, char newchar) {\n\t\treturn null;\n\t}",
"private void validCharachter() throws DisallowedCharachter {\n if (!test.equals(\"X\") && !test.equals(\"O\")) {\n throw (new DisallowedCharachter());\n }\n }",
"public static String escapeXML(String value){\r\n\t\treturn FuzzyXMLUtil.escape(value, false);\r\n\t}",
"private String getReplacement(char c) {\n switch (c) {\n case '<':\n return \"lt\"; //$NON-NLS-1$\n case '>':\n return \"gt\"; //$NON-NLS-1$\n case '\"':\n return \"quot\"; //$NON-NLS-1$\n case '\\'':\n return \"apos\"; //$NON-NLS-1$\n case '&':\n return \"amp\"; //$NON-NLS-1$\n case '\\r':\n return \"#x0D\"; //$NON-NLS-1$\n case '\\n':\n return \"#x0A\"; //$NON-NLS-1$\n case '\\u0009':\n return \"#x09\"; //$NON-NLS-1$\n }\n return null;\n }",
"public void testInvalidTextValueWithBrokenUTF8() throws Exception\n {\n final byte[] input = readResource(\"/data/clusterfuzz-cbor-35979.cbor\");\n try (JsonParser p = MAPPER.createParser(input)) {\n assertToken(JsonToken.VALUE_STRING, p.nextToken());\n p.getText();\n fail(\"Should not pass\");\n } catch (StreamReadException e) {\n verifyException(e, \"Truncated UTF-8 character in Short Unicode Name (36 bytes)\");\n }\n\n }",
"@Override\n public void ignorableWhitespace(\n char[] chars, int start, int length\n ) throws SAXException {\n // ...\n }",
"public char getBadChar(){\n return badChar;\n }",
"static String eraseXML (StringBuffer fileTextWithXML) {\n\t\tboolean inTag = false;\n\t\tint length = fileTextWithXML.length();\n\t\tStringBuffer fileText = new StringBuffer();\n\t\tfor (int i=0; i<length; i++) {\n\t\t\tchar c = fileTextWithXML.charAt(i);\n\t\t\tif(c == '<') inTag = true;\n\t\t\tif (!inTag) fileText.append(c);\n\t\t\tif(c == '>') inTag = false;\n\t\t}\n\t\treturn fileText.toString();\n\t}",
"@Test(timeout = 4000)\n public void test043() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"F#VsZ=,K/\");\n xPathLexer0.consume((-3281));\n // Undeclared exception!\n try { \n xPathLexer0.mod();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"public char nextClean() throws JSONException {\n for(;;) {\n char c = this.next();\n if(c == 0 || c > ' ') {\n return c;\n }\n }\n }",
"@Override\n\tpublic void insertString(FilterBypass fb, int offset, String string, AttributeSet attr)\n\t\t\tthrows BadLocationException {\n\t\tif((fb.getDocument().getLength() + string.length()) <= MAX_NUMBER_DIGITS && string.matches(REGEX)) {\n\t\t\t//replace in string to append only characters that are digits \n\t\t\tfb.insertString(offset, string, attr);\n\t\t}else {\n\t\t\tToolkit.getDefaultToolkit().beep();\n\t\t}\n\t}",
"public static void convertIllegalToUnicode(Reader r, Writer w)\r\n\t throws IOException\r\n\t {\r\n\t\t \r\n\t\t BufferedReader in = new BufferedReader(r);\r\n\t\t PrintWriter out = new PrintWriter(new BufferedWriter(w));\r\n\t\t \r\n\t\t int c;\r\n\t\t while((c = in.read()) != -1) {\r\n\t\t if(!isValidXMLChar(c)) {\r\n\t\t \tString illegalCharacter = EFGProperties.getProperty(ILLEGALCHARACTER_TEXT);\r\n\t\t out.print(illegalCharacter);\r\n\t\t \t/*String hex = Integer.toHexString(c);\r\n\t\t switch (hex.length()) { \r\n\t\t case 1: out.print(\"\\\\u000\" + hex); break;\r\n\t\t case 2: out.print(\"\\\\u00\" + hex); break;\r\n\t\t case 3: out.print(\"\\\\u0\" + hex); break;\r\n\t\t default: out.print(\"\\\\u\" + hex); break;\r\n\t\t }*/\r\n\t\t }\r\n\t\t else {\r\n\t\t \t out.write(c);\r\n\t\t }\r\n\t\t }\r\n\t\t out.flush(); // flush the output buffer we create\r\n\r\n\t }",
"public static String createValidContent(final String string) {\n\t\treturn Strings.replace(string, XML_ENTITY_CHARS, XML_ENTITY_REPLACMENTS); //do the replacements for the special XML symbols and return the results\n\t}",
"public static String removeInvalidCharacteres(String string) {\n\t\tString corretString = string;\n\t\tif (containsInvalidCharacterInLogin(string)) {\n\t\t\tString regex = \"[|\\\"&*=+'@#$%\\\\/?{}?:;~<>,\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D8\\u0152\\u00DE\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u0178\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F8\\u0153\\u00DF\\u00FE\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FF]\";\n\t\t\tPattern p = Pattern.compile(regex);\n\t\t\tMatcher m = p.matcher(string);\n\t\t\tcorretString = m.replaceAll(\"\");\n\t\t\t//System.out.println(corretString);\n\t\t}\n\t\t\n\t\tcorretString = corretString.replace(\"\\\\\", \"\");\n\t\t\n\t\treturn corretString;\n\t}",
"private void flushChars() throws SAXException, IOException {\n if (cstart != -1) {\n if (pos > cstart) {\n int currCol = col;\n int currLine = line;\n col = colPrev;\n line = linePrev;\n try {\n tokenHandler.characters(buf, cstart, pos - cstart);\n } finally {\n col = currCol;\n line = currLine;\n }\n }\n }\n cstart = -1;\n }",
"@Test(timeout = 4000)\n public void test045() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-1));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"@Test\n public void shouldCollapseAllDigitsByX(){\n Assert.assertThat(\"match any digits\",CharMatcher.DIGIT.replaceFrom(\"123TT T4\",\"x\"),is(\"xxxTT Tx\"));\n Assert.assertThat(\"match any digits\",CharMatcher.DIGIT.or(CharMatcher.WHITESPACE).replaceFrom(\"123TT T4\", \"x\"),is(\"xTTxTx\"));\n }",
"private static void testBadChars() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTEST BAD CHARS: BAD CHARS ON LINES 1-5\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inBadChars\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inBadChars not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\tif (token.sym != sym.EOF) {\n\t System.err.println(\"ERROR TESTING BAD CHARS: not at EOF\");\n\t}\n }",
"private CharSequence replacewithXUi(String Xuni, String myUi) {\n \ttry {\n JSONArray rule_array = new JSONArray(Xuni);\n int max_loop = rule_array.length();\n myUi = myUi.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myUi = myUi.replaceAll(from, to);\n myUi = myUi.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n \tmyUi = myUi.replace(\"\\uFFFF\\uFFFF\", \"null\");\n \n return myUi;\n\t\t\n\t}",
"protected String normalize(String s) \n{\n StringBuffer str = new StringBuffer();\n\n int len = (s != null) ? s.length() : 0;\n for (int i = 0; i < len; i++) \n {\n char ch = s.charAt(i);\n switch (ch) \n {\n case '<': \n {\n str.append(\"<\");\n break;\n }\n case '>': \n {\n str.append(\">\");\n break;\n }\n case '&': \n {\n str.append(\"&\");\n break;\n }\n case '\"': \n {\n str.append(\""\");\n break;\n }\n case '\\r':\n case '\\n': \n {\n if (canonical) \n {\n str.append(\"&#\");\n str.append(Integer.toString(ch));\n str.append(';');\n break;\n }\n // else, default append char\n }\n default: \n {\n str.append(ch);\n }\n }\n }\n\n return (str.toString());\n\n}",
"@Override\n public void replace(FilterBypass fb, int offset, int length, String text, AttributeSet attrs)\n throws BadLocationException {\n if (text.equals(last) && last.equals(\"^\")) {\n text = \"\";\n }\n last = text;\n super.replace(fb, offset, length, text, attrs);\n }",
"private boolean isAllowedXmlNodeNameChar(char keyCode){\n\t\treturn isAllowedXmlNodeNameStartChar(keyCode) || Character.isDigit(keyCode) || keyCode == '-' || keyCode == '_' || keyCode == '.';\n\t}",
"@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"@org.junit.Test\n public static final void testSupplementaryCodepointEncoding() {\n junit.framework.TestCase.assertEquals(\"冬 | 冬 | 冬\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSupplementaryCodepointEncoding()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"冬 | \\ud87e\\udc1a | ��\")));\n }",
"@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\t\n\t}",
"private void makeInvalidNode(final Document doc) {\n Element element;\n\n // create INVALID-textnode in DOM tree\n element = doc.createElement(\"mi\");\n element.setAttribute(\"mathcolor\", \"#F00\");\n element.appendChild(doc.createTextNode(\"#\"));\n\n if (this.getNode().getParentNode() == null) {\n doc.replaceChild(element, this.getNode());\n } else {\n this.getNode().getParentNode()\n .replaceChild(element, this.getNode());\n }\n\n // remove bi-subtree\n this.setNode(element);\n this.child = null;\n this.invalid = true;\n }",
"public final static void setInvalidFileChars(String invalidFileCharacters, String replacementCharacter) {\n\t\tinvalidFileChars = invalidFileCharacters;\n\n\t\tif (replacementChar != null) {\n\t\t\treplacementChar = replacementCharacter;\n\t\t}\n\t}",
"@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}",
"private static String validateHexStr(String hexStr) throws UnsignedBigIntUtilsException {\n String tmpStr = RegExp.replaceAll(\"[ \\\\|\\\\t\\\\n]+\", hexStr, \"\");\n tmpStr = RegExp.replaceFirst(\"0[xX]\", tmpStr, \"\");\n if (tmpStr.matches(\"[0-9a-fA-F]+\") == false) {\n String msg = \"ERROR: Invalid HEX characters in input => \" + tmpStr + \"\\n\";\n throw new UnsignedBigIntUtilsException(msg);\n }\n return (tmpStr);\n }",
"protected void baseCharacterCheck(final char c, final String parameter)\n throws IllegalArgumentException {\n if (Character.isISOControl(c) || !Character.isValidCodePoint(c)) {\n throw new IllegalArgumentException(\"Contains illegal character 0x\" +\n Integer.toHexString(c) + \": \" + parameter);\n }\n }",
"public void method1() {\n String s = \"\\uFE64\" + \"script\" + \"\\uFE65\";\n // Validate\n Pattern pattern = Pattern.compile(\"[<>]\"); // Check for angle brackets\n Matcher matcher = pattern.matcher(s);\n if (matcher.find()) {\n // Found black listed tag\n throw new IllegalStateException();\n } else {\n // ...\n }\n // Normalize\n s = Normalizer.normalize(s, Form.NFKC);\n }",
"@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}",
"private XMLParseException expectedInput(String charSet,\n int lineNr) {\n String msg = \"Expected: \" + charSet;\n return new XMLParseException(this.getTagName(), lineNr, msg);\n }",
"private String cleanTitle(String title) {\r\n return title.replace(\"<![CDATA[\", \"\").replace(\"]]>\", \"\");\r\n }",
"private String validateChar(String text) {\n char[] validChars = new char[text.length()];\n int validCount = 0;\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n boolean valid = (c >= 0x20 && c <= 0xd7ff) || (c >= 0xe000 && c <= 0xfffd);\n if (valid) {\n validChars[validCount++] = c;\n } else {\n if (c == 10) // LineBreak\n {\n validChars[validCount++] = c;\n }\n }\n }\n return new String(validChars, 0, validCount);\n }",
"public void addStrangeCharacter() {\n strangeCharacters++;\n }",
"@Override\r\n public void ignorableWhitespace(char[] ch, int start, int length)\r\n throws SAXException {\n }",
"public static String removeEscapeChar(String string)\t{\n\t\tint lastIndex = 0;\n\t\twhile (string.contains(\"&#\"))\n\t\t{\n\t\t\t//Get the escape character index\n\t\t\tint startIndex = string.indexOf(\"&#\", lastIndex);\n\t\t\tint endIndex = string.indexOf(\";\", startIndex);\n\n\t\t\t//and rip the sucker out of the string\n\t\t\tString escapeChar = string.substring(startIndex, endIndex);\n\n\t\t\t//Get the unicode representation and replace all occurrences in the string\n\t\t\tString replacementChar = convertEscapeChar(escapeChar);\n\t\t\tstring = string.replaceAll(escapeChar + \";\", replacementChar);\t\t\t\n\t\t\tlastIndex = endIndex;\n\t\t}\n\t\treturn string;\n\t}",
"private Token scanIllegalCharacter() {\n buffer.add(c);\n Token tok = new Token(buffer.toString(), TokenType.ILLEGAL, new Pair<>(in.line(), in.pos()));\n buffer.flush();\n c = in.read();\n return tok;\n }",
"protected void replaceText(CharSequence text) {\n/* 564 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test(timeout = 4000)\n public void test052() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":E<;\");\n xPathLexer0.consume((-5675));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"@Test\n\tpublic final void testHardZnak() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"6\", fldName, \"Obʺedinenie\");\n\t\tassertSingleResult(\"6\", fldName, \"Obedinenie\");\n\t\t// i have no idea if these should work, or how it should look here\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Oъedinenie\");\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Obъedinenie\");\n\t}",
"public static String convertCharacterToXml(Character character) {\r\n XStream xstream = new XStream(new DomDriver());\r\n return xstream.toXML(character);\r\n }",
"@Test(timeout = 4000)\n public void test051() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume((-3975));\n // Undeclared exception!\n try { \n xPathLexer0.dots();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"private void skipBadChar() throws IOException {\n while (!isValid()) {\n if (c == -1 || isSpace() || shouldStop()) {\n return;\n }\n c = r.read();\n }\n }",
"public String harmonizeXml(String xmlDoc) {\n\t\treturn xmlDoc.replace(\"\\r\", \"\").replace(\"\\n\", \"\").replace(\"\\t\", \"\").replaceAll(\"> *<\", \"><\").replaceAll(\"^ *\", \"\");\n\t}",
"public void deleteCharacter(){\n if(currentExp.length()>0){\n currentExp = currentExp.substring(0,currentExp.length()-1);\n calculationResult.onExpressionChange(currentExp,true);\n calculationResult.onExpressionChangeResult(\"\",true);\n }\n else{\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n }\n\n }",
"private String sanitizeSpecialChars(String value) {\n return value.replaceAll(\"[^a-zA-Z0-9_]\", \"_\");\n }",
"@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\">>yh88W0GKz~{herR\");\n xPathLexer0.consume((-2376));\n // Undeclared exception!\n try { \n xPathLexer0.identifier();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }",
"private String removeSpecialCharacters(String word)\n\t{\n\t\tString newString = \"\";\n\n\t\tfor (int i = 0; i < word.length(); i++)\n\t\t{\n\t\t\tif (word.charAt(i) != '?' && word.charAt(i) != '!' && word.charAt(i) != '\"' && word.charAt(i) != '\\''\n\t\t\t\t\t&& word.charAt(i) != '#' && word.charAt(i) != '(' && word.charAt(i) != ')' && word.charAt(i) != '$'\n\t\t\t\t\t&& word.charAt(i) != '%' && word.charAt(i) != ',' && word.charAt(i) != '&')\n\t\t\t{\n\t\t\t\tnewString += word.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn newString;\n\t}",
"public static String remove(String str){\n\t\tString str2 = str.trim();\n\t\tstr2 = str2.replaceAll(\"à|á|ả|ã|ạ|â|ầ|ấ|ẩ|ẫ|ậ|ằ|ắ|ẳ|ẵ|ặ|ă\", \"a\");\n\t\tstr2 = str2.replaceAll(\"í|ì|ỉ|ĩ|ị\",\"i\");\n\t\tstr2 = str2.replaceAll(\"ư|ứ|ừ|ử|ữ|ự|ú|ù|ủ|ũ|ụ\",\"u\");\n\t\tstr2 = str2.replaceAll(\"ế|ề|ể|ễ|ệ|é|è|ẻ|ẽ|ẹ|ê\",\"e\");\n\t\tstr2 = str2.replaceAll(\"ố|ồ|ổ|ỗ|ộ|ớ|ờ|ở|ỡ|ợ|ó|ò|ỏ|õ|ọ|ô|ơ\",\"o\");\n\t\tstr2= str2.replaceAll(\"ý|ỳ|ỷ|ỹ|ỵ\",\"y\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"Ấ|Ầ|Ẩ|Ẫ|Ậ|Ắ|Ằ|Ẳ|Ẵ|Ặ|Á|À|Ả|Ã|Ạ|Â|Ă\",\"A\");\n\t\tstr2 = str2.replaceAll(\"Í|Ì|Ỉ|Ĩ|Ị\",\"I\");\n\t\tstr2 = str2.replaceAll(\"Ứ|Ừ|Ử|Ữ|Ự|Ú|Ù|Ủ|Ũ|Ụ|Ư\",\"U\");\n\t\tstr2 = str2.replaceAll(\"Ế|Ề|Ể|Ễ|Ệ|É|È|Ẻ|Ẽ|Ẹ|Ê\",\"E\");\n\t\tstr2 = str2.replaceAll(\"Ố|Ồ|Ổ|Ô|Ộ|Ớ|Ờ|Ở|Ỡ|Ợ|Ó|Ò|Ỏ|Õ|Ọ|Ô|Ơ\",\"O\");\n\t\tstr2= str2.replaceAll(\"Ý|Ỳ|Ỷ|Ỹ|Ỵ\",\"Y\");\n\t\tstr2 = str2.replaceAll(\"đ\",\"d\");\n\t\tstr2 = str2.replaceAll(\"Đ\",\"D\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"ò\", \"\");\n\t\treturn str2;\n\t}",
"public void removeJunkOrUnwantedCharFromString() {\n\t\tString str = \"hello@#4kjk122\";\n\t\tstr = str.replaceAll(\"[^a-zA-z0-9]\", \"\");\n\t\t// if we don't put ^ in above statement it will remove a to z charac and numbers\n\t\tSystem.out.println(str);\n\t}",
"private static char unescapeNonASCIIChar(String str) {\n\t\treturn (char) Integer.parseInt(str.substring(2, 4), 16);\n\t}",
"@Override\n\tpublic void ignorableWhitespace(char ch[], int start, int length) throws SAXException {\n\t\ttry {\n\t\t\twriteEsc(ch, start, length, false);\n\t\t\tsuper.ignorableWhitespace(ch, start, length);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}",
"@Test\n\tpublic void TestR1NonIntegerParseableChars() {\n\t\tString invalid_solution = \"a74132865635897241812645793126489357598713624743526189259378416467251938381964572\";\n\t\tassertEquals(-1, sv.verify(invalid_solution));\n\t}",
"@Test(expected = SOAPFaultException.class)\n public void testReplaceStampseudonymWithInvalidOldHpgn() {\n eckIdServiceUtil.replaceStampseudonym(validHpgnNew, INVALID_HPGN, null);\n }",
"private void parseErrorUnlessPermittedSlash() throws SAXException,\n IOException {\n if (endTag) {\n err(\"Stray \\u201C/\\u201D in an end tag.\");\n return;\n }\n char c = read();\n if (c == '>') {\n if (!currentIsVoid() && !html4) {\n if (html4) {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is not permitted in HTML4.\");\n } else {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is only permitted on void elements.\");\n }\n } else if (html4) {\n err(\"Stray \\u201C/\\u201D in tag. The \\u201C/>\\u201D syntax is not permitted in HTML4. (HTML4-only error)\");\n }\n } else {\n err(\"Stray \\u201C/\\u201D in tag.\");\n }\n unread(c);\n }",
"CharSequenceConsumer cat(CharSequence chars) throws XPathException;",
"public final void replaceText(CharSequence charSequence) {\n if (this.f152273r) {\n super.replaceText(charSequence);\n }\n }",
"public String withoutX2(String str) {\r\n if (str.length() == 1 && str.charAt(0) == 'x') {\r\n return \"\";\r\n }\r\n if (str.length() >= 2) {\r\n if (str.charAt(0) == 'x' && str.charAt(1) != 'x') {\r\n return str.substring(1);\r\n } else if (str.charAt(0) != 'x' && str.charAt(1) == 'x') {\r\n return str.charAt(0) + str.substring(2);\r\n } else if (str.charAt(0) == 'x') {\r\n return str.substring(2);\r\n }\r\n }\r\n return str;\r\n }",
"public static String cleanString(String str) {\n if (str != null) {\n str = str.replaceAll(\"é\", \"é\");\n str = str.replaceAll(\"ê\", \"ê\");\n str = str.replaceAll(\"è\", \"è\");\n str = str.replaceAll(\"\\\"\", \"'\");\n str = str.replaceAll(\"°\", \"°\");\n str = str.replaceAll(\"ï\", \"ï\");\n str = str.replaceAll(\"ô\", \"ô\");\n str = str.replaceAll(\"à§\", \"ç\");\n str = str.replaceAll(\"Ã\", \"à\");\n str = str.replaceAll(\"Â\", \"\");\n }\n return str;\n }",
"private static int specialChar(char ch) {\n if ((ch > '\\u0621' && ch < '\\u0626') ||\n (ch == '\\u0627') ||\n (ch > '\\u062E' && ch < '\\u0633') ||\n (ch > '\\u0647' && ch < '\\u064A') ||\n (ch == '\\u0629')) {\n return 1;\n } else if (ch >= '\\u064B' && ch<= '\\u0652') {\n return 2;\n } else if (ch >= 0x0653 && ch <= 0x0655 ||\n ch == 0x0670 ||\n ch >= 0xFE70 && ch <= 0xFE7F) {\n return 3;\n } else {\n return 0;\n }\n }",
"@Override\n\t\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}",
"default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }",
"public static String sanitize(String input){\n\t\tinput.replaceAll(\"&\", \"&\");\n\t\tinput.replaceAll(\"<\", \"<\");\n\t\tinput.replaceAll(\">\", \">\");\n\t\tinput.replaceAll(\"/\", \"⁄\");\n\t\treturn input;\n\t}",
"final int invalid(final boolean incomplete, final byte... bytes) throws IOException {\n if(validate) {\n final TokenBuilder tb = new TokenBuilder();\n for(final int b : bytes) {\n if(!tb.isEmpty()) tb.add(\", \");\n final int c = b >> 4 & 0x0F, d = b & 0x0F;\n tb.add(c + (c > 9 ? '7' : '0')).add(d + (d > 9 ? '7' : '0'));\n }\n if(incomplete) tb.add(\", ??\");\n throw new DecodingException(\"Invalid \" + encoding + \" character encoding: \" + tb);\n }\n return Token.REPLACEMENT;\n }",
"@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }",
"@Test(expected = Inputfault.class)\r\n public void classCrashInvalidChar() throws Inputfault {\r\n LocationServiceImpl lSI = new LocationServiceImpl();\r\n\r\n lSI.locationService(\"3731@X\"); // this postcode has a @ which is an illegal character\r\n }",
"private String Escapar(String valorAtributo) {\r\n\tString str = valorAtributo;\r\n\t\r\n\tstr = valorAtributo.replaceAll(\"&\", \"&\");\r\n\tstr = str.replaceAll(\"'\", \"'\");\r\n\tstr = str.replaceAll(\"\\\"\", \""\");\r\n\tstr = str.replaceAll(\"<\", \"<\");\r\n\tstr = str.replaceAll(\">\", \">\");\r\n\t\r\n\treturn str;\r\n }",
"public void ignorableWhitespace (char ch[], int start, int length)\n throws SAXException\n {\n // no op\n }",
"@Test(timeout = 4000)\n public void test020() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":_]J_/L!uFQ7%)BrL\");\n Token token0 = xPathLexer0.literal();\n assertNull(token0);\n \n char char0 = xPathLexer0.LA((-1));\n assertEquals('r', char0);\n }",
"@Test\n public void shouldNotBeAbleToInputSpecialCharactersInTradeInValueField() {\n }",
"public void setNChar()\n/* */ {\n/* 1168 */ this.isNChar = true;\n/* */ }",
"public BinaryFormatException(int charPos, char badChar){\n super(\"Binary numbers consist only of 0's and 1's\");\n this.charPos = charPos;\n this.badChar = badChar;\n }",
"public String replaceNonPrintableCharacters(String dataValueToTranslate) {\n\t\tSystem.out.println(\"Replacing non-printable characters in [\" + dataValueToTranslate + \"] with [\" + replaceNonPrintableCharactersWith + \"]\");\n\t\tString dataValue = dataValueToTranslate;\n\t\tif (!dataValueToTranslate.isEmpty()) {\n\t\t\t//dataValueToTranslate.replaceAll(\"\\\\p{C}\", replaceNonPrintableCharactersWith);\n\t\t\tString nonBreakingSpace = \"\\u00A0\";\n\t\t\tdataValueToTranslate.replaceAll(nonBreakingSpace, replaceNonPrintableCharactersWith);\n\t\t}\n\t\treturn dataValue;\n\t}",
"private String clean_fields(String data) {\n\t\treturn data.replace(\"<\", \"\").replace(\">\", \"\");\n\t}",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n String string0 = SQLUtil.normalize(\"(ojYa^OO>#xm`'!\", false);\n assertEquals(\"(ojYa ^ OO > # xm ` '!'\", string0);\n }",
"@Test\n\tpublic final void testCircumflex() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"3400092\", fldName, \"ancêtres\");\n\t\tassertSingleResult(\"3400092\", fldName, \"ancetres\");\n\t}",
"public static String ungroupify(String text){\r\n return text.replaceAll(\"[\\\\sx]\", \"\");\r\n}",
"private CharSequence replacewithUni(String uni1, String myString2) {\n\t\ttry {\n JSONArray rule_array = new JSONArray(uni1);\n int max_loop = rule_array.length();\n\n myString2 = myString2.replace(\"null\", \"\\uFFFF\\uFFFF\");\n for (int i = 0; i < max_loop; i++) {\n JSONObject obj = rule_array.getJSONObject(i);\n String from = obj.getString(\"from\");\n String to = obj.getString(\"to\");\n myString2 = myString2.replaceAll(from, to);\n myString2 = myString2.replace(\"null\", \"\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\t\tmyString2 = myString2.replace(\"\\uFFFF\\uFFFF\", \"null\");\n return myString2;\n }",
"private String removeHTML(String word) {\r\n\t\tString result = \"\";\r\n\t\t\r\n\t\tString temp = null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<word.length();i++) {\r\n\t\t\tchar character = word.charAt(i);\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(word.charAt(i) == '<') {\r\n\t\t\t\tstartFlag = true;\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t//if < is found we don't add that text \r\n\t\t\tif(startFlag == true) {\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//System.out.println(word.charAt(i)+\" Removed\");\r\n\t\t\t\t//end bracket > found so we can continue to add now \r\n\t\t\t\tif(character == '>') {\r\n\t\t\t\t\tstartFlag = false;\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\t\r\n\t\t\t\tif(i == 0) {\t\t\t\t\r\n\t\t\t\t\tresult = Character.toString(character);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tresult += character;\r\n\t\t\t\t}\t\t\r\n\t\t\t\t\r\n\t\t\t}\t\t\t\t\r\n\t\t\t\r\n\t\t}\t\r\n\t\t\ttemp = result;\r\n\t\t\treturn temp;\t\t \r\n\t\t\r\n\t}",
"@BeforeEach\n\tvoid setUpInvalidRE(){\n\t\tinvalidRE= new String[lengthInvalid];\n\t\t// (ab\n\t\tinvalidRE[0] = \"(ab\";\n\t\t// ab)\n\t\tinvalidRE[1] = \"ab)\";\n\t\t// *\n\t\tinvalidRE[2] = \"*\";\n\t\t// ?\n\t\tinvalidRE[3] = \"?\";\n\t\t// +\n\t\tinvalidRE[4] = \"+\";\n\t\t// a | b | +c\n\t\tinvalidRE[5] = \"a | b | +c\";\n\t\t// a | b | *c\n\t\tinvalidRE[6] = \"a | b | *c\";\n\t\t// a | b | ?c\n\t\tinvalidRE[7] = \"a | b | ?c\";\n\t\t// a | b | | c\n\t\tinvalidRE[8] = \"a | b | | c\";\n\t\t// uneven parenthesis\n\t\tinvalidRE[9] = \"(a(b(c(d)*)+)*\";\n\t\t// a | b |\n\t\tinvalidRE[10] = \"a | b | \";\n\t\t// invalid symbols\n\t\tinvalidRE[11] = \"a | b | $ | -\";\n\t\t// (*)\n\t\tinvalidRE[12] = \"(*)\";\n\t\t// (|a)\n\t\tinvalidRE[13] = \"(|a)\";\n\t\t// (.b)\n\t\tinvalidRE[14] = \"(.b)\";\n\t}"
] | [
"0.6706371",
"0.66625917",
"0.6461096",
"0.6340767",
"0.6284995",
"0.60566145",
"0.5980825",
"0.58914554",
"0.5807166",
"0.5752449",
"0.5530037",
"0.55114126",
"0.5511147",
"0.54467887",
"0.5412471",
"0.53867346",
"0.53838205",
"0.5341788",
"0.5308404",
"0.5306462",
"0.52887905",
"0.52859116",
"0.52527344",
"0.5249493",
"0.52283084",
"0.5219778",
"0.52176774",
"0.51990557",
"0.5191941",
"0.51807773",
"0.518033",
"0.51761687",
"0.5171187",
"0.51680017",
"0.516796",
"0.51612425",
"0.5140823",
"0.51359665",
"0.51223266",
"0.51194876",
"0.5113727",
"0.51076645",
"0.5105857",
"0.50863826",
"0.5086015",
"0.5085104",
"0.50844175",
"0.5073414",
"0.5063682",
"0.50381756",
"0.5025279",
"0.5022543",
"0.50176096",
"0.5008317",
"0.49974132",
"0.49922153",
"0.4987959",
"0.49857756",
"0.497979",
"0.4962901",
"0.49378884",
"0.493628",
"0.49129018",
"0.49028948",
"0.490232",
"0.4892543",
"0.48917735",
"0.4885159",
"0.48797804",
"0.4879437",
"0.48793846",
"0.48789644",
"0.48757714",
"0.48750138",
"0.4874197",
"0.48574334",
"0.4850813",
"0.4839727",
"0.48378703",
"0.48377523",
"0.4836973",
"0.48360774",
"0.4835569",
"0.48249593",
"0.4823854",
"0.48206294",
"0.4813304",
"0.48067695",
"0.48041314",
"0.48012358",
"0.4800503",
"0.47907442",
"0.47878066",
"0.47852653",
"0.47797814",
"0.47796363",
"0.4778908",
"0.47711915",
"0.4769311",
"0.47690147"
] | 0.6492365 | 2 |
Find max long value in a list of longs | static public long max(long... values) {
long maxValue = Long.MIN_VALUE;
for(long value : values)
if(value > maxValue) maxValue = value;
return maxValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int findMaxValue(List<Integer> list) {\n int max = list.get(0);\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i) > max) {\n max = list.get(i);\n }\n }\n return max;\n }",
"public static long GetMax(Collection<Long> collection) {\n return Collections.max(collection);\n }",
"public long getMaximumLong() {\n/* 233 */ return this.max;\n/* */ }",
"public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }",
"static public long max(long[] valarray) {\r\n long max = 0;\r\n for (long i : valarray) {\r\n if (i > max)\r\n max = i;\r\n }\r\n return max;\r\n }",
"public static long getMaxLongValueForNumBits(int i) {\n\n if (i >= 64)\n throw new RuntimeException(\"Number of bits exceeds Java long.\");\n else\n return maxValueCache[i];\n\n }",
"private int max(List<Integer> list) {\n int max = list.get(0);\n for (Integer item : list) {\n if (item > max) {\n max = item;\n }\n }\n return max;\n }",
"public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }",
"public static void maxEl2(List<Integer> list){\n int max = list.\n stream().\n reduce(Integer.MIN_VALUE,(x,y)->x>y ? x : y);\n System.out.println(max);\n }",
"public static int maxEl1(List<Integer> list){\n Collections.sort(list);\n int max = list.get(list.size()-1);\n return max;\n }",
"public int findMax() {\n\t\tint max = (int)data.get(0);\n\t\tfor (int count = 1; count < data.size(); count++)\n\t\t\tif ( (int)data.get(count) > max)\n\t\t\t\tmax = (int)data.get(count);\n\t\treturn max;\n\t}",
"private <T extends Number> T computeMax(final Collection<T> inputCollection) {\n\r\n\t\tT res = null;\r\n\r\n\t\tif (!inputCollection.isEmpty())\r\n\t\t\tfor (final T t : inputCollection)\r\n\t\t\t\tif (res == null || res.longValue() < t.longValue())\r\n\t\t\t\t\tres = t;\r\n\r\n\t\treturn res;\r\n\t}",
"public static void maxWithSort(List<Integer> list){\n Optional<Integer> max = list.stream().sorted().reduce((x, y)->y);\n System.out.println(max);\n }",
"public static int getMax(List<Integer> list) {\n int max = Integer.MIN_VALUE;\n for (int i = 0; i != list.size(); ++i) {\n if (list.get(i) > max)\n max = list.get(i);\n }\n return max;\n }",
"private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }",
"public long getMaximum() {\n\t\treturn this._max;\n\t}",
"public static void main(String[] args) {\n int[] numbers = new int[] {-556487956, -1476200375, 8, -3 ,11};\n System.out.println(findLongest(numbers));\n }",
"public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}",
"public long peekLongCoord(long max) throws IOException {\n if (1 >= max) return 0;\n int bits = 1 + (int) Math.ceil(Math.log(max) / Math.log(2));\n Bits peek = this.peek(bits);\n double divisor = 1 << peek.bitLength;\n long value = (int) (peek.toLong() * ((double) max) / divisor);\n assert (0 <= value);\n assert (max >= value);\n return value;\n }",
"public long readBoundedLong(final long max) throws IOException {\n final int bits = 0 >= max ? 0 : (int) (Math.floor(Math.log(max) / Math.log(2)) + 1);\n return 0 < bits ? this.read(bits).toLong() : 0;\n }",
"public int maxValue(List<List<Integer>> positions) {\n int value = 0;\n for (final List<Integer> values : positions) {\n final int temp = Collections.max(values).intValue();\n if (temp > value) {\n value = temp;\n }\n }\n return value;\n }",
"public static void main(String[] args) {\n long[] salaries= {120000, 85000, 95000, 145000};\n\n for(long eachSalary : salaries){\n System.out.println(eachSalary);\n }\n\n long max=salaries[0];\n for (int i = 0; i <salaries.length ; i++) {\n if(salaries[i]>max);\n max=salaries[i];\n }\n System.out.println(\"max = \" + max);\n\n\n }",
"private long findMaxId() {\n\t\tlong max = 0;\n\t\tfor (Block block : this.getBlockCollection()) {\n\t\t\tif (block.getId() > max) {\n\t\t\t\tmax = block.getId();\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public Long getMaximum() {\r\n\t\treturn maximum;\r\n\t}",
"public static <V extends Comparable<? super V>> V maxValueKey(List<V> list)\n\t{\n\t\tCollections.sort(list);\n\t\treturn list.get(list.size() - 1);\n\t}",
"private static @Nullable Integer commonMax(List<ArgumentCount> counts) {\n // max=5, max=3, max=0 -> max=5\n // max=5, max=3, max=0, max=null -> max=null\n int commonMax = Integer.MIN_VALUE;\n for (ArgumentCount count : counts) {\n final Optional<Integer> max = count.getMaxCount();\n if (!max.isPresent()) {\n return null;\n }\n commonMax = Math.max(commonMax, max.get());\n }\n if (commonMax == Integer.MIN_VALUE) {\n return null;\n }\n return commonMax;\n }",
"public long getMaxTime(){\n long max;\n if(myPlaces_ra != null){\n // max variable set to the first time element in the array\n max = myPlaces_ra.get(0).getTime();\n\n for (int i = 0; i < myPlaces_ra.size(); i++) {\n //compare if the current is bigger than the one hold in the max variable\n if(myPlaces_ra.get(i).getTime() > max ){\n max = myPlaces_ra.get(i).getTime();\n\n }\n }\n Log.d(TAG, \"getMaxTime: \" + max);\n\n }else{\n Log.d(TAG, \"array is empty\");\n max = -1;\n return max;\n }\n return max;\n\n }",
"public static Object findLongestWord(List<String> words) {\n\t\tint longString = 0;\n\t\tString s= \"\";\n\t\tfor (int i = 0; i < words.size(); i++) {\n\t\t\tif (words.get(i).length()>longString) {\n\t\t\tlongString=words.get(i).length();\n\t\t\t\n\t\t\ts = words.get(i);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn s;\n\t\t//return null;\n\t}",
"public int findMaxValue() {\n\t\treturn findMaxValue( this );\n\t}",
"public static void main(String[] args) {\n\r\n\t\tlong ln= 6008514751431L;\r\n\t\tint max=0;\r\n\t\tfor (int i=2; i<= ln;i++)\r\n\t\t\twhile (ln % i == 0)\r\n\t\t\t{\r\n\t\t\t\tif(i>max)\r\n\t\t\t\tmax=i;\r\n\t\t\t\tln/=i;\r\n\t\t\t}\t\r\n\t\tSystem.out.println(\"the greatest prime factor of the given number is :\"+max);\r\n\t\t}",
"public static void main(String[] args) {\n List<Integer> arr = Util.integers;\n int length = arr.size();\n int max = arr.get(0);\n int tem;\n for (int i = 0; i < length; i++) {\n tem = arr.get(i);\n if (max < tem) {\n max = tem;\n }\n }\n System.out.println(max);\n }",
"E maxVal();",
"public static long stockmax(List<Integer> prices) {\n\t\t// Write your code here\n\t\tlong profit=0L;\n\t\tlong maxSoFar=0L;\n\t\t for (int i = prices.size() - 1; i > -1 ; i--) {\n\t if (prices.get(i) >= maxSoFar) {\n\t maxSoFar = prices.get(i);\n\t }\n\t profit += maxSoFar - prices.get(i);\n\t }\n\t return profit;\n\t}",
"public static int get_max(Integer[] a){\n int max = Integer.MIN_VALUE;\n\n for (int i = 0; i < a.length; i++){\n if (a[i] > max);\n max = a[i];\n }\n return max;\n }",
"static int max(int ropeLen) {\n\t\tint[] dp = new int[ropeLen + 1];\n\t\tdp[0] = 1;\n\t\tfor (int i = 1; i <= ropeLen; i++) {\n\t\t\tint max = Integer.MIN_VALUE;\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tmax = Math.max(max, dp[j] * (i - j));\n\t\t\t}\n\t\t\tdp[i] = max;\n\t\t}\n\t\treturn dp[ropeLen];\n\t}",
"public long getMax() {\n return m_Max;\n }",
"public int getMax(){ //find the max Score\n\t\tint max = Integer.MIN_VALUE;\n\t for(int i=0; i<scoreList.size(); i++){\n\t if(scoreList.get(i) > max){\n\t max = scoreList.get(i);\n\t }\n\t }\n\t return max;\n\t}",
"private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }",
"private static int getMaxChildVal(ArrayList<MMT> childLst){\n\t\t//assign values first\n\t\tfor (MMT tree: childLst){\n\t\t\tif(tree.value == null)\n\t\t\t\ttree.value = getValue(tree);\n\t\t}\n\t\t//now get max child val\n\t\tint max = childLst.get(0).value;\n\t\tfor (int i=1; i<childLst.size(); i++){\n\t\t\tif (childLst.get(i).value > max)\n\t\t\t\tmax = childLst.get(i).value;\n\t\t}\n\t\treturn max;\n\t}",
"long getMaxItemFindings();",
"public static int findLargest(ArrayList<Integer> numbers){ \r\n\t\tint largest = numbers.get(0); \r\n\t\tfor(int s : numbers){ \r\n\t\t\tif(s > largest){ \r\n\t\t\t\tlargest = s; \r\n\t\t\t} \r\n\t\t} \r\n\t\treturn largest;\r\n\t}",
"@Override\n public Long findMAX() {\n\n StringBuffer sql = new StringBuffer(\"select max(magoithau) from goithau\");\n Query query = entityManager.createNativeQuery(sql.toString());\n return Long.parseLong(query.getSingleResult().toString()) ;\n }",
"protected String getMaxValue(HashSet<String> set) {\n\t\tLong max = Long.MIN_VALUE;\n\t\tint count = 0;\n\n\t\tfor (String bound : set) \n\t\t\tif (bound.equals(\"+Inf\"))\n\t\t\t\treturn \"+Inf\";\n\t\t\telse if (bound.equals(\"-Inf\")) \n\t\t\t\tcount++;\n\t\t\telse if (Long.parseLong(bound) > max)\n\t\t\t\tmax = Long.parseLong(bound);\n\n\t\treturn count == 4 ? \"-Inf\" : String.valueOf(max);\n\t}",
"@SafeVarargs\n\tpublic static <E extends Comparable<E>> E findMaximum(E ...items) {\n\t\tE maximum = items[0];\n\t\tfor (E iter : items) {\n\t\t\tif (maximum.compareTo(iter) < 0)\n\t\t\t\tmaximum = iter;\n\t\t}\n\t\tprintMax(maximum, items);\n\t\treturn maximum;\n\t}",
"@Test\n public void findLargest_passListIntegers_returnLargestInteger() {\n Integer output = Java8Streams.findLargest(Arrays.asList(1, 2, 3, 4, 5, 10, 50, 2, 3, 6, 7));\n\n assertThat(output).isEqualTo(50);\n }",
"public static int getMaxDigits(Integer list[]) {\n\t\tint maxDigits = 0;\n\t\t// Iterate through the list.\n\t\tint digits;\n\t\tfor (int i = 0; i < list.length; i++) {\n\t\t\tdigits = getDigits(list[i]);\n\t\t\tif (digits > maxDigits) {\n\t\t\t\tmaxDigits = digits;\n\t\t\t}\n\t\t}\n\t\t// Return the max digits from the inputs.\n\t\treturn maxDigits;\n\t}",
"public static long highestOneBit(long i) {\r\n // HD, Figure 3-1\r\n i |= (i >> 1);\r\n i |= (i >> 2);\r\n i |= (i >> 4);\r\n i |= (i >> 8);\r\n i |= (i >> 16);\r\n i |= (i >> 32);\r\n return i - (i >>> 1);\r\n }",
"public long getLong(String name) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return -1L;\n }",
"public long getLongValue() {\n if (getValueIndex() <= 0)\n return 0L;\n return ((LongEntry) getPool().getEntry(getValueIndex())).getValue();\n }",
"public Long getMaxValue() {\n return maxValue;\n }",
"int getMax( int max );",
"public static int maxSubArray(final List<Integer> a) {\n\t\tint size = a.size();\n\t\tint max_so_far = Integer.MIN_VALUE, max_ending_here = 0;\n\t\tint position = 0;\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tmax_ending_here = max_ending_here + a.get(i);\n\t\t\tif (max_so_far < max_ending_here)\n\t\t\t\tmax_so_far = max_ending_here;\n\t\t\tif (max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\treturn max_so_far;\n\t}",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"Integer getMaximumResults();",
"int getMax();",
"@In Integer max();",
"@In Integer max();",
"static void miniMaxSum(int[] arr) {\n\n\n ArrayList<Long> numbers = new ArrayList<>();\n for (int i : arr\n ) {\n numbers.add(new Long(String.valueOf(i)));\n }\n //max sum\n Long maxSum=numbers.stream().sorted().skip(1).collect(Collectors.summingLong(x->x));\n Long minSum=numbers.stream().sorted(Comparator.reverseOrder()).skip(1).collect(Collectors.summingLong(x->x));\n System.out.println(minSum+\" \"+maxSum);\n }",
"public long maxValue() {\n return 0;\n }",
"private static Key max(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey max = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(max) > 0) {\n\t\t\t\tmax = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public Money findMaxPrice(long n) {\n\t\tif (!hashMap.containsKey(n)) {\n\t\t\treturn new Money();\n\t\t}\n\t\tTreeSet<Long> idSet = hashMap.get(n);\n\t\tMoney max = new Money();\n\t\tboolean flag = false;\n\t\tfor (Long id : idSet) {\n\t\t if(treeMap.containsKey(id)){\n\t\t\tMoney current = treeMap.get(id).price;\n\t\t\tif (max.compareTo(current) == -1 || !flag) {\n\t\t\t\tmax = current;\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"Object getMaximumValue(Object elementID) throws Exception;",
"public static void main(String[] args) {\n\t\tLongestInt o = new LongestInt();\n\t\tlong[] array = { -955500458, -1019688246, -1242882, -401659876, -1556575539, -399966325, -2100699450,\n\t\t\t\t-1723236537, -629494378, -2136128783, -1383966071, -544076870 };\n\t\tSystem.out.println(o.findLongest(array));\n\n\t}",
"public int getMaxIntValue();",
"public double max(ArrayList<Double> x) {\n double round;\n round = Collections.max(x) * 100;\n round = Math.round(round);\n round /= 100;\n return round;\n\n }",
"public int maxValue( int[ ] n ) {\n int max = Integer.MIN_VALUE;\n for(int each: n){\n if(each > max){\n max = each;\n }\n }\n return max;\n }",
"public static Object findLongestWord(List<String> words) {\n\t\treturn null;\n\t}",
"public static int max(ArrayList<Course> list) {\r\n\t\tint max;\r\n\t\tmax = 0;\r\n\t\tfor (Course course : list) {\r\n\t\t\tif (course.numberOfStudents > max) {\r\n\t\t\t\tmax = course.numberOfStudents;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn max;\r\n\t}",
"public long getHighestPrimeNr(){\n Cursor cursor = database.query(PrimeNrBaseHelper.TABLE, new String[] {\"MAX(\"+PrimeNrBaseHelper.PRIME_NR+\") AS MAX\"},null,null,null\n ,null,null);\n\n long pnr = 0;\n\n try {\n cursor.moveToFirst();\n pnr = cursor.getLong(cursor.getColumnIndex(\"MAX\"));\n } finally {\n cursor.close();\n }\n\n return (pnr > 0) ? pnr : SMALLEST_PRIME_NR;\n }",
"Double maxOfDisplacements(ArrayList<Double> dispA){\r\n\t\tObject minvalobj = Collections.min(dispA);\r\n\t\tObject maxvalobj = Collections.max(dispA);\r\n\t\tIJ.log(\"Max displacement\" + maxvalobj);\r\n\t\tIJ.log(\"Min displacement\" + minvalobj);\r\n\t\tdouble minval = (Double) minvalobj;\r\n\t\tdouble maxval = (Double) maxvalobj;\t\t\r\n\t\tdouble maxdisp = maxval;\r\n\t\tif (Math.abs(maxval) < Math.abs(minval)) \r\n\t\t\tmaxdisp = minval;\r\n\t\telse\r\n\t\t\tmaxdisp = maxval;\t\t\r\n\t\treturn maxdisp;\r\n\t}",
"double largestNumber(double[] a) {\n\t\tdouble max = a[0];\n\t\tdouble no = 0;\n\t\tfor (int index = 1; index < a.length; index++) {\n\t\t\tif (max > a[index] && max > a[index + 1]) {\n\t\t\t\tno = max;\n\t\t\t\tbreak;\n\t\t\t} else if (a[index] > max && a[index] > a[index + 1]) {\n\t\t\t\tno = a[index];\n\t\t\t\tbreak;\n\t\t\t} else if (a[index + 1] > max && a[index + 1] > a[index]) {\n\t\t\t\tno = a[index + 1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn no;\n\t}",
"public static int getMax(ArrayList<QuoteShort> data, int begin, int end) {\n\t\t\r\n\t\tint max = -1;\r\n\t\tint maxIndex = -1;\r\n\t\tif (begin<=0) begin = 0;\r\n\t\tfor (int i=begin;i<=end;i++){\r\n\t\t\tif (data.get(i).getHigh5()>=max){\r\n\t\t\t\tmax = data.get(i).getHigh5();\r\n\t\t\t\tmaxIndex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn maxIndex;\r\n\t}",
"public double biggest(ArrayList<Double> numbers) {\n\t\tif(numbers == null) {\n\t\t\treturn -1;\n\t\t} else if (numbers.size() < 3 || numbers.size() % 2 == 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tdouble first = numbers.get(0);\n\t\tdouble middle = numbers.get((int) Math.floor(numbers.size() / 2));\n\t\tdouble last = numbers.get(numbers.size() -1);\n\t\tdouble maximum = (first > middle && first > last) ? first :\n\t\t(middle > last) ? middle :\n\t\tlast;\n\t\treturn maximum;\t\t// default return value to ensure compilation\n\t}",
"public T findHighest(){\n T highest = array[0];\n for (int i=0;i<array.length; i++)\n {\n if (array[i].doubleValue()>highest.doubleValue())\n {\n highest = array[i];\n } \n }\n return highest;\n }",
"private int getMax(int[] times) {\n\n\t\t//Initially set max to the first value\n\t\tint max = times[0];\n\n\t\t//Loop through all times in the array\n\t\tfor (int i = 0; i < times.length; i++) {\n\n\t\t\t//Find max\n\t\t\tif (times[i]>max) {\n\n\t\t\t\t//Update max\n\t\t\t\tmax = times[i];\n\t\t\t}\n\t\t}\n\n\t\treturn max;\n\t\t//Print the max time to the console\n\n\t}",
"public int getLongest(int[] sequence) {\n\t\treturn sequence.length;\n\t}",
"public static int secondaryArgmax(double[] a) {\n\t\tint mi = argmax(a);\n\t\t// scan left until increasing\n\t\tint i;\n\t\tfor (i=mi-1; i>=0 && a[i]<=a[i+1]; i--);\n\t\tint l = argmax(a,0,i+1);\n\t\tfor (i=mi+1; i<a.length && a[i]<=a[i-1]; i++);\n\t\tint r = argmax(a,i,a.length);\n\t\tif (l==-1) return r;\n\t\tif (r==-1) return l;\n\t\treturn a[l]>=a[r]?l:r;\n\t}",
"private int indexOfLargest(ArrayList<QuakeEntry> data) {\n int index = 0;\n double magnitude = 0;\n for (QuakeEntry qe : data) {\n double currMag = qe.getMagnitude();\n if (currMag > magnitude) {\n index = data.indexOf(qe);\n magnitude = currMag;\n }\n }\n System.out.println(magnitude);\n return index;\n }",
"public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }",
"public int getMaximumValueForSet(long j, int i) {\n int a = this.b.a() - 1;\n return (i > a || i < 1) ? getMaximumValue(j) : a;\n }",
"public static long GetMin(Collection<Long> collection) {\n return Collections.min(collection);\n }",
"public int GetMaxVal();",
"public Integer getMaxId(){\n\t\tInteger max=0;\n\t\tfor(Integer i : getIdList()){\n\t\t\tif (i>max)\n\t\t\t\tmax=i;\n\t\t}\n\t\treturn max;\n\t}",
"public static int max(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n\t\t\tif( m < a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"private RolapCalculation getAbsoluteMaxSolveOrder() {\n // Find member with the highest solve order.\n RolapCalculation maxSolveMember = calculations[0];\n for (int i = 1; i < calculationCount; i++) {\n RolapCalculation member = calculations[i];\n if (expandsBefore(member, maxSolveMember)) {\n maxSolveMember = member;\n }\n }\n return maxSolveMember;\n }",
"int getMaximum();",
"public static int findMax(int[] a) {\r\n int max = a[0];\r\n\r\n //10th error , n = 1\r\n for (int n = 1; n < a.length; n++) {\r\n if (a[n] > max) {\r\n max = a[n];\r\n }\r\n }\r\n return max;\r\n\r\n }",
"public static int findLargest(int[] data){\n\t\tint lo=0, hi=data.length-1;\n\t\tint mid = (lo+hi)/2;\n\t\tint N = data.length-1;\n\t\twhile (lo <= hi){\n\t\t\tint val = data[mid];\n\t\t\tif(mid == 0 ) return (val > data[mid+1]) ? mid : -1;\n\t\t\telse if(mid == N) return (val > data[mid-1]) ? mid : -1;\n\t\t\telse{\n\t\t\t\tint prev = data[mid-1];\n\t\t\t\tint next = data[mid+1];\n\t\t\t\tif(prev < val && val < next) lo=mid+1;\n\t\t\t\telse if(prev > val && val > next) hi = mid-1;\n\t\t\t\telse return mid; // prev > val && val > next // is the only other case\n\t\t\t\tmid = (lo+hi)/2;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"public static long withMax(long n, long max) {\r\n\t\tif (n > max) {\r\n\t\t\treturn max;\r\n\t\t} else {\r\n\t\t\treturn n;\r\n\t\t}\r\n\t}",
"private static int max(int[] array) {\n int result = array[0];\n for (int x : array)\n result = Math.max(x, result);\n return result;\n }",
"private static double getTimeForMaxSubSumOf(int[] list) {\n long start = System.currentTimeMillis();\n maxSubSumN(list);\n long stop = System.currentTimeMillis();\n return (stop - start) / 1000.0;\n }",
"public static int max(int[] a) {\n\t\tint b=a[0];\r\n\t\tfor(int i=0;i<a.length;i++) {\r\n\t\t\tif(a[i]>b) {\r\n\t\t\t\tb=a[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn b;\r\n\t}",
"int findMaximumOrderByWorkflowId( int nWorkflowId );",
"public int getMaxFloor();",
"public static void main(String[] args) {\n int[] arr={24,34,56,98,2,59};\r\n int val =arr [0];\r\n for(int i=0;i<arr.length;i++){\r\n \t if(arr[i]>val){\r\n \t\t val=arr[i];\r\n \t }\r\n }\r\n System.out.println(\"largest value\"+ val);\r\n\t}",
"public Integer findLargest(List<Integer> integerList) {\n\t\t\n\t\t//initialize before for or for each and then check each one, are you bigger than largest value if not you are largest value then return largest value\n\t\tint largest = 0;\n\t\tfor (Integer element: integerList) {\n\t\t\tif (element >= largest ) {\n\t\t\t\tlargest = element;\n\t\t\t}\n\t\t}\n\t\treturn largest;\n\t}",
"private static int findLargest(List<Integer> diners,boolean reduce,IntHolder average){\n\t\t\tint largest = 0;\n\t\t\tint pos = 0;\n\t\t\tint total = 0;\n\t\t\t\n\t\t\tfor(int i=0;i<diners.size();i++){\n\t\t\t\tInteger din = diners.get(i);\n\t\t\t\ttotal+=din;\n\t\t\t\t\n\t\t\t\tif(din > largest){\n\t\t\t\t\tlargest = din;\n\t\t\t\t\tpos = i;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(reduce){\n\t\t\t\t\tdiners.set(i, --din);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(average!= null){\n\t\t\t\taverage.i = total/diners.size();\n\t\t\t}\n\t\t\t\n\t\t\treturn pos;\n\t\t}",
"public int findMaxValue(Node root) {\n if(root == null) {\n return Integer.MIN_VALUE;\n }\n int output = (int)root.getData();\n int leftOutput = findMaxValue(root.getLeftChildNode());\n int rightOutput = findMaxValue(root.getRightChildNode());\n if(leftOutput > output){\n output = leftOutput;\n }\n if(rightOutput > output) {\n output = rightOutput;\n }\n return output;\n\n }",
"public static int maxValue(int [] array){\n int hold = array[0];\n for(int i = 1; i < array.length; i++){\n if(array[i] > hold){\n hold = array[i];\n }\n }\n return hold;\n }",
"int getMaxInt();"
] | [
"0.735966",
"0.7305261",
"0.7254854",
"0.72333556",
"0.7211601",
"0.6928704",
"0.67824125",
"0.67125976",
"0.6662457",
"0.66516584",
"0.66036224",
"0.6490262",
"0.6483249",
"0.6463113",
"0.6438521",
"0.64082813",
"0.6381488",
"0.63728946",
"0.6326541",
"0.63047594",
"0.62979364",
"0.6262351",
"0.6202769",
"0.619983",
"0.6199159",
"0.61877227",
"0.6164065",
"0.6158474",
"0.6157836",
"0.6154798",
"0.61441284",
"0.61420876",
"0.60768825",
"0.607137",
"0.6061535",
"0.60614395",
"0.6035356",
"0.603466",
"0.60344195",
"0.6033104",
"0.6028562",
"0.6024743",
"0.6000851",
"0.6000517",
"0.59946156",
"0.5993016",
"0.5992703",
"0.5988983",
"0.5977204",
"0.5971366",
"0.5963166",
"0.5957356",
"0.5941321",
"0.5941096",
"0.59401727",
"0.5924071",
"0.5924071",
"0.5923759",
"0.59235513",
"0.59150743",
"0.59145087",
"0.58976966",
"0.5882883",
"0.5878362",
"0.58665675",
"0.5861812",
"0.5849147",
"0.58475894",
"0.58379453",
"0.5832803",
"0.5823806",
"0.5822687",
"0.58163005",
"0.5814445",
"0.5812858",
"0.580998",
"0.5806834",
"0.58015776",
"0.5788991",
"0.5779089",
"0.5777784",
"0.57725006",
"0.5769128",
"0.5759385",
"0.57589775",
"0.5737581",
"0.5737341",
"0.5733692",
"0.57304525",
"0.5728938",
"0.57278466",
"0.5724293",
"0.57145363",
"0.57133275",
"0.57065165",
"0.5705756",
"0.5693055",
"0.56921077",
"0.56811464",
"0.56681335"
] | 0.7356813 | 1 |
Do not allow to instantiate this class | private Utils() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ATCres() {\r\n // prevent to instantiate this class\r\n }",
"private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}",
"@Override\n public boolean isInstantiable() {\n return false;\n }",
"private SystemInfo() {\r\n // forbid object construction \r\n }",
"private Rekenhulp()\n\t{\n\t}",
"private Instantiation(){}",
"private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}",
"private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }",
"private MApi() {}",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public Pleasure() {\r\n\t\t}",
"private Ex() {\n }",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"Reproducible newInstance();",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}",
"private Security() { }",
"private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}",
"private CheckingTools() {\r\n super();\r\n }",
"private Validate(){\n //private empty constructor to prevent object initiation\n }",
"protected Problem() {/* intentionally empty block */}",
"private TMCourse() {\n\t}",
"private DarthSidious(){\n }",
"protected Approche() {\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private TetrisMain() {\r\n //prevents instantiation\r\n }",
"private Terms(){\n\t\t //this prevents even the native class from calling this ctor as well :\n\t\t throw new AssertionError();\n\t\t }",
"public OOP_207(){\n\n }",
"@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}",
"private ContentUtil() {\n // do nothing\n }",
"private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}",
"private stendhal() {\n\t}",
"private SingleObject()\r\n {\r\n }",
"private Utility() {\n throw new IllegalAccessError();\n }",
"public Preventivo() {\n\n }",
"private NullSafe()\n {\n super();\n }",
"private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }",
"protected Doodler() {\n\t}",
"protected Warning() {\n\n }",
"private SingleObject(){}",
"private NaturePackage() {}",
"private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}",
"private InstanceUtil() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"private Aliyun() {\n\t\tsuper();\n\t}",
"private Helper() {\r\n // do nothing\r\n }",
"private Infer() {\n\n }",
"protected YamlParser() {\n\t\t// Exists only to defeat instantiation.\n\t}",
"private ClassProxy() {\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }",
"private FactoryCacheValet() {\n\t\tsuper();\n\t}",
"private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }",
"private ClassificationSettings() {\n throw new AssertionError();\n }",
"private PluginAPI() {\r\n\t\tsuper();\r\n\t}",
"private Conf() {\n // empty hidden constructor\n }",
"private SerializerFactory() {\n // do nothing\n }",
"private Aspirations() {}",
"protected Animal() {\t\r\n\t}",
"private Log()\n {\n //Hides implicit constructor.\n }",
"private Marinator() {\n }",
"private Marinator() {\n }",
"private Supervisor() {\r\n\t}",
"private DiscretePotentialOperations() {\r\n\t}",
"private XmlFactory() {\r\n /* no-op */\r\n }",
"private AccessorModels() {\n // Private constructor to prevent instantiation\n }",
"public SecurityMB() {\n }",
"private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }",
"public Instance() {\n }",
"private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }",
"private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}",
"private SingleObject(){\n }",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"private NativeSupport() {\n\t}",
"private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}",
"private SingleTon() {\n\t}",
"public Implementor(){}",
"private ClassUtil() {}",
"private TypicalPersons() {}",
"private TypicalPersons() {}",
"protected VboUtil() {\n }",
"protected SecurityObject() {\n\t\t// Used by JPA provider.\n\n\t\tLOGGER.debug(\"SecurityObject#co\");\n\t}",
"private Public() {\n super(\"public\", null);\n }",
"private TetrisMain() {\r\n //ensure uninstantiability\r\n }",
"private LOCFacade() {\r\n\r\n\t}",
"private WolUtil() {\n }",
"@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }",
"public Potencial() {\r\n }",
"public Clade() {}",
"private Template() {\r\n\r\n }",
"protected Product() {\n\t\t\n\t}",
"private UserCourseCourse() {\n\t}",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"private EagerlySinleton()\n\t{\n\t}",
"protected ChildType() {/* intentionally empty block */}",
"private SolutionsPackage() {}",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private ClassifierUtils() {\n throw new AssertionError();\n }"
] | [
"0.7682195",
"0.75588286",
"0.74685955",
"0.7437264",
"0.73266786",
"0.7143281",
"0.7091737",
"0.70859855",
"0.7031622",
"0.70258904",
"0.6981391",
"0.6946725",
"0.69091684",
"0.69053257",
"0.6900377",
"0.68922794",
"0.68794423",
"0.68639857",
"0.6851852",
"0.68347526",
"0.68339634",
"0.6833726",
"0.6830711",
"0.68113446",
"0.67932737",
"0.6782407",
"0.67809165",
"0.6768746",
"0.67647636",
"0.67612386",
"0.67585444",
"0.6750684",
"0.67375505",
"0.6721299",
"0.671864",
"0.6712306",
"0.67023206",
"0.66979754",
"0.665921",
"0.6646449",
"0.66460264",
"0.66439956",
"0.6636488",
"0.6634038",
"0.6595149",
"0.6593639",
"0.65857357",
"0.658091",
"0.65785056",
"0.6575411",
"0.6564464",
"0.6562211",
"0.6561052",
"0.6555757",
"0.65520686",
"0.6546646",
"0.6539324",
"0.65380067",
"0.653668",
"0.65339583",
"0.6521558",
"0.6518128",
"0.6514371",
"0.6514371",
"0.65112495",
"0.65096515",
"0.65048003",
"0.65007794",
"0.64953065",
"0.64916724",
"0.6491627",
"0.6490668",
"0.64892495",
"0.6478331",
"0.64686203",
"0.6463405",
"0.6459761",
"0.645789",
"0.64512944",
"0.6450721",
"0.6448555",
"0.6448555",
"0.64447886",
"0.64442754",
"0.64413387",
"0.6440017",
"0.64389676",
"0.64385635",
"0.6431936",
"0.64317065",
"0.64269936",
"0.6426852",
"0.6424707",
"0.6421122",
"0.64198166",
"0.64194447",
"0.64120746",
"0.64107126",
"0.6409547",
"0.6409547",
"0.6406788"
] | 0.0 | -1 |
Gets the observation code of the measurement being tracked | public String getObservationCode() {
return this.observationCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getMeasurementCode() {\n return this.measurementCode;\n }",
"public java.lang.String getStateCode() {\n\t\treturn _dmHistoryMaritime.getStateCode();\n\t}",
"public String getCode() {\n return (String)getAttributeInternal(CODE);\n }",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"public long getCode() {\n return code;\n }",
"public String getEvent_code() {\n\t\treturn event_code;\n\t}",
"public int getCode() {\n\t\treturn adaptee.getCode();\n\t}",
"@javax.persistence.Column(name = \"event_code\", nullable = false)\n\tpublic java.lang.Integer getEventCode() {\n\t\treturn getValue(org.jooq.examples.cubrid.demodb.tables.Record.RECORD.EVENT_CODE);\n\t}",
"Integer getCode();",
"public int getEventCode() {\n return eventCode;\n }",
"public String getIdentifyCode() {\n return identifyCode;\n }",
"public String getObservationAxisLabel(){\n\t\tString out = \"\";\n\t\tif(this.histogramTally != null){\n\t\t\tNumberFormat formatter = NumberFormat.getInstance(locale);\n\t\t\tout = \"Observations (Total = \"+\n\t\t\t\tformatter.format(this.histogramTally.getObservations())+\")\";\n\t\t}else if(this.histogramAccumulate != null){\n\t\t\tTimeUnit tUnit \t= this.getAccumulateTimeUnit();\n\t\t\tString tu\t\t= \"[\"+tUnit.name()+\"]\";\n\t\t\tdouble total\t= this.histogramAccumulate.getPeriodMeasured().getTimeAsDouble(tUnit);\n\t\t\tout \t\t\t= \"Observation Time \"+tu+\" (Total = \"+total+\" \"+tu+\") \";\n\t\t}\n\t\treturn out;\n\t}",
"int getMoistureCode(int x, int y);",
"public int value() {\n return code;\n }",
"public String getCode() {\n return _toBaseUnit._code;\n }",
"public java.lang.String getEVENT_CODE()\n {\n \n return __EVENT_CODE;\n }",
"int getCodeValue();",
"java.lang.String getCode();",
"java.lang.String getCode();",
"public int getCode();",
"public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}",
"public int getCode() {\r\n return code;\r\n }",
"public int getCode() {\r\n return code;\r\n }",
"public String getIntermidiateCode(){\r\n\t\treturn iCode;\r\n\t}",
"public java.lang.String getCode() {\r\n return code;\r\n }",
"public int getCode()\n {\n return code;\n }",
"public int getCode () {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"int getCode();",
"int getCode();",
"int getCode();",
"public String code() {\n return this.code;\n }",
"public String code() {\n return this.code;\n }",
"public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"public int getCode() {\n return code;\n }",
"@Array({81}) \n\t@Field(9) \n\tpublic Pointer<Byte > InstrumentID() {\n\t\treturn this.io.getPointerField(this, 9);\n\t}",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public byte getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}",
"public int mo23267I() {\n return ((Integer) this.f13965a.mo23249a(C7196pb.f13747Qc)).intValue();\n }",
"public String getDisplayedCodeNumber() {\n\t\treturn getDriver().findElementDynamic(selectorDisplayedText)\n\t\t\t\t.getText()\n\t\t\t\t.substring(21, 24);\n\t}",
"public int getCode() {\r\n\t\tcode=code+1;\r\n\t\treturn code;\r\n\t}",
"public int code() {\n return code;\n }",
"public int getCode() {\n\t\treturn code;\n\t}",
"public String getCode()\n {\n return code;\n }",
"public int getCode() {\n return code_;\n }",
"public int getCode() {\n return code_;\n }",
"public String getCode () {\r\n\t\treturn code;\r\n\t}",
"public int mo851c() {\n return this.f609d;\n }",
"public String getCompCode() {\n return (String)getAttributeInternal(COMPCODE);\n }",
"public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}",
"public String getStateCode() {\n return (String)getAttributeInternal(STATECODE);\n }",
"public int mo23283Y() {\n return ((Integer) this.f13965a.mo23249a(C7196pb.f13884tb)).intValue();\n }",
"public short getCode() {\n/* 92 */ return this.code;\n/* */ }",
"public String getLocationCode() {\n\t\treturn locationCode.get(this.unitID.substring(0, 2));\n\t}",
"public SimulationCode getSimulationCode() {\r\n\t\treturn simulationCode;\r\n\t}",
"public int getCode() {\r\n\t\t\treturn code;\r\n\t\t}",
"public short getNumCode() {\n return numCode;\n }",
"public BigDecimal getCODE() {\r\n return CODE;\r\n }",
"public BigDecimal getCODE() {\r\n return CODE;\r\n }",
"public int getSensorId();",
"public short code() {\n return this.code;\n }",
"public int GetCurrentTrack();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\n return (String) get(\"code\");\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }"
] | [
"0.66657794",
"0.6044803",
"0.5914254",
"0.58656895",
"0.58426666",
"0.5842654",
"0.5842395",
"0.58366895",
"0.57587206",
"0.57558644",
"0.57205975",
"0.5707404",
"0.57041776",
"0.5696998",
"0.5693135",
"0.5677835",
"0.5672151",
"0.5648941",
"0.5648941",
"0.5617833",
"0.56135315",
"0.55737936",
"0.55737936",
"0.55704486",
"0.5568443",
"0.5561399",
"0.55598164",
"0.5559326",
"0.5559326",
"0.55539757",
"0.55539757",
"0.55539757",
"0.5542898",
"0.5542898",
"0.55409",
"0.5540366",
"0.5540366",
"0.5540366",
"0.5540366",
"0.5540366",
"0.55361867",
"0.55263895",
"0.55263895",
"0.55161643",
"0.5503165",
"0.5503165",
"0.5503165",
"0.5503165",
"0.5503165",
"0.549191",
"0.5487658",
"0.5483905",
"0.5478029",
"0.54769284",
"0.5471595",
"0.5468988",
"0.5468804",
"0.5468804",
"0.5464978",
"0.5464892",
"0.5457657",
"0.54493415",
"0.54493344",
"0.54389536",
"0.5437783",
"0.54326546",
"0.5431245",
"0.5424541",
"0.54172933",
"0.5417161",
"0.5417161",
"0.5415206",
"0.541319",
"0.540089",
"0.539759",
"0.53883535",
"0.53883535",
"0.53883535",
"0.53883535",
"0.53883535",
"0.53883535",
"0.53883535",
"0.53815174",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588",
"0.5379588"
] | 0.7728255 | 0 |
Gets the code of the measurement being tracked | public String getMeasurementCode() {
return this.measurementCode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getCode() {\n return _toBaseUnit._code;\n }",
"public int GetCurrentTrack();",
"public long getCode () {\r\n\t\treturn code;\r\n\t}",
"int getMoistureCode(int x, int y);",
"public long getCode() {\n return code;\n }",
"public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}",
"java.lang.String getCode();",
"java.lang.String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"String getCode();",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }",
"public String getCode() {\n return (String)getAttributeInternal(CODE);\n }",
"public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}",
"int getCodeValue();",
"public String getObservationCode() {\n return this.observationCode;\n }",
"public byte getCode();",
"public short code() {\n return this.code;\n }",
"public String getCoverage() {\n/* 98 */ return getValue(\"coverage\");\n/* */ }",
"public int value() {\n return code;\n }",
"Integer getCode();",
"public String getCode() {\n\t\treturn codeText.getText().toString();\n\t}",
"public java.lang.String getCode() {\r\n return code;\r\n }",
"public String code() {\n return this.code;\n }",
"public String code() {\n return this.code;\n }",
"int getCode();",
"int getCode();",
"int getCode();",
"public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}",
"public String getSimulatorCodeLocation() {\n return simSpec.getCodeLocation();\n }",
"public short getCode() {\n/* 92 */ return this.code;\n/* */ }",
"public String getCode () {\r\n\t\treturn code;\r\n\t}",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCustomInstrumentationData() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CUSTOMINSTRUMENTATIONDATA_PROP.get());\n }",
"public java.lang.String getStateCode() {\n\t\treturn _dmHistoryMaritime.getStateCode();\n\t}",
"public String getCode();",
"public String getCode();",
"public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Long getCode() {\n return code;\n }",
"public Long getCode() {\n return code;\n }",
"public java.lang.String getCode() {\n java.lang.Object ref = code_;\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 code_ = s;\n return s;\n }\n }",
"public java.lang.String getCoverage()\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(COVERAGE$4);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public int getCode();",
"public String getLocationCode() {\n\t\treturn locationCode.get(this.unitID.substring(0, 2));\n\t}",
"public String getCode()\n {\n return code;\n }",
"public int getCode() {\n\t\treturn adaptee.getCode();\n\t}",
"TraceCodeUnitsView codeUnits();",
"Code getCode();",
"public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}",
"public String getCode(){\n\t\treturn code;\n\t}",
"public String getEvent_code() {\n\t\treturn event_code;\n\t}",
"String getSensorDataPoint();",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getCode() {\r\n return code;\r\n }",
"public String getMeasuredUnitId() {\n return this.measuredUnitId;\n }",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n\t\treturn code;\n\t}",
"public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }",
"public String getCode() {\n return (String) get(\"code\");\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getAudioCode() {\n return audioCode;\n }",
"@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}",
"public int getCode () {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\n return code;\n }",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String getCode() {\r\n\t\treturn code;\r\n\t}",
"public String getMeasureResult() {\r\n return measureResult;\r\n }"
] | [
"0.65378356",
"0.6177353",
"0.60982484",
"0.60380983",
"0.6009946",
"0.5992961",
"0.5992492",
"0.5992492",
"0.5949493",
"0.5949493",
"0.5949493",
"0.5949493",
"0.5949493",
"0.594763",
"0.59438765",
"0.59156185",
"0.5886907",
"0.5881054",
"0.5866807",
"0.5807572",
"0.57955766",
"0.5793892",
"0.57877433",
"0.576327",
"0.5760124",
"0.5758514",
"0.5741899",
"0.5741899",
"0.5731284",
"0.5731284",
"0.5731284",
"0.572521",
"0.5722472",
"0.5707195",
"0.56958735",
"0.56956315",
"0.5674758",
"0.5673",
"0.5673",
"0.5670027",
"0.56533355",
"0.56533355",
"0.56532365",
"0.5652745",
"0.5649559",
"0.5636491",
"0.5632674",
"0.5629043",
"0.562201",
"0.5618889",
"0.56173295",
"0.56146675",
"0.5611153",
"0.55911",
"0.55889857",
"0.55889857",
"0.55889857",
"0.55889857",
"0.55889857",
"0.55889857",
"0.55889857",
"0.55878043",
"0.55845827",
"0.55845827",
"0.55845827",
"0.55845827",
"0.55845827",
"0.55845827",
"0.55812943",
"0.5577211",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5575881",
"0.5568924",
"0.5564467",
"0.5561569",
"0.5559184",
"0.5559184",
"0.5559184",
"0.5559184",
"0.555806",
"0.555806",
"0.5553649"
] | 0.76175886 | 0 |
Gets the current average value | public double getAverage() {
return this.average;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public synchronized double getAverage() {\n return average;\n }",
"public float getAverage(){\r\n\t\treturn Average;\r\n\t}",
"public double getAverage()\n {\n return getSum() / 2.0;\n }",
"public double average() {\n return average(0.0);\n }",
"public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}",
"public double getAverage(){\n return getTotal()/array.length;\n }",
"private double getAvg() {\n\n double sum = 0;\n\n for (Map.Entry<Integer, Double> entry : values.entrySet()) {\n sum += entry.getValue();\n }\n\n if (values.size() > 0) {\n return sum / values.size();\n } else {\n throw new IllegalStateException(\"no values\");\n }\n }",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"public double getCurrentAmplitudeAvg() {\n return publicAvg;\n }",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }",
"public String getAverage() {\n\t\treturn average;\n\t}",
"public double getAvg(){\n double avg=0;\n for(int x=0; x<max; x++){\n avg=avg+times[x];\n }\n avg=avg/max;\n return avg;\n }",
"public double getAverage(){\r\n\t\tdouble sum=0;\r\n\t\tfor(Iterator<T> it=this.iterator();it.hasNext();){\r\n\t\t\tsum+=it.next().doubleValue();\r\n\t\t}\r\n\t\treturn sum/this.size();\r\n\t}",
"public Quantity<Q> getAverage() {\n return average;\n }",
"double getAvgControl();",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }",
"double average();",
"public double getRatingAverage() {\n return average;\n }",
"public double getAverage() {\n int total = 0;\n\n // sum grades of the student\n for (int grade : grades)\n total += grade;\n\n // return average of the grade\n return (double) total / grades.length;\n }",
"public double mean() {\n return mean;\n }",
"public Double getAveragePosition() {\r\n return averagePosition;\r\n }",
"public double mean() {\n\t\treturn mean;\n\t}",
"public double mean() {\n\t\treturn mean;\n\t}",
"public double average() {\n double average = 0;\n for (int i = 0; i < studentList.size(); i++) {\n Student student = studentList.get(i);\n average += student.average();\n }\n average /= studentList.size();\n return average;\n }",
"public double mean() {\r\n\t\treturn mean;\r\n\t}",
"public double getMean() {\n return mean;\n }",
"public final double getMean()\r\n\t{\r\n\t\treturn mean;\r\n\t}",
"public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }",
"public int getAveraged() {\n\t\treturn averaged;\n\t}",
"public double getAverageScore() {\n\t return this.totalScore / this.count; \n\t }",
"public double mean()\n {\n return StdStats.mean(open);\n// return StdStats.sum(open) / count;\n }",
"double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}",
"public Double getMean() {\n return mean;\n }",
"double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}",
"public double getAverageRating() {\n return averageRating;\n }",
"public double getAverageRating() {\n return averageRating;\n }",
"public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }",
"public double mean() { \n return StdStats.mean(result);\n\n }",
"public double mean() {\n\t\tif (count() > 0) {\n\t\t\treturn _sum.get() / (double) count();\n\t\t}\n\t\treturn 0.0;\n\t}",
"public Float getAverageRating() {\n\t return this.averageRating;\n\t}",
"public double mean() {\n return StdStats.mean(fraction);\n }",
"public double mean() {\n return StdStats.mean(stats);\r\n }",
"public double getMean() \r\n\t{\r\n\t\tlong tmp = lastSampleTime - firstSampleTime;\r\n\t\treturn ( tmp > 0 ? sumPowerOne / (double) tmp : 0);\r\n\t}",
"public double getGradeAverage() {\n int gradesTotal = 0;\n for (int grade : grades) {\n gradesTotal += grade;\n }\n return gradesTotal / grades.size();\n }",
"public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}",
"public double getAvgGain() {\n\t\tif (avgGain == -1)\n\t\t\tthis.calculateAvg();\n\t\treturn avgGain;\n\t}",
"@java.lang.Override\n public double getAvgControl() {\n return avgControl_;\n }",
"public Double getPressureAvg() {\r\n\t\treturn pressureAvg;\r\n\t}",
"@java.lang.Override\n public double getAvgControl() {\n return avgControl_;\n }",
"public double getMean() {\n double timeWeightedSum = 0;\n\n for (int i = 0; i < accumulate.size() - 1; i++) {\n timeWeightedSum += accumulate.get(i).value\n * (accumulate.get(i + 1).timeOfChange\n - accumulate.get(i).timeOfChange);\n\n }\n LOG_HANDLER.logger.finer(\"timeWeightedSum Value: \" + timeWeightedSum\n + \"totalOfQuueueEntries: \" + totalOfQueueEntries);\n return timeWeightedSum / totalOfQueueEntries;\n }",
"public double mean() {\n return StdStats.mean(perThreshold);\n }",
"public long getAverageTime()\n {\n return averageTime;\n }",
"public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }",
"public double averageFitness()\r\n {\r\n\treturn averageFitness;\r\n }",
"public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }",
"public double getAverageMarkPerModule(){\n return achievedMarks\n .stream()\n .mapToDouble(AchievedMark::getMark)\n .average()\n .getAsDouble();\n }",
"public double mean() {\n\t\treturn StdStats.mean(results); \n\t}",
"public double mean() {\n/* 179 */ Preconditions.checkState((this.count != 0L));\n/* 180 */ return this.mean;\n/* */ }",
"public double getTotalGoldAverage() {\n return StatisticsHelper.getDivision(getTotalGold(), getTotalDeckAmount());\n }",
"public double getAverage()\n {\n if (test1 < 0 || test2 < 0)\n {\n System.out.println(\"Warning: one or more grades have not been entered.\");\n return -1;\n }\n return (test1 + test2) / 2;\n }",
"public long getAverageTime()\r\n {\r\n return this.averageTime;\r\n }",
"double getAvgTreatment();",
"public double average()\n\t{\n\t\tif (arraySize > 0)\n\t\t{\n\t\t\tdouble sum = this.sum();\n\t\t\treturn sum / arraySize;\n\t\t}\n\t\tSystem.out.println(\"Syntax error, array is empty.\");\n\t\treturn -1;\n\t}",
"public double mean(){\n return StdStats.mean(percentage);\n }",
"public double mean() {\n return StdStats.mean(results);\n }",
"public double mean() {\n return StdStats.mean(thresholds);\n }",
"public double mean() {\n return StdStats.mean(thresholds);\n }",
"public Double getAverageTransaction() {\n if (transactions.size() == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn getBalance() / transactions.size();\n\t\t}\n }",
"public double getAverage(){\r\n\r\n\t\tdouble sum = 0.0;\r\n\t\tdouble average = 0.0;\r\n\r\n\t\tfor (int i = 0; i < grades.length; ++i)\r\n\t\t\tsum += grades[i];\r\n\t\taverage = sum /grades.length;\r\n\t\t\r\n\t\tString num = String.format(\"%.2f\", average);\r\n\t\tdouble formattedNumber = Double.parseDouble(num);\r\n\t\treturn formattedNumber;\r\n\r\n\t}",
"public float getAverageVote()\n {\n if (averageRating == null) {\n return 0;\n } else {\n return averageRating.getAverageVote();\n }\n }",
"public float getAvgSim() {\n return avgSim;\n }",
"public double mean() {\n return StdStats.mean(trialResult);\n }",
"public BigDecimal getRows_affected_avg() {\n return rows_affected_avg;\n }",
"public int getAverageScore() {\n\t\treturn totalScore / quizCount;\n\t}",
"public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}",
"public double getAverageUsage() {\n \tif(lastData.size() > 0) {\n\t \tdouble total = 0.0;\n\t \t\n\t \tfor(double data : lastData) {\n\t \t\ttotal += data;\n\t \t}\n\t \t\n \t\tSystem.out.println(\"Current average load (last minute): \" + total / lastData.size());\n\t \t\n\t \treturn total / lastData.size();\n \t} else {\n \t\t// Calculate CPU usage\n \t\tdouble per = 0;\n\t\t\ttry {\n\t\t\t\tper = sigar.getCpuPerc().getCombined();\n\t\t\t} catch (SigarException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n \t\t\n \t\treturn per;\n \t}\n }",
"public int getAverage() { return (int)Math.ceil(getSumOfMarks()/ numberOfCourses); }",
"public double getMean(){\n\t\treturn Math.exp(location + scale * scale / 2);\n\t}",
"public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }",
"public double mean() {\n\t\treturn StdStats.mean(threshold);\n\t}",
"public BigDecimal getRows_examined_avg() {\n return rows_examined_avg;\n }",
"public float getMean() {\r\n int sum = getSum(rbt.root);\r\n float mean = sum / rbt.size();\r\n return mean;\r\n }",
"public double getAvgAltValue() {\n return avgAltValue;\n }",
"public float getAverageY(){\r\n\t\treturn AverageY;\r\n\t}",
"public String getMean()\n {\n return mean;\n }",
"public java.math.BigDecimal getSaleAvg() \n\t{\n\t\treturn saleAvg;\n\t}",
"public void average(){\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\tw.average();\n\t\t}\n\t}",
"@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }",
"public double getMeanValuePixels() {\n\t\tdouble avg = 0;\n\n\t\tfor (int i = 0; i < width; i++) {\n\t\t\tfor (int j = 0; j < height; j++) {\n\t\t\t\tavg += this.image[i][j];\n\t\t\t}\n\t\t}\n\t\tavg /= this.getQtyPixels();\n\n\t\treturn avg;\n\t}",
"public double getWaveAvg() {\n\t\t\treturn avgWaveDist;\n\t\t}",
"public double getTotalGoldenCardAverage() {\n return StatisticsHelper.getDivision(getTotalGoldenCards(), getTotalDeckAmount());\n }",
"public double getAverageRate() {\n return (leftEnc.getRate() + rightEnc.getRate()) / 2;\n }",
"double getMeanPrice() {\n List<Double> allPrices = new ArrayList<>();\n\n for (Firm firm : firms) {\n List<Double> pricesOfFirm = firm.getPrices();\n allPrices.addAll(pricesOfFirm.subList(pricesOfFirm.size() - SimulationManager.sizeOfExaminationInterval, pricesOfFirm.size()));\n }\n\n return Calculation.round(Calculation.getMean(allPrices), 2);\n }",
"public double mean() {\n return StdStats.mean(openSites) / times;\n }",
"public double getAverageAcceleration() {\n return (leftEnc.getAcceleration() + rightEnc.getAcceleration()) / 2;\n }",
"public double mean() {\n\t\tint n = this.getAttCount();\n\t\tif (n == 0) return Constants.UNUSED;\n\t\t\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tdouble v = this.getValueAsReal(i);\n\t\t\tsum += v;\n\t\t}\n\t\t\n\t\treturn sum / (double)n;\n\t}"
] | [
"0.8518513",
"0.8248703",
"0.8162223",
"0.81227106",
"0.81000143",
"0.80794847",
"0.7957098",
"0.7951267",
"0.79318196",
"0.7813571",
"0.7800771",
"0.7788469",
"0.77483225",
"0.77281755",
"0.7709174",
"0.76981443",
"0.7630915",
"0.76047623",
"0.759849",
"0.7595203",
"0.75890493",
"0.7569824",
"0.7565176",
"0.7563617",
"0.75313884",
"0.74912924",
"0.74912924",
"0.748825",
"0.7486203",
"0.74209094",
"0.7419852",
"0.74074864",
"0.7395116",
"0.73946893",
"0.7391798",
"0.7391026",
"0.7368862",
"0.73668194",
"0.7365886",
"0.7365886",
"0.73653424",
"0.7341093",
"0.7332269",
"0.73128134",
"0.72566366",
"0.7231724",
"0.72060835",
"0.71970826",
"0.7189675",
"0.7183648",
"0.7172821",
"0.7164471",
"0.71608",
"0.71280944",
"0.7113234",
"0.71111083",
"0.7110416",
"0.70953506",
"0.7090586",
"0.70858616",
"0.70817554",
"0.7076264",
"0.7070778",
"0.7068065",
"0.7063632",
"0.7061239",
"0.7054018",
"0.7050327",
"0.7044205",
"0.70313615",
"0.70313615",
"0.7029007",
"0.7028329",
"0.70164514",
"0.7005828",
"0.6997605",
"0.6997154",
"0.6974911",
"0.6959452",
"0.6954994",
"0.69464517",
"0.69362545",
"0.6935584",
"0.6922963",
"0.6922895",
"0.69193",
"0.69181377",
"0.691299",
"0.68892384",
"0.68719083",
"0.68665045",
"0.6864639",
"0.6863371",
"0.68539876",
"0.68474627",
"0.68377537",
"0.6830674",
"0.68172914",
"0.68134546",
"0.68043953"
] | 0.8258185 | 1 |
Resets the current count and average to 0/0.0 | public void reset() {
this.count = 0;
this.average = 0.0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }",
"public void resetCount() {\n count = 0;\n }",
"public void resetCount() {\n\t\tcount = 0;\n\t}",
"public void reset() {\n\t\tcount = 0;\n\t}",
"void reset() {\n count = 0;\n\n }",
"public void reset() {\n\t\tthis.count = 0;\n\t}",
"public void unaverage() {\n\t\tif (!averaged)\n\t\t\tthrow new AssertionError(\"can't unaverage twice!!\");\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (w[i] + wupdates[i])/(t+1.0);\n\t\t\n\t\tscale = 1.0;\n\t\taveraged = false;\n\t}",
"public static void resetCount() {\n count = 1;\n }",
"private void resetStats() {\n }",
"public void reset()\n {\n currentScore = 0;\n }",
"public void reset() {\n/* 54 */ this.count = 0;\n/* 55 */ this.totalTime = 0L;\n/* */ }",
"public void resetStatistics()\n {\n }",
"private void resetStatistics() {\n worst = Integer.MAX_VALUE;\n best = Integer.MIN_VALUE;\n }",
"public void resetScore() {\n\t\tthis.score = 0;\n\t}",
"public void setCountToZero() {\r\n \r\n // set count to 0\r\n count = 0;\r\n }",
"public void reset() {\n\n\t\tazDiff = 0.0;\n\t\taltDiff = 0.0;\n\t\trotDiff = 0.0;\n\n\t\tazMax = 0.0;\n\t\taltMax = 0.0;\n\t\trotMax = 0.0;\n\n\t\tazInt = 0.0;\n\t\taltInt = 0.0;\n\t\trotInt = 0.0;\n\n\t\tazSqInt = 0.0;\n\t\taltSqInt = 0.0;\n\t\trotSqInt = 0.0;\n\n\t\tazSum = 0.0;\n\t\taltSum = 0.0;\n\t\trotSum = 0.0;\n\n\t\tcount = 0;\n\n\t\tstartTime = System.currentTimeMillis();\n\t\ttimeStamp = startTime;\n\n\t\trotTrkIsLost = false;\n\t\tsetEnableAlerts(true);\n\n\t}",
"public void reset() {\n\t\tscore = 0;\n\t}",
"public void reset () {\n lastSave = count;\n count = 0;\n }",
"public void resetStats() {\n recentStats = new Stats();\n }",
"public void clearXAvg() {\n\t\txStats.clear();\n\t}",
"public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}",
"public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}",
"public void resetStats(){\n curA = attack;\n curD = defense;\n curSpA = spAttack;\n curSpD = spDefense;\n curS = speed;\n }",
"public void resetCount() {\n\t\tresetCount(lineNode);\n\t}",
"public void unReset () {\n count = lastSave;\n }",
"public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}",
"public void clear() {\n\t\tsample.clear();\n\t\tcount.set(0);\n\t\t_max.set(Long.MIN_VALUE);\n\t\t_min.set(Long.MAX_VALUE);\n\t\t_sum.set(0);\n\t\tvarianceM.set(-1);\n\t\tvarianceS.set(0);\n\t}",
"public void reset() {\n sum1 = 0;\n sum2 = 0;\n }",
"public void resetWeights() {\n averagingCoefficient = 0;\n weightMap.clear();\n weightCacheMap.clear();\n }",
"protected void resetTotalBalance()\r\n {\r\n totalBalance = 0.00;\r\n }",
"public static void performanceCountReset() { }",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"public void clearYAvg() {\n\t\tyStats.clear();\n\t}",
"public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }",
"public void clear() {\n _sample.clear();\n _count = 0;\n _max = null;\n _min = null;\n _sum = BigDecimal.ZERO;\n _m = -1;\n _s = 0;\n }",
"public void resetCounters()\n {\n cacheHits = 0;\n cacheMisses = 0;\n }",
"public void resetBallCount() {\r\n\t\tballCount = 30;\r\n\t}",
"public void reset() {\n\t\tfor (int i = 0; i < stats.size(); i++) {\n\t\t\tstats.get(i).reset();\n\t\t}\n\t}",
"public void average() {\n\t\tif (averaged)\n\t\t\tthrow new AssertionError(\"can't average twice!!\");\n\t\t\n\t\tscale = 1.0/(double)t;\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (t+1.0)*w[i] - wupdates[i];\n\t\t\n\t\taveraged = true;\n\t\n\t}",
"public void reset(){\n value = 0;\n }",
"public Builder clearAvgControl() {\n \n avgControl_ = 0D;\n onChanged();\n return this;\n }",
"public void resetScore(){\n Set<String> keys = CalcScore.keySet();\n for(String key: keys){\n CalcScore.replace(key,0.0);\n }\n\n\n\n }",
"public void reset ()\r\n\t{\r\n\t\tsuper.reset();\r\n\t\tlastSampleTime = 0;\r\n\t\tfirstSampleTime = 0;\r\n\t\tlastSampleSize = 0;\r\n\t}",
"private void clearLikesCount() {\n \n likesCount_ = 0;\n }",
"void resetStationStatistics() {\n\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"depthMin, depthMax = \" + depthMin + \" \" + depthMax);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"sampleCount = \" + sampleCount);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"stationSampleCount = \" + stationSampleCount);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"sampleRejectCount = \" + sampleRejectCount);\n if (dbg) System.out.println(\"<br>resetStationStatistics: \" +\n \"stationSampleRejectCount = \" + stationSampleRejectCount);\n\n depthMin = 9999.99f;\n depthMax = -9999.99f;\n stationSampleCount = 0;\n stationSampleRejectCount = 0;\n prevDepth = 0f;\n\n }",
"public void resetBidCount() {\r\n bidCount = 0;\r\n }",
"private void resetCount(){\r\n\t\t\tactiveAgent = 0;\r\n\t\t\tjailedAgent = 0;\r\n\t\t\tquietAgent = 0;\r\n\t\t}",
"public void ResetCounter()\r\n {\r\n counter.setCurrentValue(this.startValue);\r\n }",
"public void setMovingAverageSamples(int count)\n {\n NumAvgSamples = count;\n }",
"public void clear() {\n count = 0;\n }",
"public void reset() {\n\t\tsuper.reset(); // reset the Reportable, too.\n\n\t\tif (_interArrivalTimeActivated && _interArrivalTally != null)\n\t\t\t_interArrivalTally.reset();\n\t\t\n\t\t// really reset the counter value?\n\t\tif (!this.isResetResistant) {\n\t\t\tthis._value = 0;\n \t this._min = this._max = 0;\n\t\t}\n\t}",
"public void resetCounters() {\n\t\t//RobotMap.leftEncoder.reset();\n\t\t//RobotMap.rightEncoder.reset();\n\t\tRobotMap.ahrs.zeroYaw();\n\t\tRobotMap.talonLeft.setSelectedSensorPosition(0, 0, 10);\n\t\tRobotMap.talonRight.setSelectedSensorPosition(0, 0, 10);\n\t\tbearing = 0;\n\t}",
"private void reset() {\n\t\tsnake.setStart();\n\n\t\tfruits.clear();\n\t\tscore = fruitsEaten = 0;\n\n\t}",
"public void reset()\n {\n this.timeToCook = 0;\n this.startTime = 0;\n }",
"public void resetTally() {\n won_stayed = 0;\n won_switched = 0;\n total_stayed = 0;\n total_switched = 0;\n }",
"@Override\n\tpublic void reset() {\n\t\tmProgress = 0;\n\t}",
"public void resetRunCount() {\n\n }",
"public void reset()\n {\n cantidad = 0;\n suma = 0;\n maximo = 0; \n minimo = 0; \n \n }",
"public synchronized void reset()\n\t{\n\t\tm_elapsed = 0;\n\t}",
"public static void resetTestCount() {\n mTestCount = 0;\n }",
"@Override\n public synchronized void reset() {\n m_accumulatedTime = 0;\n m_startTime = getMsClock();\n }",
"@Override\n public void reset() {\n updateDice(1, 1);\n playerCurrentScore = 0;\n playerScore = 0;\n updateScore();\n notifyPlayer(\"\");\n game.init();\n }",
"public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }",
"public void resetCounters() {\n setErrorCounter(0);\n setDelayCounter(0);\n }",
"public void resetHitStatistics()\n {\n m_stats.resetHitStatistics();\n }",
"public void reset() {\r\n\t\tready = false;\r\n\t\twitnessed_max_price = 0.0;\r\n\t\t\r\n\t\tfor (int i = 0; i<no_goods; i++)\r\n\t\t\tfor (int j = 0; j<no_bins; j++)\r\n\t\t\t\tmarg_prob[i][j] = 0.0;\r\n\t\t\r\n\t\tmarg_sum = 0;\r\n\t\t\r\n\t\tfor (HashMap<IntegerArray, double[]> p : this.prob)\r\n\t\t\tp.clear();\r\n\r\n\t\tfor (HashMap<IntegerArray, Integer> s : this.sum)\r\n\t\t\ts.clear();\r\n\t\t\r\n\t\tlog.clear();\r\n\t}",
"@Override\n boolean resetStatistics();",
"public void resetScore();",
"public void reset(View view) {\r\n homeScore = 0;\r\n visitorScore = 0;\r\n displayHomeScore(homeScore);\r\n displayVisitorScore(visitorScore);\r\n }",
"public void reset() {\n itemCount = 0;\n stock = new VendItem[maxItems];\n totalMoney = 0;\n userMoney = 0;\n vmStatus = null;\n }",
"public void resetActiveStats() {\n if (!valid)\n return;\n\n\n Handler handler = new Handler(getLooper());\n handler.post(() -> {\n recentStats.activeRequests = toLoad.size() + loading.size();\n recentStats.maxActiveRequests = recentStats.activeRequests;\n });\n }",
"public void resetScore() {\n this.myCurrentScoreInt = 0;\n this.myScoreLabel.setText(Integer.toString(this.myCurrentScoreInt));\n }",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"public void clear()\n {\n count=0;\n }",
"public void resetPoints() {\n points = 0;\n }",
"public Builder clearAvgTreatment() {\n \n avgTreatment_ = 0D;\n onChanged();\n return this;\n }",
"public void reset() {\n\t\tArrays.fill(distance,0);\n\t\tused.clear();\n\t}",
"public void reset () {\n if (!this.on) {\n return;\n }\n\n this.currentSensorValue = 0;\n }",
"@SuppressWarnings(\"NullAway\")\n\t\tpublic void reset() {\n\t\t\ttrackDoc = null;\n\t\t\tglobalDoc = null;\n\t\t\tpredicted.reset();\n\t\t\tobserved.reset();\n\t\t\tdoc_to_imagePixel.reset();\n\t\t}",
"public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }",
"public void resetTxnCount() {\n txnCount.set(0);\n snapLog.setTotalLogSize(0);\n }",
"public static void reset()\r\n {\r\n errorCount = 0;\r\n warningCount = 0;\r\n }",
"@Override\n\tpublic void reset() {\n\t\tfor(int i=0; i<mRemainedCounters; i++){\n\t\t\tfinal ICounter counter = this.mCounters.getFirst();\n\t\t\tcounter.reset();\n\t\t\tthis.mCounters.removeFirst();\n\t\t\tthis.mCounters.addLast(counter);\n\t\t}\n\t\tthis.mRemainedCounters = this.mCounters.size();\n\t}",
"private void resetValues() {\n teamAScoreInt = 0;\n teamBScoreInt = 0;\n teamAFoulScoreInt = 0;\n teamBFoulScoreInt = 0;\n }",
"public void reset() {\n tpsAttentePerso = 0;\n tpsAttentePerso2 =0;\n \ttotalTime = 0;\n\tnbVisited = 0;\n moyenne =0;\n }",
"public void resetCount(View view) {\n\t\tcounterModel.resetCounter();\n\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t}",
"public void resetUpdateCount() {\n updateCount = 0;\n numNucleiToRemove = 0;\n }",
"private void clearMediaCount() {\n \n mediaCount_ = 0;\n }",
"@Override\r\n\tpublic void reset() {\n\t\tsuper.reset();\r\n\t\tthis.setScale(0.75f);\r\n\t}",
"public static void Reset(){\n\t\ttstr = 0;\n\t\ttluc = 0;\n\t\ttmag = 0; \n\t\ttacc = 0;\n\t\ttdef = 0; \n\t\ttspe = 0;\n\t\ttHP = 10;\n\t\ttMP = 0;\n\t\tstatPoints = 13;\n\t}",
"private void resetValues() {\n\t\ttotalNet = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalVat = Money.of(Double.valueOf(0.0), currencyCode);\n\t\ttotalGross = Money.of(Double.valueOf(0.0), currencyCode);\n\t}",
"public static void clearGrades() {\n for(int i = 0; i < grades.size(); i++) {\n grades.get(i).clear();\n }\n for(int i = 0; i < subjects.size(); i++) {\n subjects.get(i).setAverage(0);\n }\n grades.clear();\n }",
"public void reset() {\n state = SearchState.NEW;\n objectiveOptimal = false;\n solutionCount = 0;\n timeCount = 0;\n stopStopwatch();\n nodeCount = 0;\n backtrackCount = 0;\n failCount = 0;\n restartCount = 0;\n depth = 0;\n maxDepth = 0;\n }",
"public void resetPerformanceMetrics() {\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setInterest(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setEngagement(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setStress(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setRelaxation(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setRelaxation(0);\n\t\tdetectionModel.getPrimaryDataModel().getAffectiveDataModel().setExcitement(0);\n\t}",
"public void reset() {\n while (getNumTotal() > 0) {\n this.removeNuclei();\n }\n lastModified = Calendar.getInstance().getTimeInMillis(); // record time\n }",
"public void reset() {\n\t\tstartTime = System.nanoTime();\n\t\tpreviousTime = getTime();\n\t}",
"public double average() {\n return average(0.0);\n }",
"synchronized void reset() {\n\n // no change if called before getValue() or called twice\n lastValue = currValue = startValue;\n }",
"public void reset() {\n counters = null;\n counterMap = null;\n counterValueMap = null;\n }",
"public void clear() {\n\tn = 0;\n\tArrays.fill(sums, 0.0);\n\tArrays.fill(productsSums, 0.0);\n }"
] | [
"0.732895",
"0.72531265",
"0.72264135",
"0.69882846",
"0.69390494",
"0.6875471",
"0.6869286",
"0.6851011",
"0.68090224",
"0.67875624",
"0.67710346",
"0.674368",
"0.6738466",
"0.6682335",
"0.6681201",
"0.6664179",
"0.66605264",
"0.66486454",
"0.66349083",
"0.6616046",
"0.6554041",
"0.6554041",
"0.6465117",
"0.6459457",
"0.644895",
"0.64418846",
"0.6435229",
"0.64056796",
"0.6393814",
"0.6375878",
"0.636321",
"0.6351123",
"0.6346147",
"0.63382673",
"0.63225126",
"0.6312817",
"0.6300093",
"0.62904453",
"0.62764966",
"0.6271197",
"0.62653226",
"0.6264175",
"0.625453",
"0.6251092",
"0.6234255",
"0.62318045",
"0.62108785",
"0.6193365",
"0.6136003",
"0.61328465",
"0.6128904",
"0.61173457",
"0.6106064",
"0.6100397",
"0.6094226",
"0.6092822",
"0.6090829",
"0.60820913",
"0.60814786",
"0.60805494",
"0.6076623",
"0.6074158",
"0.60386693",
"0.60333437",
"0.60330826",
"0.6029193",
"0.6028159",
"0.60260034",
"0.6009716",
"0.6004832",
"0.59846795",
"0.5980603",
"0.59708434",
"0.59644085",
"0.5957245",
"0.5953271",
"0.5952426",
"0.5951091",
"0.59393156",
"0.59248734",
"0.5920163",
"0.5919731",
"0.59103245",
"0.5910076",
"0.5906265",
"0.588908",
"0.5888442",
"0.58871365",
"0.5887047",
"0.58809036",
"0.587972",
"0.5878974",
"0.58734494",
"0.5861054",
"0.586039",
"0.58599824",
"0.5859104",
"0.5855399",
"0.5853371",
"0.58510774"
] | 0.8767789 | 0 |
Adds a new value to the tracker and calculates the new average | public void add(double newValue) {
this.count++;
this.average = this.average * (this.count - 1) / this.count + newValue/this.count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void average() {\n\t\tif (averaged)\n\t\t\tthrow new AssertionError(\"can't average twice!!\");\n\t\t\n\t\tscale = 1.0/(double)t;\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (t+1.0)*w[i] - wupdates[i];\n\t\t\n\t\taveraged = true;\n\t\n\t}",
"public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}",
"public void addValue(double newValue) {\n\t\tdouble delta = newValue - mean;\n\t\tn += 1;\n\t\tmean += delta / n;\n\t\ts += delta * (newValue - mean);\n\t}",
"@Override\n public void agg(double newVal)\n {\n aggVal += newVal;\n firstTime = false;\n }",
"public void average(){\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\tw.average();\n\t\t}\n\t}",
"public void addRatingAndCalculate(double newRating) {\n totalRating += newRating;\n averageRating = totalRating/reviews.size();\n }",
"void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}",
"public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"@Override\n public void agg(Object newVal)\n {\n aggVal += (Double)newVal;\n firstTime = false;\n }",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}",
"private void calculateAvg() {\n\t\tDescriptiveStatistics stats = new DescriptiveStatistics();\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\tstats.addValue(oneQ.getGapCount() * oneQ.getFrequency());\n\t\t}\n\t\tthis.avgGain = stats.getMean();\n\t\tthis.medianGain = stats.getPercentile(50);\n\t\tthis.quartiles = stats.getPercentile(75);\n\t}",
"private void updateMean() {\r\n double tmp = 0.0;\r\n for (Tweet t : members) {\r\n tmp += t.getDateLong();\r\n }\r\n tmp = tmp / (double) members.size();\r\n this.mean = tmp;\r\n }",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"public void calculateAverage() {\n\n if (turn == 1) {\n p1.setTotalScore(p1.getTotalScore() + turnScore);\n\n p1.setTotalDarts(p1.getTotalDarts() + 1);\n\n float p1Average = p1.getTotalScore() / p1.getTotalDarts();\n p1.setAverage(p1Average);\n\n } else if (turn == 2) {\n p2.setTotalDarts(p2.getTotalDarts() + 1);\n p2.setTotalScore(p2.getTotalScore() + turnScore);\n\n float p2Average = p2.getTotalScore() / p2.getTotalDarts();\n p2.setAverage(p2Average);\n }\n\n\n }",
"private double getAvg() {\n\n double sum = 0;\n\n for (Map.Entry<Integer, Double> entry : values.entrySet()) {\n sum += entry.getValue();\n }\n\n if (values.size() > 0) {\n return sum / values.size();\n } else {\n throw new IllegalStateException(\"no values\");\n }\n }",
"private void saveAverageIfNecessary() {\n if (counter % 10000 == 0 || counter == 10 || counter == 100\n || counter == 1000) {\n averages.add(new Average());\n }\n }",
"public void addSample( final double value ) {\n\t\tfinal double weight = getWeight( ++_population );\n\t\t_mean = weight * value + ( 1 - weight ) * _mean;\n\t\t_meanSquare = weight * value * value + ( 1 - weight ) * _meanSquare;\n\t}",
"double getAvgControl();",
"public void parseAverages(){\r\n\t\tfor(int i = 1; i < x.size(); i++){\r\n\t\t\tdouble avg = (x.get(i) + x.get(i-1)) / 2;\r\n\t\t\tx.set(i, avg);\r\n\t\t}\r\n\t}",
"void update_time_avg_stats() {\n double time_since_last_event;\n\n\t\t/* Compute time since last event, and update last-event-time marker. */\n\n time_since_last_event = sim_time - time_last_event;\n time_last_event = sim_time;\n\n\t\t/* Update area under number-in-queue function. */\n\n area_num_in_q += num_in_q * time_since_last_event;\n\n\t\t/* Update area under server-busy indicator function. */\n\n area_server_status += server_status.ordinal() * time_since_last_event;\n }",
"public float getAverage(){\r\n\t\treturn Average;\r\n\t}",
"private void computeAverageFrequencyDelayValue() {\n\tthis.averageFrequencyDelayValue = value * this.averageDelay;\n }",
"public synchronized double getAverage() {\n return average;\n }",
"double average();",
"public void addScore()\n {\n score += 1;\n }",
"private float calculateAverage(List<Float> tempVoltages) {\r\n\t\t\r\n\t\tfloat runningTotal = 0;\r\n\t\tfor(float i : tempVoltages){\r\n\t\t\trunningTotal += i;\r\n\t\t}\r\n\t\trunningTotal /= tempVoltages.size();\r\n\t\treturn runningTotal;\r\n\t}",
"public void averageWith(TimeStampAccumulator t){\n\t\tif(_time != t._time){\n\t\t\tSystem.err.println(\"Error : TimeStampAccumulator times do not match\");\n\t\t}\n\t\tif(t._wealthData.size() == _wealthData.size()){\n\t\t\tfor(PlayerWealthDataAccumulator p : t._wealthData.values()){\n\t\t\t\t_wealthData.get(p.ownerID).averageWith(p);\n\t\t\t}\n\t\t}\n\t}",
"public Builder setAvgControl(double value) {\n \n avgControl_ = value;\n onChanged();\n return this;\n }",
"private float averageBeat(){\n float avgBeat = 0f;\n List<Float> beatRed = DataManager.getInstance().getBeatRed();\n List<Float> beatIR = DataManager.getInstance().getBeatIR();\n\n for(int i = 0; i < beatRed.size() && i < beatIR.size(); i ++ ){\n chartFragment.addRedData(beatRed.get(i));\n chartFragment.addIRData(beatIR.get(i));\n avgBeat += beatRed.get(i);\n avgBeat += beatIR.get(i);\n }\n avgBeat = avgBeat / (beatRed.size() + beatIR.size());\n\n if (tcpTask != null )\n this.tcpTask.addData(\"\" + avgBeat);\n beatLabel.setText(\"Beat : \" + avgBeat);\n return avgBeat;\n }",
"public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }",
"public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }",
"public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}",
"public void update( Double newVal ){\n\t\tDouble val = normalize( newVal );\n\t\tint idx = findInterval( val );\n\t\t//log.info( \"interval for value {} is {}\", val, idx );\n\t\thistogram[idx]++;\n\t\tcount++;\n\t}",
"double agression();",
"public void addValue(double value) {\r\n\t\tvalues.add(value);\r\n\t}",
"public float getAverageBetweenPoint(){\n return getMetric()/list.size();\n }",
"public void setAveraged(int averaged) {\n\t\tthis.averaged = averaged;\n\t}",
"public int getAveraged() {\n\t\treturn averaged;\n\t}",
"@Override\n public void onNext(ComputeAverageResponse value) {\n System.out.println(\"Received a response from the server\");\n System.out.println(value.getAverage());\n //onNext will be called only once\n }",
"public void addPoints(int earnedPoints) {score = score + earnedPoints;}",
"public double refreshData(double newValue){\n\t\t\n\t\tlastResultValue = resultValue;\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t *\tAdding new value \n\t\t */\n\t\tif( (isThresholdUsingEnabled) && ( Math.abs((resultValue - newValue)) > threshold) ){\t// If the newValue is much different then previous resultValues then we discard the previous values..\n\t\t\tthis.valueCount = 0;\n\t\t\tthis.values = new double[this.maxValueCount];\n\t\t}\n\t\t\n\t\tif(valueCount == maxValueCount){\n\t\t\t\n\t\t\tfor(int i=1; i<maxValueCount; i++)\n\t\t\t\tvalues[i-1] = values[i]; \n\t\t\t\n\t\t\tvalues[maxValueCount-1] = newValue;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\tvalues[valueCount] = newValue;\n\t\t\t\n\t\t\tvalueCount++;\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * \tCalculating result value\n\t\t */\n\t\t\n\t\t// Not need calculating if the new value equals the last result...\n\t\tif(resultValue == newValue)\t\n\t\t\treturn resultValue;\n\t\t\n\t\t// If the last result is not equal to the value of the new input value...\n\t\tdouble sum = 0;\n\t\tint div = 0;\n\t\tfor (int i = 0; i < valueCount; i++){\n\t\t\t\n\t\t\tsum += (values[i] * priorities[ ( (maxValueCount-valueCount ) + i) ]);\n\t\t\tdiv += priorities[ ( (maxValueCount-valueCount ) + i) ];\n\t\t\t\n\t\t}\n\t\t\n\t\tthis.resultValue = sum / div;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * If we have new result (not equals the last) than we call onDataChanged method what can be implemented on parent\n\t\t */\n\t\tif(resultValue != lastResultValue)\n\t\t\tthis.onDataChanged();\n\t\t\n\t\t\n\t\t\n\t\t// Returns the new result\n\t\treturn this.resultValue;\n\t}",
"public void addValue(int v) {\n ++totalCount;\n int i = calBucketIndex(v);\n ++buckets[i];\n }",
"public void average(ContentView other) {\n if (this.normalisedRating > 0 && other.normalisedRating > 0) {\n int mergedRatingCount = this.ratingCount + other.ratingCount;\n double ratingTotalHere = this.normalisedRating * this.numberOfViews;\n double ratingTotalThere = other.normalisedRating * other.numberOfViews;\n double mergedRating = (ratingTotalHere + ratingTotalThere) / mergedRatingCount;\n this.normalisedRating = mergedRating;\n \n }\n int mergedNumberOfViews = this.numberOfViews + other.numberOfViews;\n double totalViewingTimeHere = this.averageViewingTime * this.numberOfViews;\n double totalViewingTimeThere = other.averageViewingTime * other.numberOfViews;\n double mergedViewingTime = (totalViewingTimeHere + totalViewingTimeThere) / mergedNumberOfViews;\n this.averageViewingTime = mergedViewingTime;\n this.numberOfViews = mergedNumberOfViews;\n }",
"private void UpdateAdds() {\n Adds = (Level + CurrentHealth)/10;\n }",
"void add(double val) {\r\n\t\tresult = result + val;\r\n\t}",
"public void addRating(double points) {\n rating += points;\n }",
"public void addOneToScore() {\r\n score++;\r\n }",
"public void add(DataSample ds) {\n \tfloat dsAverage = 1.0f;\n \tDataSample s;\n \tfor (int i = 0; i < samples.size(); ++i) {\n \t\ts = samples.get(i);\n \t\tfloat v = averages.get(i);\n \t\tfloat t = compare(s, ds);\n \t\t\n \t\tv += t;\n \t\tdsAverage += t;\n \t\t\n \t\taverages.set(i, v);\n \t}\n \t\n \taverages.add(dsAverage);\n \tsamples.add(ds);\n }",
"@Override\n\tvoid averageDistance() {\n\t\t\n\t}",
"public void add(double val) {\n sum += val;\n sumQ += val * val;\n count++;\n if (val < min) min = val;\n if (val > max) max = val;\n }",
"public void add(MyDouble val) {\n this.setValue(this.getValue() + val.getValue());\n }",
"public double getAverage(){\n return getTotal()/array.length;\n }",
"public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }",
"public void update(String feature, double value) {\n // update the weight of the feature\n if (!weightMap.containsKey(feature)) {\n weightMap.put(feature, value);\n } else {\n weightMap.put(feature, weightMap.get(feature) + value);\n }\n\n // also add to averaging map if averaging is on\n if (doAveraging) {\n if (!weightCacheMap.containsKey(feature)) {\n weightCacheMap.put(feature, value * averagingCoefficient);\n } else {\n weightCacheMap.put(feature, weightCacheMap.get(feature) + value * averagingCoefficient);\n }\n\n averagingCoefficient++;\n }\n }",
"public void add(int index, double value) {\n\t\t\n\t}",
"void printAverageMeasurement(Station station, Sensor sensor, LocalDateTime since, LocalDateTime until, double average);",
"public void update(double val) {\n\n ListEntry entry = new ListEntry(val, getModel().currentTime());\n accumulate.add(entry);\n super.update(val);\n }",
"public double getAverage()\n {\n return getSum() / 2.0;\n }",
"public double getAverage() {\n return this.average;\n }",
"private void calculateMean(float total){\r\n float averageBonds = total/accountInTotal;\r\n float averageAER = (averageBonds-startingBonds)/(startingBonds/100);\r\n\r\n Account averageAccount = new Account(startingBonds,averageBonds,averageAER);\r\n System.out.println(averageAccount.toString());\r\n\r\n }",
"double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}",
"public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}",
"public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}",
"public void add(Double addedAmount) {\n }",
"public void updateToAverageOf(Vector<DataPoint> objects) { \t\n double[] average = new double[values.length];\n for (int i = 0; i < objects.size(); i++) {\n \t//POEY comment: position is a calculated value of a pixel\n Position position = objects.elementAt(i).position;\n for (int j = 0; j < average.length; j++) {\n average[j] += position.values[j];\n }\n }\n for (int i = 0; i < average.length; i++) {\n \t//POEY comment: objects.size() = the number of members in a cluster\n average[i] /= objects.size();\n }\n values = average;\n }",
"public double getRatingAverage() {\n return average;\n }",
"public MeanVar(double value) {\n\t\taddValue(value);\n\t}",
"public void incrementScore(int val) {\n score += val;\n }",
"protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }",
"public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }",
"double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}",
"@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }",
"public void add (int value) {\r\n\t\ttotal = total + value;\r\n\t\thistory = history + \" + \" + value;\r\n\t}",
"public double getCurrentAmplitudeAvg() {\n return publicAvg;\n }",
"private void calculateAverages(){\n for (int i=0; i<40; i=i+4){\n totalGoalsScored1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored1 = totalGoalsScored1/numberItems;\n //Total and average scored goals of team 2\n for (int i=2; i<40; i=i+4){\n totalGoalsScored2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsScored2 = totalGoalsScored2/numberItems;\n //Total and average received goals of team 1\n for (int i=1; i<40; i=i+4){\n totalGoalsReceived1 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived1 = totalGoalsReceived1/numberItems;\n //Total and average received goals of team 2\n for (int i=3; i<40; i=i+4){\n totalGoalsReceived2 += Integer.parseInt(vectorResults[i]);\n }\n averageGoalsReceived2 = totalGoalsReceived2/numberItems;\n }",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"Measurement getAccumulation();",
"public abstract double calcAvRating();",
"public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}",
"double updateValue(double value, double percentage){\n\t\treturn value+=(value*(.01*percentage));\r\n\t}",
"public void value(double value) {\n client.histogram(name, value, tags);\n }",
"double getAvgTreatment();",
"private void addValueToStatMap(HashMap<String, ArrayList<Double>> map, String key, Double value) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new ArrayList<Double>());\r\n }\r\n map.get(key).add(value);\r\n }",
"public double averageFitness()\r\n {\r\n\treturn averageFitness;\r\n }",
"public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }",
"public void addValue() {\n addValue(1);\n }",
"public void add (int value) {\n\t\ttotal = total + value;\n\n\t\thistory = history + \" + \" + value;\n\t\t\n\t}",
"public Builder setAvgTreatment(double value) {\n \n avgTreatment_ = value;\n onChanged();\n return this;\n }",
"public abstract GeneralValue getAverageValue(String fieldName, String subFieldName);",
"public void put(double value) {\n int k = (int) ((value - minValue) / binDiff + 1);\n if (k < 0) k = 0;\n if (k >= bins.length) k = bins.length - 1;\n bins[k]++;\n }",
"void addToAmount(double amount) {\n this.currentAmount += amount;\n }",
"@Override\n\tpublic void\n\tscalarAdd( double value )\n\t{\n\t\tdata[0] += value;\n\t\tdata[1] += value;\n\t\tdata[2] += value;\n\t}",
"public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}",
"double average(double[] doubles) {\n double total = 0.0;\n //int count = 0;\n for (double d: doubles) {\n total = total + d;\n //count = count + 1;\n }\n //return total / count;\n return total / doubles.length;\n }",
"public void addRating(double rating) throws RatingOutOfBoundsException{\n if (rating < minRating || rating > maxRating){\n throw new RatingOutOfBoundsException();\n }\n double totalRating = (averageRating * (double) count) + rating;\n count++;\n averageRating = totalRating / (double) count;\n }",
"public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }",
"protected void onAdd()\n {\n scheduleExpiry();\n\n // update units\n int cNewUnits = calculateUnits(m_oValue);\n OldOldCache map = OldOldCache.this;\n synchronized (map)\n {\n int cOldUnits = m_cUnits;\n if (cOldUnits == -1)\n {\n // entry is discarded; avoid exception\n return;\n }\n\n if (cNewUnits != cOldUnits)\n {\n map.adjustUnits(cNewUnits - cOldUnits);\n m_cUnits = cNewUnits;\n }\n }\n\n // issue add notification\n if (map.hasListeners())\n {\n map.dispatchEvent(map.instantiateMapEvent(\n MapEvent.ENTRY_INSERTED, getKey(), null, getValue()));\n }\n }",
"@Override\r\n\tpublic void addTotal() {\n\t\ttotalPrice += myPrice;\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(OBSERVABLE_EVENT_ADD_TOTAL);\r\n\t}"
] | [
"0.6704612",
"0.6504126",
"0.6499521",
"0.6385513",
"0.63649863",
"0.6344225",
"0.6326342",
"0.62666106",
"0.6233496",
"0.61882997",
"0.61540616",
"0.61511433",
"0.6082376",
"0.60193527",
"0.5972364",
"0.5971498",
"0.59605855",
"0.59519595",
"0.59494054",
"0.593604",
"0.5910032",
"0.5880922",
"0.5860135",
"0.5857655",
"0.5850614",
"0.5848039",
"0.58111763",
"0.5802794",
"0.5801668",
"0.57949173",
"0.57761484",
"0.577131",
"0.5758511",
"0.5756912",
"0.57515585",
"0.5748443",
"0.57459176",
"0.57417643",
"0.5724103",
"0.5722807",
"0.57201076",
"0.5700629",
"0.5697033",
"0.56896526",
"0.5682274",
"0.5675681",
"0.56753373",
"0.566155",
"0.56580126",
"0.5653048",
"0.5653011",
"0.56490576",
"0.56470615",
"0.56174827",
"0.5613775",
"0.5609566",
"0.56072396",
"0.5592664",
"0.5590356",
"0.5588722",
"0.55774105",
"0.556625",
"0.55608094",
"0.55572766",
"0.55448794",
"0.5537927",
"0.55371094",
"0.55316997",
"0.5523385",
"0.55231166",
"0.55184656",
"0.55182993",
"0.5516951",
"0.5514125",
"0.55124223",
"0.5510074",
"0.5508049",
"0.55055594",
"0.5488243",
"0.548758",
"0.54869175",
"0.5483249",
"0.5481619",
"0.5477555",
"0.54702115",
"0.54658484",
"0.54594296",
"0.54539293",
"0.54384315",
"0.5438054",
"0.54346365",
"0.542672",
"0.5422075",
"0.54186726",
"0.541287",
"0.54115504",
"0.5407083",
"0.54064137",
"0.53990036",
"0.5393199"
] | 0.7719244 | 0 |
TODO: Replace this with your own logic | private boolean isEmailValid(String email) {
if(Patterns.EMAIL_ADDRESS.matcher(email).matches()){
return true;
}else {
return false;
}
// return email.contains("@");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void strin() {\n\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"public void identify() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"private void kk12() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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 bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private void searchFunction() {\n\t\t\r\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"private static void iterator() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"void unableToListContents();",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n public void preprocess() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void inorder() {\n\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"public final void mo51373a() {\n }",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"OptimizeResponse() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private void parseData() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void autoDetails() {\n\t\t\r\n\t}",
"protected void onFirstUse() {}",
"private void verificaData() {\n\t\t\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"protected void additionalProcessing() {\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private FlyWithWings(){\n\t\t\n\t}",
"@Override\npublic void processAttributes() {\n\t\n}",
"@Override public int describeContents() { return 0; }",
"@Override\n public int getOrder() {\n return 0;\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n public void apply() {\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public static void listing5_14() {\n }",
"private void init() {\n\n\t}",
"private boolean Verific() {\n\r\n\treturn true;\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}"
] | [
"0.5509385",
"0.54158944",
"0.5396774",
"0.5215123",
"0.5190688",
"0.5150597",
"0.51211643",
"0.51073384",
"0.5095154",
"0.50465494",
"0.5040486",
"0.50389224",
"0.50364757",
"0.502146",
"0.49883768",
"0.4981401",
"0.49805945",
"0.49671677",
"0.49149847",
"0.4887455",
"0.4879425",
"0.48635346",
"0.48420334",
"0.48340645",
"0.48189205",
"0.48187172",
"0.4808114",
"0.48028776",
"0.4796093",
"0.47947544",
"0.47947544",
"0.47890067",
"0.47534978",
"0.47504193",
"0.47466296",
"0.47355276",
"0.4732738",
"0.47320697",
"0.47312364",
"0.47257116",
"0.4722465",
"0.47189128",
"0.47091064",
"0.46959445",
"0.46874925",
"0.4686706",
"0.46767086",
"0.46766508",
"0.46759418",
"0.46757355",
"0.46681204",
"0.466252",
"0.4660168",
"0.46567616",
"0.46567616",
"0.46561918",
"0.46529302",
"0.46462792",
"0.46440098",
"0.464219",
"0.4642112",
"0.46417132",
"0.46417132",
"0.46417132",
"0.46417132",
"0.46417132",
"0.46417132",
"0.46341845",
"0.4629902",
"0.4626377",
"0.4624327",
"0.45986152",
"0.45959175",
"0.4591355",
"0.45901948",
"0.4585138",
"0.4575297",
"0.45745215",
"0.45725673",
"0.45718595",
"0.4571065",
"0.45681888",
"0.45681888",
"0.45642078",
"0.4553234",
"0.4546516",
"0.45442834",
"0.45298865",
"0.45197403",
"0.45150104",
"0.45136994",
"0.45122144",
"0.45038503",
"0.450014",
"0.44974804",
"0.4497435",
"0.4490545",
"0.44896576",
"0.448611",
"0.448611",
"0.44830936"
] | 0.0 | -1 |
TODO: Replace this with your own logic | private boolean isPasswordValid(String password) {
return password.length() >= 4;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void strin() {\n\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void identify() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"private void kk12() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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 bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"private void searchFunction() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"private static void iterator() {\n\t\t\r\n\t}",
"void unableToListContents();",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n public void preprocess() {\n }",
"@Override\n\tpublic void inorder() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"public final void mo51373a() {\n }",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"OptimizeResponse() {\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}",
"@Override\n protected void prot() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private void parseData() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"private void verificaData() {\n\t\t\n\t}",
"protected void onFirstUse() {}",
"protected void additionalProcessing() {\n\t}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private FlyWithWings(){\n\t\t\n\t}",
"@Override\npublic void processAttributes() {\n\t\n}",
"@Override\n public int getOrder() {\n return 0;\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void apply() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"public static void listing5_14() {\n }",
"private void init() {\n\n\t}",
"private boolean Verific() {\n\r\n\treturn true;\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}"
] | [
"0.5507535",
"0.5415208",
"0.5397241",
"0.5213475",
"0.5190509",
"0.51507944",
"0.51187396",
"0.51061547",
"0.50923496",
"0.5043965",
"0.50385827",
"0.5036471",
"0.5034677",
"0.50192416",
"0.4987654",
"0.49783257",
"0.4978075",
"0.49653882",
"0.4915975",
"0.4886251",
"0.48785812",
"0.4861412",
"0.48403654",
"0.4833164",
"0.48169032",
"0.4816278",
"0.48058003",
"0.48010588",
"0.4793169",
"0.4792254",
"0.4792254",
"0.47868094",
"0.4752871",
"0.474974",
"0.47449896",
"0.473353",
"0.47332662",
"0.47318083",
"0.47297978",
"0.47262013",
"0.4720622",
"0.472054",
"0.47109193",
"0.46965185",
"0.46874917",
"0.46861723",
"0.46773893",
"0.46754944",
"0.46751675",
"0.46728423",
"0.46665418",
"0.46595815",
"0.4659023",
"0.46574843",
"0.4653462",
"0.4653462",
"0.46502182",
"0.46460542",
"0.46427584",
"0.46411404",
"0.4641",
"0.46384826",
"0.46384826",
"0.46384826",
"0.46384826",
"0.46384826",
"0.46384826",
"0.46357882",
"0.46275544",
"0.46262828",
"0.46224847",
"0.45991594",
"0.45946229",
"0.45895043",
"0.4588706",
"0.4582062",
"0.45743963",
"0.4572707",
"0.45715684",
"0.45714563",
"0.45680514",
"0.456507",
"0.456507",
"0.4562768",
"0.45504895",
"0.4543864",
"0.45438486",
"0.45265993",
"0.45183256",
"0.4512405",
"0.45121822",
"0.45096955",
"0.45013356",
"0.44994572",
"0.44962966",
"0.44951797",
"0.44885734",
"0.44867834",
"0.4482955",
"0.4482955",
"0.4481686"
] | 0.0 | -1 |
TODO: Replace this with your own logic | private boolean isPhoneValid(String phoneno) {
return phoneno.length() > 9;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void strin() {\n\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void identify() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"private void kk12() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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 bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void method_4270() {}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n protected void parseDocuments()\r\n {\n\r\n }",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"private void searchFunction() {\n\t\t\r\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"private static void iterator() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"void unableToListContents();",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n public void preprocess() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void inorder() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"public final void mo51373a() {\n }",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"OptimizeResponse() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"private void parseData() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tprotected void doPre() {\n\t\t\r\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"private void verificaData() {\n\t\t\n\t}",
"protected void onFirstUse() {}",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"protected void additionalProcessing() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private FlyWithWings(){\n\t\t\n\t}",
"@Override\npublic void processAttributes() {\n\t\n}",
"@Override public int describeContents() { return 0; }",
"@Override\n public int getOrder() {\n return 0;\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void apply() {\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"public static void listing5_14() {\n }",
"private boolean Verific() {\n\r\n\treturn true;\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"private void level7() {\n }"
] | [
"0.5509513",
"0.5416716",
"0.53972626",
"0.52148324",
"0.51912016",
"0.5150658",
"0.51203597",
"0.5107223",
"0.5094417",
"0.5045308",
"0.5040466",
"0.50383174",
"0.50355756",
"0.5019427",
"0.49884495",
"0.4980835",
"0.4980173",
"0.49672136",
"0.4916144",
"0.48879814",
"0.48792958",
"0.48636994",
"0.48412624",
"0.48350462",
"0.48189464",
"0.4818173",
"0.48079768",
"0.48029807",
"0.47961116",
"0.47945276",
"0.47945276",
"0.47890687",
"0.47536206",
"0.47503722",
"0.47457552",
"0.47353446",
"0.47328603",
"0.4731947",
"0.47303644",
"0.4725485",
"0.47220707",
"0.47201464",
"0.47094288",
"0.46964547",
"0.46874884",
"0.46864253",
"0.46776217",
"0.46768472",
"0.46760824",
"0.46746758",
"0.4668794",
"0.4661218",
"0.46604168",
"0.4655551",
"0.4655551",
"0.46553555",
"0.46522096",
"0.46479344",
"0.46425977",
"0.464247",
"0.46416593",
"0.464036",
"0.464036",
"0.464036",
"0.464036",
"0.464036",
"0.464036",
"0.4635292",
"0.46306917",
"0.46263272",
"0.4623456",
"0.45985743",
"0.45942008",
"0.45901513",
"0.4589668",
"0.45824465",
"0.45748156",
"0.45726073",
"0.4572574",
"0.45699257",
"0.45697474",
"0.45671764",
"0.45671764",
"0.45641932",
"0.45515755",
"0.4545743",
"0.4543969",
"0.45284832",
"0.45207804",
"0.45145258",
"0.45139822",
"0.4511334",
"0.45037892",
"0.45013312",
"0.44969857",
"0.44962263",
"0.44902757",
"0.4488778",
"0.4485136",
"0.4485136",
"0.44831565"
] | 0.0 | -1 |
Method to make json object request where json response starts wtih | private void makeRegisterRequest(String name, String mobile,
String email, String password) {
final SweetAlertDialog loading=new SweetAlertDialog(RegisterActivity.this,SweetAlertDialog.PROGRESS_TYPE);
loading.setCancelable(false);
loading.setTitleText("Loading...");
loading.getProgressHelper().setBarColor(getResources().getColor(R.color.green));
loading.show();
String refercode=et_refer.getText().toString();
// Tag used to cancel the request
String tag_json_obj = "json_register_req";
Map<String, String> params = new HashMap<String, String>();
params.put("user_name", name);
params.put("user_mobile", mobile);
params.put("user_email", email);
params.put("password", password);
if(!refercode.isEmpty()){
params.put("referal_code",refercode);
}
CustomVolleyJsonRequest jsonObjReq = new CustomVolleyJsonRequest(Request.Method.POST,
BaseURL.REGISTER_URL, params, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
Log.d(TAG, response.toString());
try {
loading.dismiss();
Boolean status = response.getBoolean("responce");
if (status) {
String msg = response.getString("message");
Toast.makeText(RegisterActivity.this, "" + msg, Toast.LENGTH_SHORT).show();
Intent i = new Intent(RegisterActivity.this, LoginActivity.class);
startActivity(i);
if(!f)
{
finish();
}
btn_register.setEnabled(false);
} else {
String error = response.getString("error");
btn_register.setEnabled(true);
Toast.makeText(RegisterActivity.this, "" + error, Toast.LENGTH_SHORT).show();
}
} catch (JSONException e) {
e.printStackTrace();
loading.dismiss();
}
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
VolleyLog.d(TAG, "Error: " + error.getMessage());
if (error instanceof TimeoutError || error instanceof NoConnectionError) {
Toast.makeText(RegisterActivity.this, getResources().getString(R.string.connection_time_out), Toast.LENGTH_SHORT).show();
loading.dismiss();
}
}
});
// Adding request to request queue
AppController.getInstance().addToRequestQueue(jsonObjReq, tag_json_obj);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract Object buildJsonObject(R response);",
"void sendJson(Object data);",
"private <T> JSONObject getJSONFromObject(T request) throws IOException, JSONException {\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);\n String temp = null;\n temp = mapper.writeValueAsString(request);\n JSONObject j = new JSONObject(temp);\n\n return j;\n }",
"protected abstract JSONObject build();",
"private JSON() {\n\t}",
"@Override\n public JSONObject getRequestJSON() throws JSONException {\n return null;\n }",
"public Response() {\n objectMap = new JSONObject<>();\n }",
"String getJson();",
"String getJson();",
"String getJson();",
"public abstract T zzb(JSONObject jSONObject);",
"@GET\n @Path(\"{name}/object\")\n public JsonObject jsonObject(@PathParam(\"name\") String name) {\n return new JsonObject().put(\"Hello\", name);\n }",
"private static JsonObject getJsonObject(String request_url) {\n JsonObject jsonResponse = new JsonParser().parse(NetworkUtils.getResponseBody(request_url)).getAsJsonObject();\n return jsonResponse;\n }",
"@Override\r\n\tpublic Response buildResponse(JSONObject json) {\r\n\r\n\t\tResponseBuilder builder = Response.ok(json);\r\n\t\tbuilder.header(CROS, STAR);\r\n\t\treturn builder.build();\r\n\t}",
"private ObjectNode makeRequest(final String api) {\n ObjectNode req = JSON.objectNode();\n req.put(\"api\", api);\n return req;\n }",
"String getJSON();",
"public void jsonPresentation () {\n System.out.println ( \"****** Json Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n String jsonData = \"\";\n ObjectMapper mapper = new ObjectMapper();\n bookArrayList = new Request().postRequestBook();\n try {\n jsonData = mapper.writeValueAsString(bookArrayList);\n } catch (JsonProcessingException e) {\n System.out.println(\"Error: \"+ e);\n }\n System.out.println(jsonData);\n ClientEntry.showMenu ( );\n }",
"public abstract VKRequest mo118416a(JSONObject jSONObject);",
"@Override\n\tprotected JsonObject startResponse() {\n\t\tJsonObject startResp = new JsonObject();\n\t\tstartResp.addProperty(\"rootValue\", this.root.getValue());\n\t\tstartResp.addProperty(\"currValue\", this.currDisplayedNumber);\n\t\treturn startResp;\n\t}",
"public JSONObject buildJson() {\n Map<String, String> reqData = new HashMap<>();\n reqData.put(\"id\", id);\n reqData.put(\"summary\", summary);\n reqData.put(\"location\", location);\n reqData.put(\"description\", description);\n reqData.put(\"color\", color);\n reqData.put(\"emailReminderMinutes\", Integer.toString(emailReminderMinutes));\n reqData.put(\"repetitionInterval\", Integer.toString(repetitionInterval));\n reqData.put(\"startDate\", startDate);\n reqData.put(\"endDate\", endDate);\n return new JSONObject(reqData);\n }",
"void generateJSON(JSONObject object, String name);",
"public String getJson();",
"@Override\n public void onResponse(JSONObject jsonObject)\n {\n }",
"private JsonObject OnGoingRideObject()\n {\n OnGoingRideRequestModel requestModel = new OnGoingRideRequestModel();\n requestModel.setUserId(UserId);\n return new Gson().toJsonTree(requestModel).getAsJsonObject();\n }",
"protected Response createInsertingrequest(String urlFA,JSONObject jsonObject,HttpBasicAuthFilter auth,String type){\n ClientConfig config = new ClientConfig();\n Client client = ClientBuilder.newClient(config);\n WebTarget target;\n target = client.target(getBaseURI(urlFA));\n //Response plainAnswer =null; \n target.register(auth);\n \n Invocation.Builder invocationBuilder =target.request(MediaType.APPLICATION_JSON);\n MultivaluedHashMap<String,Object> mm=new MultivaluedHashMap<String,Object>();\n mm.add(\"content-type\", MediaType.APPLICATION_JSON);\n mm.add(\"Accept\", \"application/json\");\n mm.add(\"charsets\", \"utf-8\");\n invocationBuilder.headers(mm);\n //preliminary operation of request creation ended\n Response plainAnswer=null;\n switch(type){\n case \"post\":\n {\n plainAnswer=invocationBuilder\n .post(Entity.entity(jsonObject.toString(), MediaType.APPLICATION_JSON_TYPE));\n break;\n }\n case \"put\":\n {\n plainAnswer =invocationBuilder\n .put(Entity.entity(jsonObject.toString(), MediaType.APPLICATION_JSON));\n break;\n }\n }\n return plainAnswer;\n }",
"@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}",
"public String fillRequestBody(){\n\n Gson gson = new Gson();\n ApiSetlistRequestDTO apiSetlistRequestDTO = gson.fromJson(fileOperations.bufferedReader(configurationGet.getApiSetlistRequestJSonBodyResourcePath()), ApiSetlistRequestDTO.class);\n\n apiSetlistRequestDTO.setPage(30303030);\n apiSetlistRequestDTO.setPerPage(8888888);\n apiSetlistRequestDTO.setTotal(300000000);\n apiSetlistRequestDTO.setTotalPages(88888888);\n\n Datum data = new Datum();\n data.setId(10);\n data.setName(\"fghfdasfghgfdsfg\");\n data.setYear(453453);\n data.setColor(\"#f43242\");\n data.setPantoneValue(\"Test dfgfdgfdg Value\");\n\n Datum data2 = new Datum();\n data2.setId(15);\n data2.setName(\"burak\");\n data2.setYear(19);\n data2.setColor(\"#tyuyrefe\");\n data2.setPantoneValue(\"fsd\");\n\n List<Datum> datumList = apiSetlistRequestDTO.getData();\n datumList.set(0,data);\n datumList.set(5,data2);\n\n apiSetlistRequestDTO.setData(datumList);\n\n /*for (Datum data : exampleTestClass.getData()){\n data.setId(10);\n data.setName(\"Sarı\");\n data.setYear(5000);\n data.setColor(\"#999999999\");\n data.setPantoneValue(\"Test Pandone Value\");\n }*/\n\n logger.info(\"Manipule Edilen Data:\" + gson.toJson(apiSetlistRequestDTO));\n\n return gson.toJson(apiSetlistRequestDTO);\n }",
"JSONStreamAware processRequest(HttpServletRequest paramHttpServletRequest)\r\n/* 18: */ {\r\n/* 19:19 */ JSONObject localJSONObject = new JSONObject();\r\n/* 20:20 */ localJSONObject.put(\"host\", paramHttpServletRequest.getRemoteHost());\r\n/* 21:21 */ localJSONObject.put(\"address\", paramHttpServletRequest.getRemoteAddr());\r\n/* 22:22 */ return localJSONObject;\r\n/* 23: */ }",
"public static JSONObject createJSONObject(RequirementForm req)\r\n{\r\n\tString keys[] = {\"id\", \"nameReq\",\"nameGroup\",\"startDate\",\"endDate\",\"process\",\"statusReq\", \"lateDate\", \"stage\" };\r\n \r\n\tJSONObject uc = new JSONObject(keys);\r\n uc.getObject().put(keys[0], String.valueOf(req.getId()));\r\n uc.getObject().put(keys[1], CommonUtil.convertNVLFor(req.getNameReq()));\r\n uc.getObject().put(keys[2], req.getNameGroup());\r\n uc.getObject().put(keys[3], req.getStartDate());\r\n uc.getObject().put(keys[4], req.getEndDate());\r\n uc.getObject().put(keys[5], String.valueOf(req.getProcess()));\r\n uc.getObject().put(keys[6], String.valueOf(req.getStatusReq()));\r\n uc.getObject().put(keys[7], String.valueOf(req.getLateDate()));\r\n uc.getObject().put(keys[8], String.valueOf(req.getStage()));\r\n\r\n return uc; \r\n}",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000);\n urlConnection.setConnectTimeout(15000);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the Guardian JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"protected JSONObject createAllOkKSON() {\r\n\t\tJSONObject jo = new JSONObject();\r\n\t\tjo.put(OnlineKeys.RESULT, \"OK\");\r\n\t\treturn jo;\r\n\t}",
"JSONObject toJson();",
"JSONObject toJson();",
"public abstract Object toJson();",
"JsonObject raw();",
"public void generateVehicleReq(final Location point, int radius, Response.Listener<JSONObject> onRes) throws JSONException {\n\n String url = \"https://api.bird.co/bird/nearby?\";\n\n url+=\"latitude=\"+point.getLatitude();\n url+=\"&longitude=\"+point.getLongitude();\n url+=\"&radius=\"+radius;\n\n JSONObject obj = new JSONObject();\n\n\n Response.ErrorListener onErr = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"error \" +\n \"on GET request from bird\");\n System.out.println(error.toString());\n //bad request or something\n\n }\n };\n //set vehicle request\n vehicleReq = new JsonObjectRequest(Request.Method.GET,url,obj,onRes,onErr) {\n /**\n * add headers\n */\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap headers = new HashMap();\n headers.put(\"Authorization\", token);\n headers.put(\"Device-id:\", \"801087ee-88a2-4ff7-9067-2e090007ffb6\");\n headers.put(\"App-Version\",\"3.0.5\");\n\n String locH = \"{\";\n locH+= \"\\\"latitude\\\":\"+point.getLatitude()+\",\";\n locH+= \"\\\"longitude\\\":\"+point.getLongitude()+\",\";\n locH+= \"\\\"altitude\\\":\"+ 0 + \",\";\n locH+= \"\\\"accuracy\\\":\"+ 100 + \",\";\n locH+= \"\\\"speed\\\":\"+ -1 + \",\";\n locH+= \"\\\"heading\\\":\"+ -1;\n locH+= \"}\";\n\n headers.put(\"Location\",locH);\n return headers;\n }\n };\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the posts JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n\n\n return jsonResponse;\n }",
"private void cargarDetalleStory(String idStory) {\n\n HashMap<String, String> data = new LinkedHashMap<>();\n data.put(\"story_id\", idStory);\n\n JSONObject jsonObject = new JSONObject (data);\n\n System.out.print(jsonObject.toString());\n\n VolleySingleton.getInstance(getContext()).addToRequestQueue(\n new JsonObjectRequest(\n Request.Method.POST,\n Constantes.GET_STORY,\n jsonObject,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n obtenerStorybyId(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity().getApplicationContext(), \"An error has occur. Please try again.\", Toast.LENGTH_LONG).show();\n }\n }\n ) {\n @Override\n public Map<String, String> getHeaders() {\n Map<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json; charset=utf-8\");\n headers.put(\"Accept\", \"application/json\");\n return headers;\n }\n\n @Override\n public String getBodyContentType() {\n return \"application/json; charset=utf-8\" + getParamsEncoding();\n }\n }\n );\n\n }",
"@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }",
"public JSONObject getResponse(){\n try {\n URL finalURL = new URL(url);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(finalURL.openStream()));\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n sb.append(inputLine);\n }\n in.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n String str = sb.toString();\n try {\n json = new JSONObject(str);\n } catch (Exception e) {\n\n }\n return json;\n }",
"@GET\n @Path(\"location/Arovince\")\n @Produces(\"application/json\")\n public String getJson() throws IOException {\n FileWriter file = new FileWriter(\"/home/component/NetBeansProjects/ArovinceAndSchool/web/api/Arovince.json\");\n JSONObject jsonArray = null;\n\n try {\n URL url = new URL(\"https://opend.data.go.th/get-ckan/datastore_search?resource_id=df922923-e009-4dee-92fc-d963a86ce4b8\"); \n HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection();\n httpURLConnection.setRequestMethod(\"GET\");\n httpURLConnection.setRequestProperty(\"api-key\", \"XOe9aVTolOhCbyTU103IqAKTNNNPX8b5\");\n String line = \"\";\n InputStreamReader inputStreamReader = new InputStreamReader(httpURLConnection.getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder response = new StringBuilder();\n\n try {\n while((line = bufferedReader.readLine()) != null) {\n file.write(line);\n response.append(line);\n }\n } catch (IOException var10) {\n }\n\n file.close();\n bufferedReader.close();\n jsonArray = new JSONObject(response.toString());\n return jsonArray.toString(4);\n } catch (Exception var11) {\n return \"\" + var11;\n }\n }",
"@Override\n public void onResponse(JSONObject jsonObject) {\n System.out.println(jsonObject.toString());\n //Log.d(\"response from api\", \"onResponse: \\n\"\n // + jsonObject.toString());\n try {\n JSONObject j = jsonObject.getJSONObject(\"data\");\n Log.d(\"response from api\", j.toString());\n JSONObject rr = j.getJSONObject(\"orders\");\n Log.d(\"response from api\", rr.toString());\n Gson json = new Gson();\n Order me = json.fromJson(rr.toString(), Order.class);\n singleorder = me;\n Log.d(\"response from api\", me.getName());\n } catch (JSONException e) {\n Log.d(\"response from api\", \"paaaapiiii\");\n e.printStackTrace();\n }\n }",
"public void getJSON() throws JSONException {\n url = setUrl();\n System.out.println(\"after setAsyncUrl url = \" + url);\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder()\n .url(url)\n .build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n e.printStackTrace();\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n if(response.isSuccessful()){\n jString = new String(response.body().string());\n if(V)System.out.println(\"jString = \" + jString);\n try {\n addSearchFragment(jString); // add retrieved search fragments to screen\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }",
"private JsonObject postAsJson(URL url, String json) {\n // System.out.format(\"postAsJson URL: %s JSON: \\n%s\\n\", url.toString(), json);\n HttpsURLConnection urlConnection;\n InputStream inputStream = null;\n OutputStream outputStream = null;\n JsonObject jsonObject = null;\n try {\n urlConnection = (HttpsURLConnection) url.openConnection();\n urlConnection.setRequestProperty(\"Cache-Control\", \"no-cache\");\n urlConnection.setRequestProperty(\"Accept\", \"application/json\");\n urlConnection.setRequestProperty(\"User-Agent\", \"Jediverse CLI\");\n urlConnection.setUseCaches(false);\n urlConnection.setRequestMethod(Literals.POST.name());\n if (settingsJsonObject != null) {\n String authorization = String.format(\"Bearer %s\", Utils.getProperty(settingsJsonObject, Literals.access_token.name()));\n urlConnection.setRequestProperty(\"Authorization\", authorization);\n // System.out.format(\"Setting authorization header: %s\\n\", authorization);\n }\n if (json != null) {\n urlConnection.setRequestProperty(\"Content-type\", \"application/json; charset=UTF-8\");\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\"Content-length\", Integer.toString(json.length()));\n outputStream = urlConnection.getOutputStream();\n outputStream.write(json.getBytes());\n outputStream.flush();\n int responseCode = urlConnection.getResponseCode();\n System.out.format(\"Response code: %d\\n\", responseCode);\n }\n urlConnection.setInstanceFollowRedirects(true);\n inputStream = urlConnection.getInputStream();\n InputStreamReader isr = new InputStreamReader(inputStream);\n jsonObject = gson.fromJson(isr, JsonObject.class);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n Utils.close(inputStream, outputStream);\n }\n return jsonObject;\n }",
"private static JSONObject placeOrderByPost(org.json.simple.JSONObject shipMent) throws org.json.simple.parser.ParseException {\n\t\tJSONObject jObject = new JSONObject();\n\t\tString line = \"\";\n\t\tJSONParser parser = new JSONParser();\n\t\tJSONObject newJObject = null;\n\t\tSystem.out.println(\"shipment object-->\"+shipMent.toJSONString());\n\t\ttry{\n\t\t\tDefaultHttpClient client = new DefaultHttpClient();\n\t\t\t//client = (DefaultHttpClient) wrapClient(client);\n\t\t\t/* TESTING URL */\n\t\t\t//String url=\"https://apitest.roadrunnr.in/v1/orders/ship\";\n\t\t\t/* LIVE URL : https://runnr.in/v1/orders/ship\n\t\t\t//String url=\"http://roadrunnr.in/v1/orders/ship\";\n\t\t\t//New url*/\n\t\t\tString url =\"http://api.pickji.com/corporateapi/sandbox/placeorder\";\n\t\t\tHttpPost post = new HttpPost(url.trim());\n\t\t\tStringEntity input = new StringEntity(shipMent.toJSONString());\n\t\t\tpost.addHeader(\"Content-Type\", \"application/json\");\n\t\t\t//post.addHeader(\"Authorization\" , generateAuthToken());\n\t\t\t//post.addHeader(\"Authorization\" ,getToken(false));\n\n\t\t\tpost.setEntity(input);\n\t\t\t//System.out.println(\"StringEntity - - ->\"+input.toString());\n\t\t\tHttpResponse response = client.execute(post);\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent())); \n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\t// System.out.println(\"Line - - >\"+line);\n\t\t\t\tnewJObject = new JSONObject(line);\n\t\t\t}\n\t\t}catch(UnsupportedEncodingException e){\n\n\t\t}catch(JSONException e){\n\n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn newJObject; \n\t}",
"public JsonRequestSerializer() {\n this(JNC.GSON);\n }",
"@RequestMapping(path=\"/initPaymentGet\", method = RequestMethod.GET)//, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<Object> test() {\n\t\tlogger.info(\"Init payment\");\n\t\t//System.out.println(\"DTO: \" + btcDTO.getPrice_currency());\n\t\tString pom = \"\";\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", \"ab7fzPdN49-xBVoY_LdSifCZiVrqCbdcfjWdweJS\");\n\t\tResponseEntity<String> responseEntity = new RestTemplate().exchange(CREATE_ORDER_API, HttpMethod.GET,\n\t\t\t\tnew HttpEntity<String>(pom, headers), String.class);\n\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.getForEntity(\"https://api-sandbox.coingate.com/v2/orders\", String.class);\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\treturn new ResponseEntity<Object>(responseEntity,HttpStatus.OK);\n\t}",
"public HTTPResponse finish() {\n HTTPResponse response = new HTTPResponse();\n try {\n //create the HTTP connection\n super.CreateConnection();\n //write the JSON data via DataOutputStream\n DataOutputStream dataOutputStream = new DataOutputStream(super.httpConn.getOutputStream());\n dataOutputStream.writeBytes(jsonParam.toString());\n //get the results\n response.setResponseCode(super.httpConn.getResponseCode());\n response.setResponseBody(super.readResponseBody());\n dataOutputStream.flush();\n dataOutputStream.close();\n super.httpConn.disconnect();\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n }\n return response;\n }",
"public void createRequest(final String query, JsonHttpResponseHandler handler) {\n try {\n String url = getApiUrl(\"\");\n client.get(url + URLEncoder.encode(query, \"utf-8\"), handler);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }",
"public JSONObject insertIntoJson(ClientModel m){\n JSONObject json = new JSONObject();\n\n //inserting key value pairs in json object\n if(!m.getFristName().equals(\"None\")){\n json.put(\"firstName\", m.getFristName());\n }\n\n if(!m.getLastName().equals(\"None\")){\n json.put(\"lastName\", m.getLastName());\n }\n\n if(!m.getAddres().equals(\"None\")){\n json.put(\"address\", m.getAddres());\n }\n\n if(m.getAge() > 0){\n json.put(\"age\", m.getAge());\n }\n\n if(m.getSalary() > 0){\n json.put(\"salary\", \"$\" + m.getSalary());\n }\n\n return json; //return the json object\n }",
"@GET\n @Produces(\"application/json\")\n public String getJson() {\n\n JSONObject rezultat = new JSONObject();\n\n List<Korisnici> korisnici = korisniciFacade.findAll();\n\n \n\n try {\n for (Korisnici k : korisnici) {\n if (k.getIdkorisnik() == Long.parseLong(id)) {\n\n SoapListaAdresa soapOdgovor = listaDodanihAdresaBesplatno(k.getKorisnickoime(), k.getLozinka());\n\n List<Adresa> adrese = soapOdgovor.getAdrese();\n \n JSONArray jsonPolje = new JSONArray();\n int brojac = 0;\n for (Adresa a : adrese) {\n JSONObject jsonAdresa = new JSONObject();\n jsonAdresa.put(\"idadresa\", a.getIdadresa());\n jsonAdresa.put(\"adresa\", a.getAdresa());\n jsonAdresa.put(\"lat\", a.getGeoloc().getLatitude());\n jsonAdresa.put(\"long\", a.getGeoloc().getLongitude());\n jsonPolje.put(brojac,jsonAdresa);\n brojac++;\n }\n rezultat.put(\"adrese\", jsonPolje);\n } \n }\n return rezultat.toString();\n } catch (JSONException ex) {\n Logger.getLogger(MeteoRESTResource.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }",
"private void createJSON(){\n json = new JSONObject();\n JSONArray userID = new JSONArray();\n JSONArray palabras = new JSONArray();\n JSONArray respuesta = new JSONArray();\n\n @SuppressLint(\"SimpleDateFormat\") DateFormat formatForId = new SimpleDateFormat(\"yyMMddHHmmssSSS\");\n String id = formatForId.format(new Date()) + \"_\" + android_id;\n userID.put(id);\n global.setUserID(id);\n\n for (int i = 0; i < global.getWords().size() && i < 7; i++){\n palabras.put(global.getWords().get(i));\n }\n\n respuesta.put(url);\n\n try {\n json.put(\"userID\", userID);\n json.put(\"palabras\", palabras);\n json.put(\"respuesta\", respuesta);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Test\n public void oneSpartanPojo(){\n Response response = given().accept(ContentType.JSON)\n .and().pathParam(\"id\", 15)\n .and().get(\"http://18.232.145.26:8000/api/spartans/{id}\");\n\n // Verify response status code should be 200\n Assert.assertEquals(response.statusCode(), 200 , \"Verify status code : \");\n\n // Convert Json to POJO( Our custom Spartan java class )\n Spartan spartan15 = response.body().as(Spartan.class);\n System.out.println(\"spartan15 = \" + spartan15);\n System.out.println(\"spartan15.getNames() = \" + spartan15.getName());\n System.out.println(\"spartan15.getId() = \" + spartan15.getId());\n\n\n }",
"@Override\r\n JSONObject doPerform(HttpServletRequest req, HttpServletResponse response) throws Exception {\r\n JSONObject jo = new JSONObject();\r\n try {\r\n JSONObject json;\r\n if (req.getMethod().equals(\"POST\")) {\r\n String js = IOUtils.toString(req.getInputStream(), \"UTF-8\");\r\n json = new JSONObject(js);\r\n } else {\r\n json = new JSONObject(req.getParameter(\"json\"));\r\n }\r\n OfferRecord or = OfferRecord.fromJSON(json);\r\n JSONObject ret = new JSONObject(SolrIndexerCommiter.indexJSON(new JSONObject(JSON.toJSONString(or)), \"offersCore\"));\r\n\r\n// Indexer indexer = new Indexer();\r\n// indexer.indexWanted(or.doc_code,\r\n// UsersController.toKnihovna(req).getCode(),\r\n// or.chci);\r\n return ret;\r\n\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n jo.put(\"error\", ex.toString());\r\n }\r\n return jo;\r\n\r\n }",
"public static JSONObject readJsonObject(HttpServletRequest request) {\n StringBuffer sb = new StringBuffer();\n String line = null;\n try {\n\t //get the body information from request which is a kind JSON file.\n BufferedReader reader = request.getReader(); \n while ((line = reader.readLine()) != null) {\n \t sb.append(line);\n }\n reader.close();\n return new JSONObject(sb.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }",
"public void test_01() {\n\t\tpostobject jsonobjectdata = new postobject();\n\n\t\tjsonobjectdata.setID(\"5\");\n\t\tjsonobjectdata.settitle(\"updated Mr\");\n\t\tjsonobjectdata.setfirst_name(\"updated Rahaman\");\n\t\tjsonobjectdata.setauthor(\"updated Ata\");\n\n\t\tResponse reponse = given().\n\t\t\t\tbody(jsonobjectdata).\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tput(\"http://localhost:3000/posts/05\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}",
"private void downloadJSON() {\n new downloadJsonAsync().execute(Urls.GET_TAGS, Urls.GET_REST);\n }",
"private void makeJsonObjReq(JSONObject json,String url,final String file) {\n\t\t showProgressDialog();\n\t\t\tRequestQueue mRequestQueue = Volley.newRequestQueue(getApplicationContext());\n\t\t\tJsonUTF8Request jsonObjReq = new JsonUTF8Request(Method.POST,\n\t\t\t\turl, json,\n\t\t\t\tnew Response.Listener<JSONObject>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onResponse(JSONObject response) {\n\t\t\t\t\t\tLog.d(TAG, response.toString());\n\t\t\t\t\t // Dismiss the progress dialog\n\t\t\t\t\t\t \t JSONObject jsonObjSend = null;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tjsonObjSend = new JSONObject(response.toString());\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\t\t\tparseJsonFeed(response, file);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t \t} catch (JSONException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t} \n \n\t\t\t\t\t\thideProgressDialog();\n\t\t\t\t\t}\n\t\t\t\t}, new Response.ErrorListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onErrorResponse(VolleyError error) {\n\t\t\t\t\t\tVolleyLog.d(TAG, \"Error: \" + error.getMessage());\n\t\t\t\t\t\tif(incrConnexion<=Const.count)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpublier();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tToast.makeText(getBaseContext(),getString(R.string.st_connection_failled), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t\thideProgressDialog();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tincrConnexion++;\n\t\t\t\t\t}\n\t\t\t\t}) {\n\n\t\t\t/**\n\t\t\t * Passing some request headers\n\t\t\t * */\n\t\t\t@Override\n\t\t\tpublic Map<String, String> getHeaders() throws AuthFailureError {\n\t\t\t\tHashMap<String, String> headers = new HashMap<String, String>();\n\t\t\t\theaders.put(\"Content-Type\", \"application/json;charset=UTF-8\");\n\t\t\t\treturn headers;\n\t\t\t}\n \n\n\t\t};\n\t\t/*\n\t\tint socketTimeout = Const.timer_connection_request;//30 seconds - change to what you want\n\t\tRetryPolicy policy = new DefaultRetryPolicy(socketTimeout, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);\n\t\tjsonObjReq.setRetryPolicy(policy);\n\t\tmRequestQueue.add(jsonObjReq);\n\t\t*/\n\t\t// Adding request to request queue\n\t\tAppController.getInstance().addToRequestQueue(jsonObjReq,\n\t\t\t\ttag_json_obj);\n \t}",
"@Test\n\tpublic void test_04() {\n\n\t\t//Json data configuration\n\t\tcomplexobjectinformationclass childdataobject = new complexobjectinformationclass();\n\t\tcomplexobjectclass dataobject = new complexobjectclass();\n\n\t\tchilddataobject.setEmail(\"[email protected]\");\n\t\tchilddataobject.setPhone(\"12300000\");\n\t\tchilddataobject.setAddress(\"Bangladesh\");\n\n\t\tdataobject.setId(\"2\");\n\t\tdataobject.setAuthor(\"ataure\");\n\t\tdataobject.setTitle(\"This is title\");\n\t\tdataobject.setinformation(childdataobject);\n\n\n\t\t//Request body\n\t\tResponse reponse = given().\n\t\t\t\twhen().\n\t\t\t\tcontentType(ContentType.JSON).\n\t\t\t\tbody(dataobject).\n\t\t\t\tpost(\"http://localhost:3000/posts\");\n\n\t\tSystem.out.println(\"updated response data \"+ reponse.asString());\t\t\n\t}",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n //Si la URL es null se devuelve inediatamente.\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(100000 /* Milisegundos.*/);\n urlConnection.setConnectTimeout(100000 /* Milisegundos.*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // Si la request se realiza correctamente (código de respuesta 200) se lee el input\n // stream y se le hace parse a la respuesta.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error de conexión: \" + urlConnection.getResponseCode());\n }\n // Aquí simplemente hacemos catch a la IOException.\n\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problema obteniendo los datos en JSON del servidor\", e);\n // Independientemente de que se lance una exception o no en el bloque finally se realiza\n // una desconexión (o se \"cierra\" como en el caso del inputStream) para poder reusarlo.\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n }\n }\n // Se devuelve como resultado el JsonResponse que albergará la String inputStream.\n return jsonResponse;\n }",
"private String createResponse(RequiredSpecs specs) {\r\n\t\t\tJSONObject response = new JSONObject();\r\n\t\t\tint waitingTime = getWaitingTime(specs);\r\n\t\t\tresponse.put(\"waitingTime\", waitingTime);\r\n\t\t\tresponse.put(\"price\", superPC.getPrice(specs,waitingTime));\r\n\t\t\treturn response.toJSONString();\r\n\t\t}",
"@Override\r\n\tprotected GuardarSustentoResponse responseText(String json) {\n\t\tGuardarSustentoResponse guardarSustentoResponse = JSONHelper.desSerializar(json, GuardarSustentoResponse.class);\r\n\t\treturn guardarSustentoResponse;\r\n\t}",
"protected JSONObject getJsonRepresentation() throws Exception {\n\n JSONObject jsonObj = new JSONObject();\n jsonObj.put(\"name\", getName());\n return jsonObj;\n }",
"JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }",
"public JSONModel() {\n jo = new JSONObject();\n }",
"public void testJson() {\n\t\t\n\t\tSmallTalkEpisode episode = new SmallTalkEpisode();\n\t\tSmallTalkGespraech gespraech = new SmallTalkGespraech(0);\n\t\t\n\t\tSmallTalkJsonHelper testInstanz1 = new SmallTalkJsonHelper(\"We\", 2.34 , 0);\n\t\tSmallTalkJsonHelper testInstanz2 = new SmallTalkJsonHelper(\"Bez\", 5.24 , 0);\n\t\tSmallTalkJsonHelper testInstanz3 = new SmallTalkJsonHelper(\"Begr\", 22.34 , 1);\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(testInstanz1);\n\t\tString myJson1 = jsonObject.toString();\n\t\tgespraech.addGespraech(myJson1);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz2);\n\t\tString myJson2 = jsonObject.toString();\n\t\tgespraech.addGespraech(myJson2);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz3);\n\t\tString myJson3 = jsonObject.toString();\n\t\tgespraech.addGespraech(myJson3);\n\t\t\n\t\tepisode.addGespraech(gespraech.createInnerJson());\n\t\t\n\t\tSmallTalkGespraech gespraech1 = new SmallTalkGespraech(1);\n\t\t\n\t\tSmallTalkJsonHelper testInstanz4 = new SmallTalkJsonHelper(\"We\", 2.34 , 0);\n\t\tSmallTalkJsonHelper testInstanz5 = new SmallTalkJsonHelper(\"Bez\", 5.24 , 0);\n\t\tSmallTalkJsonHelper testInstanz6 = new SmallTalkJsonHelper(\"Begr\", 22.34 , 1);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz1);\n\t\tString myJson4 = jsonObject.toString();\n\t\tgespraech1.addGespraech(myJson1);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz2);\n\t\tString myJson5 = jsonObject.toString();\n\t\tgespraech1.addGespraech(myJson2);\n\t\t\n\t\tjsonObject = new JSONObject(testInstanz3);\n\t\tString myJson6 = jsonObject.toString();\n\t\tgespraech1.addGespraech(myJson3);\n\t\t\n\t\tepisode.addGespraech(gespraech1.createInnerJson());\n\t\t\n\t\tSystem.out.println(episode.createInnerJson());\n\t\t\n\t\tFileSaver fileSaver = new FileSaver();\n\t\tfileSaver.stringAsJson(episode.createInnerJson(), \"FinalJson.json\");\n\t}",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\t@Override\n\tpublic void doWithRequest(ClientHttpRequest request) throws IOException {\n\t\trequest.getHeaders().set( \"Accept\", \"application/json\" );\n\t\trequest.getHeaders().set(\"Content-Type\", MediaType.APPLICATION_JSON.toString());\n\t\tif (headerAttrs != null) {\n\t\t\tfor (String key : headerAttrs.keySet()) {\n\t\t\t\tString value = headerAttrs.get(key);\n\t\t\t\trequest.getHeaders().set(key, value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// next if there is a body add it to request\n\t\tif (requestBody != null){\n\t\t\tAssert.notEmpty(messageConverters, \"'messageConverters' must not be empty\");\n\t\t\tClass<?> requestType = requestBody.getClass();\n\t\t\tfor (HttpMessageConverter messageConverter : messageConverters) {\n\t\t\t\tif (messageConverter.canWrite(requestType, MediaType.APPLICATION_JSON)) {\n\t\t\t\t\tmessageConverter.write(requestBody, MediaType.APPLICATION_JSON, request);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected String getJSON() {\n/*Generated! Do not modify!*/ return gson.toJson(replyDTO);\n/*Generated! Do not modify!*/ }",
"Response createResponse();",
"public interface GsonAPIService {\n\n @Get(\"{query}/pm10.json\")\n @Head(\"Cache-Control:max-age=640000\")\n Call<List<PM25>> getWeather(@Path(\"query\") String query, @Query(\"city\") String city, @Query(\"token\") String token);\n}",
"private JSONHelper() {\r\n\t\tsuper();\r\n\t}",
"public void callVolley(JSONObject obj){\n RequestQueue queue = Volley.newRequestQueue(mContext);\n JSONObject obj1 = obj;\n //1. URL dari BASE_URL\n BASE_URL = BASE_URL+obj1.toString();\n //2. input = parameter\n //3. response listener : panggil processResult((response listener dijalankan di UI Thread)\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, BASE_URL, obj1, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n processResult(response.toString());\n Log.d(\"RESPONSE\", response.toString());\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n Log.d(\"RESPONSE\", \"That didn't work!\");\n }\n });\n queue.add(request);\n }",
"public JSONObject createFinalJson(){\n JSONObject finalJson = new JSONObject();\n //Get userId from SQL lite database\n DatabaseHandler db = new DatabaseHandler(this);\n User user = db.getUser();\n //get Answer JSON object and turn it into an JSON-Array\n try {\n finalJson.put(\"user\",user);\n finalJson.put(\"survey\", survey);\n finalJson.put(\"answers\",result);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n System.out.println(finalJson.toString());\n return finalJson;\n }",
"public JSONObject mo56289a_() {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"api_endpoint\", mo56263a());\n } catch (JSONException unused) {\n }\n f2302w.mo56245a(jSONObject, \"timestamp\", mo56265c());\n f2303x.mo56245a(jSONObject, \"cart\", mo56278d());\n return jSONObject;\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // If the URL is null, then return early.\n if (url == null) {\n return jsonResponse;\n }\n\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n // If the request was successful (response code 200),\n // then read the input stream and parse the response.\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code: \" + urlConnection.getResponseCode());\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Problem retrieving the earthquake JSON results.\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // Closing the input stream could throw an IOException, which is why\n // the makeHttpRequest(URL url) method signature specifies than an IOException\n // could be thrown.\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n WebFunction.JsonHeaderInit(resp);\r\n ArticleService svc=new ArticleService();\r\n JSONObject ResultJson = svc.GetType(\"1\");\r\n WebFunction.ResponseJson(resp, ResultJson);\r\n }",
"protected JSONObject doInBackground(String...url){\n String MYURL = \" http://thevisitapp.com/api/destinations/read?identifiers=10011\";\n\n HttpRequest request = new HttpRequest();\n return request.getJSONFromUrl(MYURL);\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJson() {\n return null;\n }",
"void mo28373a(JSONObject jSONObject);",
"private static JSONObject getDataObject(JSONObject obj)\n\t{\n\t\tJSONObject objData = new JSONObject();\n\t\tobjData.put(\"data\", obj);\n\t\treturn objData;\n\t}",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n // if the url is null, return the response early;\n if (url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.setReadTimeout(10000 /* milliseconds */);\n urlConnection.setConnectTimeout(15000 /* milliseconds */);\n urlConnection.connect();\n if (urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Error response code \" + urlConnection.getResponseCode());\n }\n\n } catch (IOException e) {\n // TODO: Handle the exception\n Log.e(LOG_TAG, \"Problem retrieving from the url\", e);\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n // function must handle java.io.IOException here\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String jsonResponse = \"\";\n\n // if url null, return\n if(url == null) {\n return jsonResponse;\n }\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n try {\n urlConnection= (HttpURLConnection)url.openConnection();\n urlConnection.setReadTimeout(10000/*milliseconds*/);\n urlConnection.setConnectTimeout(15000/*milliseconds*/);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n Log.v(LOG_TAG,\"Network request made\");\n\n // if the request was successful(response code 200)\n //then read the input stream and parse the output\n if(urlConnection.getResponseCode() == 200) {\n inputStream = urlConnection.getInputStream();\n jsonResponse = readFromStream(inputStream);\n }\n else{\n Log.e(LOG_TAG,\"Error Response code: \" + urlConnection.getResponseCode());\n }\n }\n catch (IOException e) {\n Log.e(LOG_TAG,\"Problem retrieving the earthquake JSON results\",e);\n }\n finally {\n if(urlConnection != null) {\n urlConnection.disconnect();\n }\n if(inputStream != null) {\n inputStream.close();\n }\n }\n return jsonResponse;\n }",
"public JSONObject makeJSONOffer(JSONObject angebot, JSONObject nachfrage) {\n\t\tJSONObject json = new JSONObject();\n\t\tJSONObject json2 = new JSONObject();\n\t\ttry {\n\t\t\tjson.put(\"Handel anbieten\", json2);\n\t\t\tjson2.put(\"Angebot\", angebot);\n\t\t\tjson2.put(\"Nachfrage\", nachfrage);\n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn json;\n\t}",
"Answerable(JSONObject object) throws JSONFormatException {\n JSONSpec.testObject(jsonSpec, object);\n\n JSONObject definition = (JSONObject) object.get(\"definition\");\n this.name = (String) definition.get(\"name\");\n\n JSONArray questions = (JSONArray) definition.get(\"questions\");\n JSONArray completed = (JSONArray) object.get(\"completed\");\n questions.forEach(question -> addQuestionFromJSON((JSONObject) question));\n completed.forEach(responses -> addCompletedFromJSON((JSONArray) responses));\n }",
"@Override\n public Object createRequestBody() {\n int[] arr = {1,2,3,4,5,6,7,8,9};\n Tree root = TreeUtility.buildTree(arr);\n return root;\n }",
"public int processingContract(String json,List<Object[]> list);",
"@Override\n public Response intercept(Chain chain) throws IOException {\n Request request = chain.request();\n Request.Builder newRequest;\n\n newRequest = request.newBuilder()\n .addHeader(\"Content-type\", \"application/json;charset=UTF-8\")\n .addHeader(\"Accept\", \"application/json\");\n return chain.proceed(newRequest.build());\n }",
"private static String makeHttpRequest(URL url) throws IOException {\n String JSONResponse = null;\n HttpURLConnection urlConnection = null;\n InputStream inputStream = null;\n\n try {\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setRequestMethod(Constants.URL_REQUEST_METHOD);\n urlConnection.setReadTimeout(Constants.URL_READ_TIME_OUT);\n urlConnection.setConnectTimeout(Constants.URL_CONNECT_TIME_OUT);\n urlConnection.connect();\n\n if (urlConnection.getResponseCode() == Constants.URL_SUCCESS_RESPONSE_CODE) {\n inputStream = urlConnection.getInputStream();\n JSONResponse = readFromStream(inputStream);\n } else {\n Log.e(LOG_TAG, \"Response code : \" + urlConnection.getResponseCode());\n // If received any other code(i.e 400) return null JSON response\n JSONResponse = null;\n }\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error Solving JSON response : makeHttpConnection() block\");\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n if (inputStream != null) {\n inputStream.close();\n // Input stream throws IOException when trying to close, that why method signature\n // specify about IOException\n }\n }\n return JSONResponse;\n }",
"public void generateInitReq(Response.Listener<JSONObject> onRes) throws JSONException {\n JSONObject obj = new JSONObject();\n String url = \"https://api.bird.co/user/login\";\n obj.put(\"email\",email);\n\n Response.ErrorListener onErr = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n System.out.println(\"Error Request when Init BIRD\");\n //bad request or something\n\n }\n };\n initReq = new JsonObjectRequest(Request.Method.POST,url,obj,onRes,onErr) {\n /**\n * Passing some request headers*\n */\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap headers = new HashMap();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Device-id:\", \"000bca56-fb54-4704-9abe-60efc4d9993c\");\n headers.put(\"Platform\",\"android\");\n return headers;\n }\n };\n\n }",
"protected JSONObject getJSONObject(String url) throws IOException, JSONException {\n Log.d(this.TAG, \"Loading JSON Object: \" + url);\n return new JSONObject(this.fetchJSON(url));\n }",
"@GET\n @Produces(\"application/json\")\n public String getJson() {\n //TODO return proper representation object\n throw new UnsupportedOperationException();\n }",
"private void parseJSON(String response)\n {\n try\n {\n // Using orj.json, get the file string and convert it to an object\n JSONObject object = (JSONObject) new JSONTokener(response).nextValue();\n\n // The Winnipeg Transit JSON results usually have nested values\n // We can identify the request by the first key of the first level\n\n // The method names() will retrieve an JSONArray with the key names\n JSONArray objectNames = object.names();\n\n // Retrieve the first key of the first level\n String firstKey = objectNames.getString(0);\n\n if (firstKey.equals(\"status\"))\n {\n parseStatus(object.getJSONObject(firstKey));\n }\n else if (firstKey.equals(\"stop-schedule\"))\n {\n parseStopSchedule(object.getJSONObject(firstKey));\n }\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n }",
"void response( JSONArray data );",
"@Override\n\tprotected JSONObject doJSONRequest(JSONObject request) throws JSONRPCException {\n\t\ttry {\n\n\t\t\tString data = request.toString();\n\t\t\tsocket.sendData(data.getBytes());\n\t\t\t\n\t\t\tJSONObject result = new JSONObject();\n\t\t\tJSONObject resultOK = new JSONObject();\n\t\t\tresultOK.put(\"result\", \"OK\");\n\t\t\tresult.put(JSONRPCConstants.RESULT_KEY, resultOK);\n\t\t\t\n\t\t\treturn result;\n\t\t} catch (Exception e) {\n\t\t\tthrow new JSONRPCException(e.getMessage());\n\t\t}\n\t}",
"void onRequest(Member member, Map<String, ?> input, JSONObject output);",
"private void getJSONgraphData(HttpServletRequest request, HttpServletResponse response) throws IOException {\n response.getWriter().write(FROM_JS_DATA_PATH + _sessionId + \".json\");\n }",
"public static void writeJsonObject(HttpServletResponse response, JSONObject obj) {\n try {\n response.setContentType(\"application/json\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n out.print(obj);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void sendGetObjectsResponse(final HttpTransaction tx, final Console console, final String path) throws IOException\r\n {\r\n String[] params = path.split(\"/\");\r\n if (params.length == 1)\r\n { // With one parameter we call getObjects(className)\r\n tx.sendResponse(HTTP_OK, \"application/json\", JSON.fromObject(console.getObjects(params[0])));\r\n }\r\n else if (params.length == 2)\r\n { // With two parameters we call getObjects(packageName, className)\r\n //System.out.println(\"params = \" + params[0] + \", \" + params[1]);\r\n tx.sendResponse(HTTP_OK, \"application/json\", JSON.fromObject(console.getObjects(params[0], params[1])));\r\n }\r\n else if (params.length == 3)\r\n { // TODO With three parameters we call getObjects(packageName, className, agent)\r\n //System.out.println(\"params = \" + params[0] + \", \" + params[1] + \", \" + params[2]);\r\n tx.sendResponse(HTTP_NOT_FOUND, \"text/plain\", \"404 Too many parameters for objects GET request.\");\r\n } else {\r\n tx.sendResponse(HTTP_NOT_FOUND, \"text/plain\", \"404 Too many parameters for objects GET request.\");\r\n }\r\n }",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n public String getJSON() {\n throw new UnsupportedOperationException();\n }",
"public static JSONObject getJSON(String append) {\n try {\n URL url = new URL(BASE_URL + append);\n BufferedReader reader = null;\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n connection.setRequestMethod(\"GET\");\n connection.connect();\n\n InputStream stream = connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(stream);\n reader = new BufferedReader(inputStreamReader);\n\n StringBuffer buffer = new StringBuffer();\n\n String line = \"\";\n while ((line = reader.readLine()) != null) {\n buffer.append(line);\n }\n\n String json = buffer.toString();\n return new JSONObject(json);\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (JSONException e) {\n e.printStackTrace();\n return null;\n }\n }",
"private void createLearnJSON(){\n json = new JSONObject();\n\n try {\n json.put(\"userID\", global.getUserID());\n StringBuilder p1 = new StringBuilder();\n for (String s: global.getWords()){\n p1.append(p1.toString().equals(\"\") ? s : (\" \" + s));\n }\n json.put(\"p1\", p1.toString());\n json.put(\"p2\", url);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }"
] | [
"0.63668585",
"0.6337555",
"0.6275806",
"0.6038057",
"0.59978807",
"0.5994231",
"0.5987879",
"0.59264135",
"0.59264135",
"0.59264135",
"0.5897391",
"0.58479875",
"0.58436275",
"0.5843296",
"0.5812182",
"0.5802",
"0.5800086",
"0.5798641",
"0.5782759",
"0.5754188",
"0.57486254",
"0.57287467",
"0.56872576",
"0.5680524",
"0.5647531",
"0.5645853",
"0.56302315",
"0.5584303",
"0.55802226",
"0.55559945",
"0.55559665",
"0.55429506",
"0.55429506",
"0.5534328",
"0.55140835",
"0.55082244",
"0.5502391",
"0.5500576",
"0.54951745",
"0.5476797",
"0.5471171",
"0.54707485",
"0.54697454",
"0.5447648",
"0.54244745",
"0.54240125",
"0.54206526",
"0.5416602",
"0.540162",
"0.5397048",
"0.53916895",
"0.5387922",
"0.5383847",
"0.53795904",
"0.53794414",
"0.5374265",
"0.53673697",
"0.5360478",
"0.53587496",
"0.5358479",
"0.5352125",
"0.53509796",
"0.5349137",
"0.534625",
"0.5342822",
"0.5340407",
"0.53375405",
"0.5335463",
"0.53322726",
"0.53306246",
"0.5325759",
"0.53240937",
"0.5324053",
"0.5321761",
"0.5318376",
"0.5316616",
"0.53129107",
"0.5310632",
"0.5309291",
"0.53000855",
"0.5298325",
"0.5292521",
"0.52900106",
"0.52892864",
"0.5285167",
"0.5284297",
"0.528288",
"0.5281894",
"0.5277691",
"0.52769667",
"0.5273907",
"0.5273784",
"0.5273757",
"0.52690405",
"0.5268399",
"0.52608347",
"0.52589685",
"0.5257842",
"0.5255709",
"0.52550507",
"0.52550304"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void setUpViews(View contentView) {
mListView = (ListView) contentView.findViewById(R.id.listview);
} | {
"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 setUpListener() {
mListView.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
// TODO Auto-generated method stub
mAdapter.setIndex(position);
mAdapter.notifyDataSetChanged();
if(litener != null){
litener.onItemClick(position, mAdapter.getListItem(position), view);
}
}
});
} | {
"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 onItemClick(AdapterView<?> parent, View view, int position, long id) {
mAdapter.setIndex(position);
mAdapter.notifyDataSetChanged();
if(litener != null){
litener.onItemClick(position, mAdapter.getListItem(position), view);
}
} | {
"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 getAnimationStyle() {
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 getResView() {
return R.layout.pop_level_list;
} | {
"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 boolean updateView(View contentView) {
return false;
} | {
"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 |
Build Capabilities from JSON string. | public static Capabilities fromJson(String json) {
Gson gson = new Gson();
return gson.fromJson(json, Capabilities.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static JsonElement stringToJSON2(String json) {\n try {\n JsonElement parser = new JsonPrimitive(json);\n System.out.println(parser.getAsString());\n //JsonObject Jso = new JsonObject();\n //Jso = (JsonObject) parser.p(json);\n return parser;\n } catch (Exception e) {\n return new JsonObject();\n }\n }",
"@Test\n public void fromJson() throws VirgilException, WebAuthnException {\n AuthenticatorMakeCredentialOptions options = AuthenticatorMakeCredentialOptions.fromJSON(MAKE_CREDENTIAL_JSON);\n AttestationObject attObj = authenticator.makeCredential(options);\n }",
"public void fromJSON(String json) throws JSONException;",
"static <T extends SyntheticOptions> T optionsFromString(String json, Class<T> type)\n throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n T result = mapper.readValue(json, type);\n result.validate();\n return result;\n }",
"public static JsonObject stringToJSON(String json) {\n try {\n JsonParser parser = new JsonParser();\n JsonObject Jso = parser.parse(json).getAsJsonObject();\n return Jso;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return new JsonObject();\n }\n }",
"public static Example stringToJSON(String s){\n Gson gson = new Gson();\n JsonReader reader = new JsonReader(new StringReader(s));\n reader.setLenient(true);\n\n Example ex = gson.fromJson(reader, Example.class);\n\n return ex;\n }",
"public static LevelPack fromJson(String json) {\n\t\treturn Serializer.deserializeLevelPack(json);\n\t}",
"public void setCapabilities(String capabilities) {\n this.capabilities = capabilities;\n }",
"private void testJsonObject(String jsonString, Citation entity) {\n JSONObject testObject = new JSONObject(jsonString);\n\n String pid = testObject.getString(\"pid\");\n String url = testObject.getString(\"url\");\n String erc = testObject.getString(\"erc\");\n String who = testObject.getString(\"who\");\n String what = testObject.getString(\"what\");\n String time = testObject.getString(\"date\");\n\n Assert.assertEquals(entity.getPurl(), pid);\n Assert.assertEquals(entity.getUrl(), url);\n Assert.assertEquals(entity.getErc(), erc);\n Assert.assertEquals(entity.getWho(), who);\n Assert.assertEquals(entity.getWhat(), what);\n Assert.assertEquals(entity.getDate(), time);\n }",
"public static Game createGameFromJSON(String json) {\n JSONObject gameJSONObject = new JSONObject(json);\n List<String> agents = parseAgents(gameJSONObject);\n String[][] actions = parseActions(gameJSONObject);\n int[][][] values = parseValues(gameJSONObject);\n\n return new Game(agents, actions, values);\n }",
"@JsonCreator\n public static CreateMode fromString(String name) {\n return fromString(name, CreateMode.class);\n }",
"@Test\n @SmallTest\n public void testReadFromJsonString() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n\n CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);\n CrashInfo expected =\n createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertThat(parsed, equalsTo(expected));\n }",
"public static void main(String[] str) {\n String str1 = \"[{\\\"随机欢迎语\\\":[\\\"aaa\\\",\\\"bbbbb\\\",\\\"ccccc\\\"],\\\"no\\\":\\\"1\\\"},{\\\"商品标题\\\":\\\"商品标题\\\",\\\"no\\\":\\\"2\\\"},{\\\"商品卖点\\\":\\\"商品卖点\\\",\\\"no\\\":\\\"3\\\"},{\\\"商品描述\\\":\\\"商品描述\\\",\\\"no\\\":\\\"2\\\"},{\\\"包装清单\\\":\\\"包装清单\\\",\\\"no\\\":\\\"2\\\"},{\\\"随机结束语\\\":[\\\"1111\\\",\\\"2222\\\",\\\"33333\\\"],\\\"no\\\":\\\"2\\\"}]\";\n //System.out.println(JSONObject.);\n JSONArray objects = JSONObject.parseArray(str1);\n List<JSONObject> jsonObjects = JSONObject.parseArray(str1, JSONObject.class);\n for (JSONObject object : jsonObjects) {\n for (Map.Entry<String, Object> en : object.entrySet()) {\n System.out.println(en.getValue());\n }\n }\n\n }",
"public static JsonArray stringToJsonArray(String json) {\n try {\n JsonParser parser = new JsonParser();\n JsonArray jsa = parser.parse(json).getAsJsonArray();\n return jsa;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return new JsonArray();\n }\n }",
"public static TestWebhookRequest fromJson(String jsonString) throws JsonProcessingException {\n return JSON.getMapper().readValue(jsonString, TestWebhookRequest.class);\n }",
"public JSONModel(final String json) throws JSONException {\n jo = new JSONObject(json);\n }",
"Gist deserializeGistFromJson(String json);",
"CapabilitiesType createCapabilitiesType();",
"public Metadata(String _JSONString) {\n mJSONObject = new JSONObject();\n mJSONObject = (JSONObject) JSONValue.parse(_JSONString);\n\n // TODO: Maybe raise a 'malformed json string exception'\n if (mJSONObject == null) {\n \tLOGGER.info(\"Invalid JSON String received. new object was created, but its NULL.\");\n }\n }",
"public static MultiArrayDimension fromJsonString(java.lang.String jsonString) {\n\t\t// convert to a message\n\t\treturn MultiArrayDimension.fromMessage(new Message(jsonString));\n\t}",
"public interface Capability\n{\n String BUNDLE = \"bundle\";\n String FRAGMENT = \"fragment\";\n String PACKAGE = \"package\";\n String SERVICE = \"service\";\n String EXECUTIONENVIRONMENT = \"ee\";\n\n /**\n * Return the name of the capability.\n *\n */\n String getName();\n\n /**\n * Return the properties of this capability\n *\n * @return\n */\n Property[] getProperties();\n\n /**\n * Return the map of properties.\n *\n * @return a Map<String,Object>\n */\n Map<String, Object> getPropertiesAsMap();\n\n /**\n * Return the directives of this capability. The returned map\n * can not be modified.\n *\n * @return a Map of directives or an empty map there are no directives.\n */\n Map<String, String> getDirectives();\n}",
"public synchronized MonitoringDevice fromJSON(String json){\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\n\t\t//Convert object to JSON string and pretty print\n\t\tMonitoringDevice mDeviceTemp = null;\n\t\t\n\t\ttry {\n\t\t\n\t\t\tmDeviceTemp = mapper.readValue(json, MonitoringDevice.class);\n\t\t\t\n\t\t\tlogger.debug(\"Json object read:\" + mDeviceTemp.toJson());\n\t\t\t\n\t\t\tlogger.debug(\"Monitoring device id given:\" + mDeviceTemp.getId() );\n\t\t\tlogger.debug(\"Monitoring address given:\" + mDeviceTemp.getIp_address() );\n\t\t\t\n\t\t\tDeviceTypeContainer deviceTypeContainer = (DeviceTypeContainer) this.getReferenceContainer(\"DeviceType\");\t\t\t\n\t\t\tDeviceType deviceTypeTmp = (DeviceType) deviceTypeContainer.getObject(mDeviceTemp.getType().getId());\n\t\t\t\n\t\t\tif (deviceTypeTmp != null) {\n\t\t\t\tmDeviceTemp.setType(deviceTypeTmp);\n\t\t\t} else {\n\t\t\t\tdeviceTypeContainer.fromJSON(mDeviceTemp.getType().toJson());\n\t\t\t}\n\t\t\t\n\t\t\tSignalContainer signalContainer = (SignalContainer) this.getReferenceContainer(\"Signal\");\n\t\t\tfor (int i=0; i < mDeviceTemp.inputOutputPorts.size(); i++){\n\t\t\t\tInputOutputPort inputOutputPort = mDeviceTemp.inputOutputPorts.get(i);\n\t\t\t\tSignal signal = (Signal) signalContainer.getObject(inputOutputPort.getSignalType().getId());\n\t\t\t\t\n\t\t\t\tif (signal == null){\n\t\t\t\t\tsignalContainer.fromJSON(inputOutputPort.getSignalType().toJson());\n\t\t\t\t} else { \n\t\t\t\t\tinputOutputPort.setSignalType(signal);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmDeviceTemp.updateIndexes();\n\n\t\t} catch (JsonParseException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mDeviceTemp;\n\t}",
"@Test\n public void testWithNewWarnings() {\n String request = \"{\\\"canComputeNew\\\":{\\\"failedNewAll\\\":\\\"\\\",\\\"failedNewHigh\\\":\\\"1\\\",\\\"failedNewLow\\\":\\\"\\\",\\\"failedNewNormal\\\":\\\"\\\",\\\"unstableNewAll\\\":\\\"1\\\",\\\"unstableNewHigh\\\":\\\"\\\",\\\"unstableNewLow\\\":\\\"\\\",\\\"unstableNewNormal\\\":\\\"\\\",\\\"useDeltaValues\\\":false},\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n String expected = \"{\\\"canComputeNew\\\":true,\\\"failedNewAll\\\":\\\"\\\",\\\"failedNewHigh\\\":\\\"1\\\",\\\"failedNewLow\\\":\\\"\\\",\\\"failedNewNormal\\\":\\\"\\\",\\\"unstableNewAll\\\":\\\"1\\\",\\\"unstableNewHigh\\\":\\\"\\\",\\\"unstableNewLow\\\":\\\"\\\",\\\"unstableNewNormal\\\":\\\"\\\",\\\"useDeltaValues\\\":false,\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n assertEquals(\"Wrong JSON \", JSONObject.fromObject(expected), output);\n }",
"public void mo34874a(String str) {\n Class<C9780c> cls = C9780c.class;\n boolean[] a = m45645a();\n try {\n C9780c.m45630a(this.f25962b, System.currentTimeMillis(), this.f25961a);\n a[1] = true;\n InstabugSDKLogger.m46622d(cls, \"Features fetched successfully\");\n a[2] = true;\n JSONObject jSONObject = new JSONObject(str);\n a[3] = true;\n boolean optBoolean = jSONObject.optBoolean(\"crash_reporting\", true);\n a[4] = true;\n this.f25962b.mo34866a(Feature.CRASH_REPORTING, optBoolean);\n a[5] = true;\n boolean optBoolean2 = jSONObject.optBoolean(\"push_notifications\", true);\n a[6] = true;\n this.f25962b.mo34866a(Feature.PUSH_NOTIFICATION, optBoolean2);\n a[7] = true;\n boolean optBoolean3 = jSONObject.optBoolean(\"white_label\", true);\n a[8] = true;\n this.f25962b.mo34866a(Feature.WHITE_LABELING, optBoolean3);\n a[9] = true;\n boolean optBoolean4 = jSONObject.optBoolean(\"in_app_messaging\", true);\n a[10] = true;\n this.f25962b.mo34866a(Feature.IN_APP_MESSAGING, optBoolean4);\n a[11] = true;\n boolean optBoolean5 = jSONObject.optBoolean(\"multiple_attachments\", true);\n a[12] = true;\n this.f25962b.mo34866a(Feature.MULTIPLE_ATTACHMENTS, optBoolean5);\n String str2 = com.instabug.library.model.State.KEY_USER_STEPS;\n a[13] = true;\n boolean optBoolean6 = jSONObject.optBoolean(str2, true);\n a[14] = true;\n this.f25962b.mo34866a(Feature.TRACK_USER_STEPS, optBoolean6);\n a[15] = true;\n boolean optBoolean7 = jSONObject.optBoolean(\"repro_steps\", true);\n a[16] = true;\n this.f25962b.mo34866a(Feature.REPRO_STEPS, optBoolean7);\n String str3 = com.instabug.library.model.State.KEY_CONSOLE_LOG;\n a[17] = true;\n boolean optBoolean8 = jSONObject.optBoolean(str3, true);\n a[18] = true;\n this.f25962b.mo34866a(Feature.CONSOLE_LOGS, optBoolean8);\n a[19] = true;\n boolean optBoolean9 = jSONObject.optBoolean(\"ibg_log\", true);\n a[20] = true;\n this.f25962b.mo34866a(Feature.INSTABUG_LOGS, optBoolean9);\n a[21] = true;\n boolean optBoolean10 = jSONObject.optBoolean(com.instabug.library.model.State.KEY_USER_DATA, true);\n a[22] = true;\n this.f25962b.mo34866a(Feature.USER_DATA, optBoolean10);\n a[23] = true;\n boolean optBoolean11 = jSONObject.optBoolean(\"surveys\", true);\n a[24] = true;\n this.f25962b.mo34866a(Feature.SURVEYS, optBoolean11);\n String str4 = BugEntry.COLUMN_VIEW_HIERARCHY;\n a[25] = true;\n boolean optBoolean12 = jSONObject.optBoolean(str4, true);\n a[26] = true;\n this.f25962b.mo34866a(Feature.VIEW_HIERARCHY, optBoolean12);\n a[27] = true;\n boolean optBoolean13 = jSONObject.optBoolean(\"user_events\", true);\n a[28] = true;\n this.f25962b.mo34866a(Feature.USER_EVENTS, optBoolean13);\n a[29] = true;\n boolean optBoolean14 = jSONObject.optBoolean(\"disclaimer_text\", false);\n a[30] = true;\n this.f25962b.mo34866a(Feature.DISCLAIMER, optBoolean14);\n a[31] = true;\n boolean optBoolean15 = jSONObject.optBoolean(com.instabug.library.model.State.KEY_SESSIONS_PROFILER, true);\n a[32] = true;\n this.f25962b.mo34866a(Feature.SESSION_PROFILER, optBoolean15);\n a[33] = true;\n boolean optBoolean16 = jSONObject.optBoolean(\"feature_requests\", true);\n a[34] = true;\n this.f25962b.mo34866a(Feature.FEATURE_REQUESTS, optBoolean16);\n a[35] = true;\n boolean optBoolean17 = jSONObject.optBoolean(\"vp_customizations\", false);\n a[36] = true;\n this.f25962b.mo34866a(Feature.VP_CUSTOMIZATION, optBoolean17);\n a[37] = true;\n SDKCoreEventPublisher.post(new SDKCoreEvent(\"features\", Feature.VALUE_FETCHED));\n a[38] = true;\n } catch (JSONException e) {\n a[39] = true;\n InstabugSDKLogger.m46624e(cls, \"Something went wrong while parsing fetching features request's response\", e);\n a[40] = true;\n }\n a[41] = true;\n }",
"public static Object decode(String content) {\n JsonElement obj = new JsonParser().parse(String.join(\"\", content));\n if (obj.isJsonNull()) {\n return null;\n }\n JsonObject newObj = obj.getAsJsonObject();\n return new exercise(newObj);\n }",
"public native Object parse( Object json, String texturePath );",
"public static void main(String[] args) {\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\t//mapper.disable(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE);\n\t\t//mapper.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);\n\t\t//mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);\n\t\tString jsonInString = \"{'name' : 'mkyong'}\";\n\t\t// JSON from String to Object\n\t\ttry {\n\t\t\tForm obj = mapper.readValue(sample, Form.class);\n\t\t\t\n\t\t\tString jsonInStringx = mapper.writeValueAsString(obj);\n\t\t\t\n\t\t\tSystem.out.println(jsonInStringx);\n\t\t\t\n\t\t} catch (JsonParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (JsonMappingException 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}",
"public native Object parse( Object json );",
"public interface JsonProperties {\n\n String ACCESS_LEVEL = \"accessLevel\";\n String ADDRESS = \"address\";\n String ASSET_ID = \"assetId\";\n String CONTENT = \"content\";\n String CREATED_BY = \"createdBy\";\n String DATA = \"data\";\n String DATA_HASH = \"dataHash\";\n String EVENT_ID = \"eventId\";\n String ID_DATA = \"idData\";\n String META_DATA = \"metadata\";\n String PERMISSIONS = \"permissions\";\n String REGISTERED_BY = \"registeredBy\";\n String REGISTERED_ON = \"registeredOn\";\n String SEQUENCE_NUMBER = \"sequenceNumber\";\n String SIGNATURE = \"signature\";\n String TIMESTAMP = \"timestamp\";\n}",
"public static JSONObject strToJson(String jsonstring) {\n JSONParser parser = new JSONParser();\n JSONObject json = null;\n try {\n json = (JSONObject) parser.parse(jsonstring);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return json;\n }",
"public static ShardingRuleConfiguration fromJson(final String json) {\r\n return GsonFactory.getGson().fromJson(json, ShardingRuleConfiguration.class);\r\n }",
"public static Kaizen fromJson(String jsonString) {\n return new Gson().fromJson(jsonString, Kaizen.class);\n }",
"<T> T fromJson(String json, Class<T> type);",
"static JsonResource forString( String contents ) {\n return new JsonResource() {\n @Override\n public <T> T readFrom( ReadMethod<T> consumer ) throws IOException {\n try ( ByteArrayInputStream stream = new ByteArrayInputStream(contents.getBytes(Json.getDefaultConfig().getCharset())) ) {\n return consumer.read(stream);\n }\n }\n };\n }",
"public static JinyouTestOne fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, JinyouTestOne.class);\n }",
"GistComment deserializeCommentFromJson(String json);",
"@Override\n public void parse(String json) {\n JSONObject object = new JSONObject(json);\n id = object.getInt(\"dataset id\");\n name = object.getString(\"dataset name\");\n maxNumOfLabels = object.getInt(\"maximum number of labels per instance\");\n\n JSONArray labelsJSON = object.getJSONArray(\"class labels\");\n labels = new ArrayList<>();\n for (int i = 0; i < labelsJSON.length(); i++) {\n labels.add(new Label(labelsJSON.getJSONObject(i).toString()));\n }\n\n JSONArray instancesJSON = object.getJSONArray(\"instances\");\n instances = new ArrayList<>();\n for (int i = 0; i < instancesJSON.length(); i++) {\n instances.add(new Instance(instancesJSON.getJSONObject(i).toString()));\n }\n }",
"public Object[] fromStringRepresentation(String... value);",
"public static Schematic schematicFromJson(String json) {\n if (gson == null) {\n initializeGson();\n }\n\n return gson.fromJson(json, new TypeToken<Schematic>(){}.getType());\n }",
"public static SofortInfo fromJson(String jsonString) throws JsonProcessingException {\n return JSON.getMapper().readValue(jsonString, SofortInfo.class);\n }",
"@Test\n public void convertTest() throws Exception{\n String str = FileUtils.readFileToString(new File(FilePath));\n// content.setContent(getMatcherStr(str,\"NumberLong\\\\((\\\\d+)\\\\)\"));\n// CVModel cvModel = JSONUtils.readValue(content.getContent(), CVModel.class);\n// String jsonStr = JSONUtils.writeValue(cvModel);\n \n String debase64 = URLDecoder.decode(str, ConstantUtils.CHARASET);\n debase64 = new String(Base64.decodeBase64(debase64.replaceAll(\"\\\\s\", \"+\")), ConstantUtils.CHARASET);\n CVModel cvModel = JSONUtils.readValue(debase64, CVModel.class);\n System.out.println(JSONUtils.writeValue(cvModel));\n }",
"public ReflectiveCapabilitiesFactory(String name, String capabilitiesClassName, Object... args) {\n this.name = name;\n this.capabilitiesClassName = capabilitiesClassName;\n this.args = args;\n try {\n capabilitiesClass = (Class<? extends Capabilities>) Class.forName(capabilitiesClassName);\n available = Capabilities.class.isAssignableFrom(capabilitiesClass);\n } catch (ClassNotFoundException e) {\n available = false;\n }\n }",
"@Override\n\tpublic JSON parse(String in) throws IOException {\n\t\tMyJSON js = new MyJSON();\n\t\t//count brackets make sure they match\n\t\tif(!syntaxOkay(in)){\n\t\t\tthrow new IllegalStateException(\"Mismatched brackets error\");\n\t\t}\n\t\t//get rid of spaces to make things easier\n\t\tString withoutSpaces = remove(in, ' ');\n\t\t//handles edge case of an empty object\n\t\tString withoutBraces = remove(withoutSpaces, '{');\n\t\twithoutBraces = remove(withoutBraces, '}');\n\t\tif(withoutBraces.length() == 0){\n\t\t\treturn js;\n\t\t}\n\t\tint colonIndex = in.indexOf(\":\");\n\t\tString key = in.substring(0, colonIndex);\n\t\tString value = in.substring(colonIndex + 1);\n\n\t\tif(value.contains(\":\")){\n\t\t\t//this means the value is an object so we figure out how many strings to add to the object\n\t\t\tString[] values = value.split(\",\");\n\t\t\t//creates a temp for the new object\n\t\t\tMyJSON temp = new MyJSON();\n\t\t\tfillObject(values, temp);\n\t\t\tkey = removeOutsides(key);\n\t\t\tjs.setObject(key, temp);\n\t\t}else{\n\t\t\t//the base case that actually puts things as a JSON object\n\t\t\tkey = removeOutsides(key);\n\t\t\tvalue = removeOutsides(value);\n\t\t\tjs.setString(key, value);\n\t\t}\n\n\t\treturn js;\n\t}",
"@Override\n public void init(String jsonString) throws PluginException {\n try {\n config = new JsonSimpleConfig(jsonString);\n reset();\n } catch (IOException e) {\n log.error(\"Error reading config: \", e);\n }\n }",
"<T> T fromJson(String source, Class<T> type);",
"public static Result<MessageType, JSONException> fromString(String str) {\r\n return Result.ofRuntime(() -> valueOf(str))\r\n .mapError(ignored -> new JSONException(\"command not recognised\"));\r\n }",
"public static UserProfile fromJson(String jsonString) {\n final GsonBuilder builder = new GsonBuilder();\n builder.excludeFieldsWithoutExposeAnnotation();\n builder.setDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n final Gson gson = builder.create();\n return gson.fromJson(jsonString, UserProfile.class);\n }",
"<T> T toJsonPOJO(String jsonString, Class<T> classType);",
"public static JSONArray m5908g(JSONObject jSONObject, String str) {\n return C1546i.m5901a(jSONObject, str, null);\n }",
"@Override\n\t\tpublic boolean parseString(String jsonString) throws Exception {\n\n\n\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\tmAlias = jsonObject.getString(KEY_ALIAS);\n\t\t\tmDid = jsonObject.getString(KEY_DID);\n\t\t\tmOnline = jsonObject.optInt(KEY_ONLINE);\n\t\t\t\n\t\t\tJSONObject fuJsonObject = jsonObject.getJSONObject(KEY_FUNCTION);\n\t\t\tmDeviceFunction.parseString(fuJsonObject.toString());\n\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}",
"public static ArticleInfo fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, ArticleInfo.class);\n }",
"public final void mT__46() throws RecognitionException {\n try {\n int _type = T__46;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:46:7: ( 'capabilities' )\n // ../org.xtext.example.json.ui/src-gen/org/xtext/example/mydsl/ui/contentassist/antlr/internal/InternalMyjson.g:46:9: 'capabilities'\n {\n match(\"capabilities\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public JSONString(String stringIn)\n {\n this.string = stringIn;\n }",
"<T> T fromJson(String source, JavaType type);",
"public static VikiVideoResponse fromJson(String resp) {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n VikiVideoResponse vresponse = null;\n try {\n vresponse = gson.fromJson(resp, VikiVideoResponse.class);\n } catch (Exception e) { \n System.out.println(\"Error in json to java conversion: \" + e);\n }\n return (vresponse);\n \n }",
"public static JSONObject saveStringToJSONObject(final String json) {\n JSONObject jsonObject = null;\n try {\n jsonObject = new JSONObject(json);\n } catch (final JSONException e) {\n Log.e(TAG, \"\" + e.getMessage());\n }\n return jsonObject;\n }",
"public abstract void fromJson(JSONObject jsonObject);",
"List<GistComment> deserializeCommentsFromJson(String json);",
"public static Config createSaps(JsonElement json) {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n Config saps = gson.fromJson(json, Config.class);\n return saps;\n }",
"public void createFromJSONString(String jsonData) throws JSONException {\n JSONObject placeJSON = new JSONObject(jsonData);\n\n // set id of place object\n this.setId(placeJSON.getString(\"_id\"));\n // set title of place object\n this.setTitle(placeJSON.getString(\"title\"));\n // set lat of place object\n this.setLat(placeJSON.getString(\"lat\"));\n // set lon of place object\n this.setLon(placeJSON.getString(\"lon\"));\n }",
"public Object stringToObject(String s, Class c){\n Gson gson = new Gson();\n Object o = gson.fromJson(s, c);\n return o;\n }",
"public static JsonObject convertStringToJsonObject(final String str) {\n return JsonParser.parseString(str).getAsJsonObject();\n }",
"public ImageInformation withCapabilities(List<String> capabilities) {\n this.capabilities = capabilities;\n return this;\n }",
"public static Builder createJson(String text) {\n return builder().setType(Type.TEXT_JSON).setText(text);\n }",
"public static Schema fromJSON(String json) throws IOException {\n return BackwardCompatibleSchemaDe.fromJSON(json);\n }",
"private Movie getMovieDataFromJson(String jsonString) {\n Movie result = null;\n try {\n JSONObject jsonMovieObject = new JSONObject(jsonString);\n\n Movie.Builder movieBuilder = Movie.newBuilder(\n Integer.parseInt(jsonMovieObject.getString(Utility.TMDB_ID)),\n jsonMovieObject.getString(Utility.TMDB_TITLE))\n .setBackdropPath(jsonMovieObject.getString(Utility.TMDB_BACKDROP_PATH))\n .setOriginalTitle(jsonMovieObject.getString(Utility.TMDB_ORIGINAL_TITLE))\n .setPopularity(jsonMovieObject.getString(Utility.TMDB_POPULARITY))\n .setPosterPath(jsonMovieObject.getString(Utility.TMDB_POSTER_PATH))\n .setOverview(jsonMovieObject.getString(Utility.TMDB_OVERVIEW))\n .setReleaseDate(jsonMovieObject.getString(Utility.TMDB_RELEASE_DATE))\n .setVoteAverage(jsonMovieObject.getDouble(Utility.TMDB_VOTE_AVERAGE))\n .setRunTime(jsonMovieObject.getInt(Utility.TMDB_RUNTIME));\n result = movieBuilder.build();\n\n } catch (JSONException e) {\n System.err.println(e);\n Log.d(LOG_TAG, \"Error parsing JSON. String was: \" + jsonString);\n }\n return result;\n }",
"public AndroidDriver<AndroidElement> Capabilities() throws MalformedURLException {\n\t\t\n\t\t\n\t\t\n\t\tDesiredCapabilities cap = new DesiredCapabilities();\n\t\tcap.setCapability(MobileCapabilityType.PLATFORM_NAME, \"Andriod\");\n\t\t//cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, \"9\");\n\t\tcap.setCapability(MobileCapabilityType.DEVICE_NAME, \"Android Device\");\n\t\tcap.setCapability(MobileCapabilityType.BROWSER_NAME, \"chrome\");\n\t\tcap.setCapability(MobileCapabilityType.BROWSER_VERSION, \"76.0\");\n\t\tcap.setCapability(MobileCapabilityType.AUTOMATION_NAME, \"uiautomator2\");\n\t\t\n\t\t//connection to server\n\t\t//AndroidDriver driver = new AndroidDriver(IPaddressOfserver,capabilities); // This will invokes android object. see below\n\t\t\n\t\tAndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL(\"http://0.0.0.0:4723/wd/hub\"),cap); // IP address of every local host in any machine is http://127.0.0.1\n\t\treturn driver;\n\t\t\n\t}",
"@Test(groups={\"ut\"})\r\n\tpublic void testCreateCapabilitiesWithUserDefined() {\r\n\t\tSeleniumTestsContext context = new SeleniumTestsContext(SeleniumTestsContextManager.getThreadContext());\r\n\t\tcontext.setBrowser(BrowserType.CHROME.toString());\r\n\t\tcontext.setMobilePlatformVersion(\"8.0\");\r\n\t\tcontext.setPlatform(\"android\");\r\n\t\tcontext.setDeviceName(\"Samsung Galasy S8\");\r\n\t\tcontext.setApp(\"\");\r\n\t\tcontext.setAppiumCapabilities(\"key1=value1;key2=value2\");\r\n\t\t\r\n\t\tDriverConfig config = new DriverConfig(context);\r\n\t\t\r\n\t\t\r\n\t\tAndroidCapabilitiesFactory capaFactory = new AndroidCapabilitiesFactory(config);\r\n\t\tMutableCapabilities capa = capaFactory.createCapabilities();\r\n\t\t\r\n\t\tAssert.assertEquals(capa.getCapability(\"key1\"), \"value1\");\r\n\t\tAssert.assertEquals(capa.getCapability(\"key2\"), \"value2\");\r\n\r\n\t}",
"public static <T> T fromJson(String json, Class<T> type)\n {\n return g.fromJson(json, type);\n }",
"private void generateTestCapabilityFiles() {\n\n String[] ids = {\"cap_1_001\", \"cap_1_002\", \"cap_1_003\", \"cap_1_004\", \"cap_1_005\", \"cap_3_001\", \"cap_3_002\", \"cap_2_001\", \"cap_2_002\"};\n String[] actionNames_en = {\"Go Forward\", \"Reverse\", \"Turn Left\", \"Turn Right\", \"Stop\", \"Light ON\", \"Light OFF\", \"No Object\", \"See Object\"};\n String[] actionNames_si = {\"ඉදිරියට යන්න\", \"පසුපසට යන්න\", \"වමට හැරෙන්න\", \"දකුණට හැරෙන්න\", \"නවතින්න\", \"Light ON\", \"Light OFF\", \"No Object\", \"See Object\"};\n String[] actionCmd = {\"1\", \"2\", \"3\", \"4\", \"5\", \"1\", \"2\", \"3\", \"4\"};\n String[] comparaters = {\"\", \"\", \"\", \"\", \"\", \"\", \"\", \">\", \"<\"};\n String[] response = {\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"1\", \"1\"};\n String[] reference = {\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"100\", \"100\"};\n String[] buttonList = {\"true\", \"true\", \"true\", \"true\", \"false\", \"true\", \"false\", \"false\", \"false\"};\n //String[] imageList = {\"forward\", \"reverse\", \"left\", \"right\", \"stop\", \"true\", \"false\"};\n\n for (int i = 0; i < 9; i++) {\n\n String types;\n\n if (i >= 7) {\n types = Capability.CAP_SENSE;\n } else if (i < 2 || i > 5) {\n types = Capability.CAP_ACTION_C;\n } else {\n types = Capability.CAP_ACTION;\n }\n\n Map<String, String> nameList = new HashMap<>();\n nameList.put(\"en_US\", actionNames_en[i]);\n nameList.put(\"si_LK\", actionNames_si[i]);\n\n try {\n\n DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder docBuilder = docFactory.newDocumentBuilder();\n\n // root elements\n Document doc = docBuilder.newDocument();\n Element rootElement = doc.createElement(\"Sifeb\");\n doc.appendChild(rootElement);\n\n Element capability = doc.createElement(\"Capability\");\n rootElement.appendChild(capability);\n\n Element id = doc.createElement(\"Id\");\n id.appendChild(doc.createTextNode(ids[i]));\n capability.appendChild(id);\n\n Element names = doc.createElement(\"Names\");\n capability.appendChild(names);\n\n for (Map.Entry<String, String> entry : nameList.entrySet()) {\n Element name = doc.createElement(\"Name\");\n Element locale = doc.createElement(\"Locale\");\n Element nameStr = doc.createElement(\"Value\");\n\n locale.appendChild(doc.createTextNode(entry.getKey()));\n nameStr.appendChild(doc.createTextNode(entry.getValue()));\n\n name.appendChild(locale);\n name.appendChild(nameStr);\n names.appendChild(name);\n }\n\n Element type = doc.createElement(\"Type\");\n type.appendChild(doc.createTextNode(types));\n capability.appendChild(type);\n\n Element testCmd = doc.createElement(\"TestCommand\");\n testCmd.appendChild(doc.createTextNode(\"t\" + actionCmd[i]));\n capability.appendChild(testCmd);\n\n Element button = doc.createElement(\"HasTestButton\");\n button.appendChild(doc.createTextNode(buttonList[i]));\n capability.appendChild(button);\n\n Element exeCmd = doc.createElement(\"ExeCommand\");\n exeCmd.appendChild(doc.createTextNode(\"a\" + actionCmd[i]));\n capability.appendChild(exeCmd);\n\n Element stopCmd = doc.createElement(\"StopCommand\");\n stopCmd.appendChild(doc.createTextNode(\"a5\"));\n capability.appendChild(stopCmd);\n\n Element compType = doc.createElement(\"Comparator\");\n compType.appendChild(doc.createTextNode(comparaters[i]));\n capability.appendChild(compType);\n\n Element respSize = doc.createElement(\"Response\");\n respSize.appendChild(doc.createTextNode(response[i]));\n capability.appendChild(respSize);\n\n Element refVal = doc.createElement(\"Reference\");\n refVal.appendChild(doc.createTextNode(reference[i]));\n capability.appendChild(refVal);\n\n Element image = doc.createElement(\"Image\");\n image.appendChild(doc.createTextNode(ids[i]));\n capability.appendChild(image);\n\n // write the content into xml file\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource source = new DOMSource(doc);\n File file = new File(SifebUtil.CAP_FILE_DIR + ids[i] + \".xml\");\n StreamResult result = new StreamResult(file); //new File(\"C:\\\\file.xml\"));\n\n transformer.transform(source, result);\n\n System.out.println(\"File saved!\");\n\n } catch (ParserConfigurationException | TransformerException pce) {\n pce.printStackTrace();\n }\n\n }\n }",
"@JsonCreator\n public static JobInputType fromString(String name) {\n return fromString(name, JobInputType.class);\n }",
"@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }",
"public static RoyaltyEntity fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, RoyaltyEntity.class);\n }",
"public Capabilities() {\n super();\n this.caps = new HashSet<ICapability>();\n }",
"public static Question[] parseQuestionsFromJSON(Gson gson, String json) throws ClassCastException {\n Map<String, Object> document = (Map<String, Object>) gson.fromJson(json, Map.class);\n if (!document.containsKey(\"questions\")) {\n throw new ClassCastException(\"Invalid template\");\n }\n ArrayList<Map<String, Object>> questions = (ArrayList<Map<String, Object>>) document.get(\"questions\");\n ArrayList<Question> questionObjs = new ArrayList<>();\n if (questions.size() == 0) {\n throw new ClassCastException(\"Invalid template\");\n }\n boolean valid = true;\n for (Map<String, Object> question : questions) {\n Document d = new Document(question); // Convert it to a Document so we can cast automatically (and throw\n // ClassCastException on failure)\n if (!d.containsKey(\"type\") || !d.containsKey(\"title\") || !(d.get(\"type\") instanceof String)\n || !(d.get(\"title\") instanceof String)) {\n valid = false;\n break;\n }\n // All questions must have a type and a title\n String type = d.getString(\"type\");\n String title = d.getString(\"title\");\n switch (type) {\n case \"open\":\n questionObjs.add(new OpenQuestion(title, new QuestionResponse[0], new Trend[0], 0));\n break;\n case \"numeric\":\n if (!d.containsKey(\"min\") || !d.containsKey(\"max\")) {\n valid = false;\n break;\n }\n int min = d.getDouble(\"min\").intValue(); // Numbers are always detected as doubles\n int max = d.getDouble(\"max\").intValue();\n questionObjs\n .add(new NumericQuestion(title, new Stats(0, 0, 0, 0), min, max, 0, 0, 0, new Point[0]));\n break;\n case \"choice\":\n if (!d.containsKey(\"choices\") || !d.containsKey(\"allowMultiple\")) {\n valid = false;\n break;\n }\n ArrayList<String> choices = (ArrayList<String>) d.getList(\"choices\", String.class);\n if (choices.size() == 0) {\n valid = false;\n break;\n }\n ArrayList<Option> choiceObjs = new ArrayList<Option>();\n ArrayList<String> choicesUsed = new ArrayList<String>(); // Don't allow multiple occurences of the\n // same choice.\n for (int i = 0; i < choices.size(); i++) {\n String c = choices.get(i);\n if (choicesUsed.contains(c)) {\n valid = false;\n break;\n }\n if (c != null && c.length() >= 1) {\n choiceObjs.add(new Option(c, i));\n choicesUsed.add(c);\n }\n }\n if (!valid)\n break;\n boolean multiple = d.getBoolean(\"allowMultiple\");\n questionObjs.add(new ChoiceQuestion(title, choiceObjs.toArray(new Option[0]), multiple));\n break;\n default:\n valid = false;\n break;\n }\n if (!valid)\n break;\n }\n if (!valid) {\n throw new ClassCastException(\"Invalid template\");\n }\n return questionObjs.toArray(new Question[0]);\n }",
"public static JSONObject parseStringToJSon(String jsonData) throws JSONException {\n final String trimmed = jsonData.trim ();\n final JSONTokener tokener = new JSONTokener (trimmed);\n JSONObject jsonObject = new JSONObject (tokener);\n return jsonObject;\n }",
"@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }",
"protected abstract JSONObject build();",
"public static JSONObject parseJSON(String jsonString) throws JSONException\n {\n return new JSONObject(jsonString);\n }",
"public static WPSGetCapabilities create( String id, String version, String updateSequence, String[] acceptVersions,\n String[] sections, String[] acceptFormats, Map<String, String> vendoreSpec ) {\n return new WPSGetCapabilities( id, version, updateSequence, acceptVersions, sections, acceptFormats,\n vendoreSpec );\n }",
"public String getCapabilities() {\n return this.capabilities;\n }",
"Map<String, Object> parseToMap(String json);",
"public Producto[] parseResponse(String jsonAsString){\r\n\r\n //manually parsing to productos\r\n JsonParser parser = new JsonParser();\r\n JsonObject rootObject = parser.parse(jsonAsString).getAsJsonObject();\r\n JsonElement projectElement = rootObject.get(\"productos\");\r\n\r\n Producto [] productos = null;\r\n\r\n if(projectElement != null){\r\n\r\n QuantityDictionay.debugLog(\"LOS PRODUCTOS--->\"+projectElement.toString());\r\n\r\n //Use Gson to map response\r\n Gson gson = new Gson();\r\n //set type of response\r\n Type collectionType = new TypeToken<Producto[]>(){}.getType();\r\n //get java objects from json string\r\n productos = gson.fromJson(projectElement.toString(),collectionType);\r\n\r\n QuantityDictionay.debugLog(\"PARSING SIZE---->\"+productos.length);\r\n\r\n }\r\n\r\n\r\n return productos;\r\n\r\n }",
"private void loadPropertiesFromBluemixVcap() {\n\t\ttry {\n\t\t\tJSONObject vcapServiceInfos = BluemixEnvConfiguration.getServicesVcaps();\n\t\t\tif (vcapServiceInfos != null) {\n//\t\t\t\tBluemixEnvConfiguration bmEnvCfg = new BluemixEnvConfiguration();\n//\t\t\t\tssosvc_name = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"name\").toString();\n//\t\t\t\tssosvc_label = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"label\").toString();\n//\t\t\t\tssosvc_plan = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"plan\").toString();\n//\t\t\t\t// String[] ssosvc_credentials = (String[]) BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials\");\n//\t\t\t\tssosvc_cred_clientId = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.clientId\").toString();\n//\t\t\t\tssosvc_cred_secret = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.secret\").toString();\n//\t\t\t\tssosvc_cred_serverSupportedScope = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.serverSupportedScope\").toString();\n//\t\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n//\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n//\t\t if (seperators != null) {\n//\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n//\t\t\t scopeMatcher.find();\n//\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n//\t\t\t lLogger.info(DEBUG_PREFIX + \"VCAP_SERVICE config parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n//\t\t }\t\t\t\tssosvc_cred_issuerIdentifier = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.issuerIdentifier\").toString();\n//\t\t\t\tssosvc_cred_authorizationEndpointUrl = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.authorizationEndpointUrl\").toString();\n//\t\t\t\tssosvc_cred_tokenEndpointUrl = bmEnvCfg.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.tokenEndpointUrl\").toString();\n\t\t\t\tssosvc_name = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"name\").toString();\n\t\t\t\tssosvc_label = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"label\").toString();\n\t\t\t\tssosvc_plan = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"plan\").toString();\n\t\t\t\t// String[] ssosvc_credentials = (String[]) BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials\");\n\t\t\t\tssosvc_cred_clientId = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.clientId\").toString();\n\t\t\t\tssosvc_cred_secret = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.secret\").toString();\n\t\t\t\tssosvc_cred_serverSupportedScope = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.serverSupportedScope\").toString();\n\tlLogger.info(DEBUG_PREFIX + \"CONFIG FILE parsing, found Scopes = \" + ssosvc_cred_serverSupportedScope + \" for service name = \" + ssosvc_name);\t\n\t\t Pattern seperators = Pattern.compile(\".*\\\\[ *(.*) *\\\\].*\");\n\t\t if (seperators != null) {\n\t\t \tMatcher scopeMatcher = seperators.matcher(ssosvc_cred_serverSupportedScope);\n\t\t\t scopeMatcher.find();\n\t\t\t ssosvc_cred_serverSupportedScope = scopeMatcher.group(1); // only get the first occurrence\n\t\t\t lLogger.info(DEBUG_PREFIX + \"VCAP_SERVICE config parsing, retrieved first Scope = \" + ssosvc_cred_serverSupportedScope);\n\t\t }\t\t\t\tssosvc_cred_issuerIdentifier = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.issuerIdentifier\").toString();\n\t\t\t\tssosvc_cred_authorizationEndpointUrl = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.authorizationEndpointUrl\").toString();\n\t\t\t\tssosvc_cred_tokenEndpointUrl = BluemixEnvConfiguration.getBMServiceVcapParameterByValue(\"SingleSignOn\", null, \"credentials.tokenEndpointUrl\").toString();\n\n\t\t\t\tlLogger.info(DEBUG_PREFIX + \"VCAP_SERVICE found for service name = \" + ssosvc_name);\n\t\t\t} else {\n\t\t\t\tlLogger.severe(DEBUG_PREFIX + \"VCAP_SERVICE and/or VCAP_APPLICATION information not accessible! Using default connection settings.\");\t\t\t\t\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlLogger.severe(DEBUG_PREFIX + \"VCAP_SERVICE and/or VCAP_APPLICATION information not accessible! Using default connection settings.\");\n\t\t\te.printStackTrace();\n\t\t}\n \t}",
"@Test\n public void readSystemObjectClassAccCrRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountCreationRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountCreationRequest properly\", object.getClass(), actual.getClass());\n }",
"public static String[] parseJSON(String line) {\n\t\tString temp = line.replaceFirst(\"\\\\{\\\"time\\\":[0-9]+,\\\"states\\\":\\\\[\\\\[\", \"\");\n\t\tString[] states = temp.split(\"\\\\],\\\\[\");\n\t\tstates[states.length-1].replaceAll(\"\\\\]\\\\]\\\\}\", \"\");\n\t\treturn states;\n\t}",
"public static JSONObject createJSONObject(RequirementForm req)\r\n{\r\n\tString keys[] = {\"id\", \"nameReq\",\"nameGroup\",\"startDate\",\"endDate\",\"process\",\"statusReq\", \"lateDate\", \"stage\" };\r\n \r\n\tJSONObject uc = new JSONObject(keys);\r\n uc.getObject().put(keys[0], String.valueOf(req.getId()));\r\n uc.getObject().put(keys[1], CommonUtil.convertNVLFor(req.getNameReq()));\r\n uc.getObject().put(keys[2], req.getNameGroup());\r\n uc.getObject().put(keys[3], req.getStartDate());\r\n uc.getObject().put(keys[4], req.getEndDate());\r\n uc.getObject().put(keys[5], String.valueOf(req.getProcess()));\r\n uc.getObject().put(keys[6], String.valueOf(req.getStatusReq()));\r\n uc.getObject().put(keys[7], String.valueOf(req.getLateDate()));\r\n uc.getObject().put(keys[8], String.valueOf(req.getStage()));\r\n\r\n return uc; \r\n}",
"public AmqpReceiverOptions setCapabilities(List<String> capabilities) {\n this.capabilities = capabilities;\n return this;\n }",
"@Override\n\tpublic boolean parseFromJson(Context context, JSONObject obj) {\n\t\tupdateDisplayString(obj.optString(\"Display\", null));\n\t\tupdateTTSString(obj.optString(\"Speak\", null));\n\t\tString sId = obj.optString(\"selection_id\");\n\t\t//sId =\"0x\" +sId ;\t\t\n\t\ttry\n\t\t{\n\t\t\tmOptionId = Integer.parseInt(sId, 16);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tJSONArray array = obj.optJSONArray(\"SelectionBody\");\n\t\tif(array != null)\n\t\t{\n\t\t\tfor(int i = 0; i < array.length(); i++)\n\t\t\t{\n\t\t\t\tString option = array.optString(i, null);\n\t\t\t\tif(option != null)\n\t\t\t\t\tmLstOption.add(option);\n\t\t\t}\n\t\t\t\n\t\t\tmParseResult = true;\n\t\t}\n\t\t\n\t\tif(mOptionId == OPTION_PEOPLE_ADDRESS || mOptionId == OPTION_POI)\n\t\t{\n\t\t\tjsonObject = obj.optJSONObject(\"SelectionTitle\");\n\t\t}\n\t\t\n\t\tJSONObject objAppendix = obj.optJSONObject(\"description_obj\");\n\t\tif (objAppendix != null){\n\t\t\tmParseResult = parseDescription(context, objAppendix );\n\t\t}\n\t\t\n\t\treturn mParseResult;\n\t}",
"@JsonCreator\n public static LinuxUpdateClasses fromString(String name) {\n return fromString(name, LinuxUpdateClasses.class);\n }",
"public static List<GalacticCharacter> extractGalacticCharactersFromJson(String jsonString) {\n List<GalacticCharacter> galacticCharacters = new ArrayList<>();\n\n try {\n JSONArray galacticCharacterArray = new JSONArray(jsonString);\n\n for (int i = 0; i < galacticCharacterArray.length(); i++){\n JSONObject currentGalacticCharacter = galacticCharacterArray.getJSONObject(i);\n\n int id = currentGalacticCharacter.getInt(\"id\");\n String name = currentGalacticCharacter.getString(\"name\");\n ArrayList<String> shipsType = new ArrayList<>();\n\n JSONArray shipsTypeJsonArray = currentGalacticCharacter.getJSONArray(\"shipsType\");\n\n for (int j = 0; j < shipsTypeJsonArray.length(); j++) {\n String singleShipType = shipsTypeJsonArray.getString(j);\n shipsType.add(singleShipType);\n }\n\n GalacticCharacter galacticCharacter = new GalacticCharacter(id, name, shipsType);\n galacticCharacters.add(galacticCharacter);\n }\n\n } catch (JSONException e) {\n System.out.println(\"Problem parsing the character JSON results\");\n }\n return galacticCharacters;\n }",
"@Test\n public void testGetJsonPayload() {\n System.out.println(\"getJsonPayload\");\n String expResult = (\"{\\n\"\n + \" \\\"iss\\\": \\\"https://ConsumerSystemURL\\\",\\n\"\n + \" \\\"sub\\\": \\\"1\\\",\\n\"\n + \" \\\"aud\\\": \\\"https://authorize.fhir.nhs.net/token\\\",\\n\"\n + \" \\\"exp\\\": 1503995882,\\n\"\n + \" \\\"iat\\\": 1503995582,\\n\"\n + \" \\\"reason_for_request\\\": \\\"directcare\\\",\\n\"\n + \" \\\"requesting_device\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Device\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"GPConnectTestSystem\\\",\\n\"\n + \" \\\"value\\\": \\\"Client\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"type\\\": {\\n\"\n + \" \\\"coding\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"DeviceIdentifierSystem\\\",\\n\"\n + \" \\\"code\\\": \\\"DeviceIdentifier\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"model\\\": \\\"v1\\\",\\n\"\n + \" \\\"version\\\": \\\"1.1\\\"\\n\"\n + \" },\\n\"\n + \" \\\"requesting_organization\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Organization\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/Id/ods-organization-code\\\",\\n\"\n + \" \\\"value\\\": \\\"GPCA0001\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"name\\\": \\\"GP Connect Assurance\\\"\\n\"\n + \" },\\n\"\n + \" \\\"requesting_practitioner\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Practitioner\\\",\\n\"\n + \" \\\"id\\\": \\\"1\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/sds-user-id\\\",\\n\"\n + \" \\\"value\\\": \\\"GCASDS0001\\\"\\n\"\n + \" },\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"LocalIdentifierSystem\\\",\\n\"\n + \" \\\"value\\\": \\\"1\\\"\\n\"\n + \" }\\n\"\n + \" ],\\n\"\n + \" \\\"name\\\": {\\n\"\n + \" \\\"family\\\": [\\n\"\n + \" \\\"AssurancePractitioner\\\"\\n\"\n + \" ],\\n\"\n + \" \\\"given\\\": [\\n\"\n + \" \\\"AssuranceTest\\\"\\n\"\n + \" ],\\n\"\n + \" \\\"prefix\\\": [\\n\"\n + \" \\\"Mr\\\"\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"practitionerRole\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"role\\\": {\\n\"\n + \" \\\"coding\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"http://fhir.nhs.net/ValueSet/sds-job-role-name-1\\\",\\n\"\n + \" \\\"code\\\": \\\"AssuranceJobRole\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" },\\n\"\n + \" \\\"requested_scope\\\": \\\"patient/*.read\\\",\\n\"\n + \" \\\"requested_record\\\": {\\n\"\n + \" \\\"resourceType\\\": \\\"Patient\\\",\\n\"\n + \" \\\"identifier\\\": [\\n\"\n + \" {\\n\"\n + \" \\\"system\\\": \\\"https://fhir.nhs.uk/Id/nhs-number\\\",\\n\"\n + \" \\\"value\\\": \\\"9476719931\\\"\\n\"\n + \" }\\n\"\n + \" ]\\n\"\n + \" }\\n\"\n + \"}\\n\").replaceAll(\"\\n\", \"\\r\\n\");\n String result = instance.getJsonPayload();\n assertEquals(expResult, result);\n }",
"public static ConnectInfo fromJSON(final String authConfig) {\n\t\tif(authConfig==null || authConfig.trim().isEmpty()) throw new IllegalArgumentException(\"The passed authConfig was null or empty\");\n\t\ttry {\n\t\t\treturn fromJSON(new JSONObject(authConfig));\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(ex);\n\t\t}\n\t}",
"private static boolean isJSONValid(String jsonInString){\n\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.readTree(jsonInString);\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"INVALID JSON-LD SYNTAX\");\n\t\t\treturn false;\n\t\t}\n\n\t}",
"private static Object m7292a(String str) throws JSONException {\n Object obj = null;\n String trim = str.trim();\n if (trim.startsWith(\"{\") || trim.startsWith(\"[\")) {\n obj = new JSONTokener(trim).nextValue();\n }\n return obj == null ? trim : obj;\n }",
"public JsonParser createParser(String content)\n/* */ throws IOException, JsonParseException\n/* */ {\n/* 879 */ int strLen = content.length();\n/* */ \n/* 881 */ if ((this._inputDecorator != null) || (strLen > 32768) || (!canUseCharArrays()))\n/* */ {\n/* */ \n/* 884 */ return createParser(new StringReader(content));\n/* */ }\n/* 886 */ IOContext ctxt = _createContext(content, true);\n/* 887 */ char[] buf = ctxt.allocTokenBuffer(strLen);\n/* 888 */ content.getChars(0, strLen, buf, 0);\n/* 889 */ return _createParser(buf, 0, strLen, ctxt, true);\n/* */ }",
"private static DriverParams loadParams(String driverParamsJson) {\n if (driverParamsJson == null || driverParamsJson.isEmpty()) {\n return new DriverParams().setDriver(\"Chrome\").setSource(\"Local\").setBinaries(\".\");//Here setBinaries is dot that is setting current location\n }\n return new Gson().fromJson(driverParamsJson,DriverParams.class);\n }",
"private Bitmap getBitmapFromString(String jsonString) {\n byte[] decodedString = Base64.decode(jsonString, Base64.DEFAULT);\n\n return BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\n }",
"@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }",
"boolean deserialize(String inputString);"
] | [
"0.52571934",
"0.52142334",
"0.5049055",
"0.49400675",
"0.49072126",
"0.48713562",
"0.48663253",
"0.48569185",
"0.47938082",
"0.47916615",
"0.4780583",
"0.47641626",
"0.47328013",
"0.4709877",
"0.47054645",
"0.46903643",
"0.46729264",
"0.4636334",
"0.4624451",
"0.45937085",
"0.45865232",
"0.45825422",
"0.45438102",
"0.45426822",
"0.44913778",
"0.44882143",
"0.44813085",
"0.44720164",
"0.44654363",
"0.444794",
"0.44446734",
"0.44438973",
"0.44328177",
"0.4427854",
"0.4417428",
"0.43930838",
"0.4388768",
"0.43824917",
"0.4378346",
"0.43762818",
"0.4375989",
"0.43759298",
"0.43753046",
"0.4373744",
"0.4371636",
"0.4361856",
"0.43537942",
"0.433963",
"0.43381026",
"0.4333999",
"0.4327632",
"0.43273994",
"0.43257964",
"0.43205434",
"0.43166748",
"0.43154514",
"0.43118328",
"0.43088028",
"0.43023476",
"0.43019718",
"0.43000782",
"0.42948353",
"0.4281661",
"0.42815953",
"0.4276647",
"0.42701003",
"0.42693323",
"0.4266088",
"0.42587253",
"0.42540455",
"0.42512348",
"0.42501587",
"0.42421576",
"0.4235442",
"0.42140257",
"0.42012185",
"0.4198399",
"0.41834927",
"0.4173951",
"0.4172856",
"0.41728312",
"0.41665366",
"0.41662303",
"0.4164455",
"0.4164097",
"0.41637835",
"0.41602352",
"0.41559428",
"0.4148672",
"0.41470268",
"0.41370332",
"0.41217092",
"0.4120906",
"0.41189134",
"0.4115704",
"0.41130644",
"0.41107234",
"0.40978935",
"0.40972203",
"0.4094896"
] | 0.8181356 | 0 |
TODO Autogenerated method stub | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.member_center);
info = (VariableInfo) getApplication();
textview = (TextView) findViewById(R.id.store_name);
textview1 = (TextView) findViewById(R.id.store_vip);
textview2 = (TextView) findViewById(R.id.store_point);
bodytextview = (TextView) findViewById(R.id.buy_body);
unLogin_member = (LinearLayout) findViewById(R.id.unlogin_member);
Login_member = (LinearLayout) findViewById(R.id.member_layout);
// sellbodytextview=(TextView)findViewById(R.id.sell_bodys);
collectiontextview = (TextView) findViewById(R.id.collection_bodys);
if (info.getLogin_status() == 1) {
Login_member.setVisibility(View.VISIBLE);
unLogin_member.setVisibility(View.GONE);
} else {
Login_member.setVisibility(View.GONE);
unLogin_member.setVisibility(View.VISIBLE);
}
bodytextview.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setClass(MenberCenterApp.this, BuyBadyApp.class);
startActivity(intent);
}
});
/*
* sellbodytextview.setOnClickListener(new OnClickListener() {
*
* @Override public void onClick(View v) { // TODO Auto-generated method
* stub Intent intent=new Intent();
* intent.setClass(MenberCenterApp.this, SellBodyApp.class);
* startActivity(intent); } });
*/
collectiontextview.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setClass(MenberCenterApp.this, CollectionBodyApp.class);
startActivity(intent);
}
});
// 获取用户信息线程
Thread thread = new Thread(new Runnable() {
String url ="http://192.168.1.108:7000/userStatesWebService.asmx/findShops_memberInfoById";
@Override
public void run() {
// 设置参数
// List<NameValuePair> list = new ArrayList<NameValuePair>();
// list.add(new BasicNameValuePair("userId", "1"));
// list.add(new BasicNameValuePair("param",param.toString() ));
// post方法请求及其返回的数据
// String member = NetWorkHelper.doPost(url, list);
String member = NetWorkHelper.getDataDoGet(url + "?userId=1");
System.out.println("member=====================???>>>>>>>>>>>"
+ member);
int max = member.lastIndexOf("</string>");
int min = member.substring(0, max).lastIndexOf(">");
String result = member.substring(min + 1, max);
System.out
.println("resultsssssssssssssssssssssssssssssssssssss==>"
+ result);
Gson gson = new Gson();
Memberinfo memberinfo = gson.fromJson(result, Memberinfo.class);
System.out.println("member==>" + memberinfo.getUsername());
System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
Message mess = mhandler.obtainMessage();
mess.what = 1;
mess.obj = memberinfo;
mhandler.sendMessage(mess);
}
});
thread.start();
} | {
"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) {
Intent intent = new Intent();
intent.setClass(MenberCenterApp.this, BuyBadyApp.class);
startActivity(intent);
} | {
"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) {
Intent intent = new Intent();
intent.setClass(MenberCenterApp.this, CollectionBodyApp.class);
startActivity(intent);
} | {
"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 |
returns the cost for that product. | public double getProductCost() {
return (this.getPricePerUnit() * this.getNumUnits());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getCost() {\n return this.product.getPrice() * quanity;\n }",
"@Override\r\n\tpublic double getCost() {\r\n\t\tdouble total = 0;\r\n\t\t\r\n\t\tfor(Product p: parts) {\r\n\t\t\ttotal += p.getCost();\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}",
"@Override\n public double cost()\n {\n return this.price * this.number;\n }",
"@Pure\n\tdouble getCost();",
"public double cost()\n\t{\n\t\treturn (price * weight);\n\t}",
"double getCost();",
"double getCost();",
"@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}",
"public double getCost() {\n\n\t\treturn cost;\n\t}",
"public double getCost() {\r\n\t\treturn cost;\r\n\t}",
"public double getCost() {\t\t \n\t\treturn cost;\n\t}",
"public double getCost() {\n\t\treturn this.cost;\n\t}",
"public double getCost() {\n\t\treturn this.cost;\n\t}",
"public double getCost() {\n\t\treturn cost;\n\t}",
"public double getCost() {\r\n return cost;\r\n }",
"public BigDecimal getCost() {\r\n return cost;\r\n }",
"public double cost() {\n\t\t\n\t\treturn 150.00;\n\t}",
"public BigDecimal getCost() {\n return this.cost;\n }",
"public double getCost() {\n return cost;\n }",
"public double getCost() {\n return cost;\n }",
"@Override\n\tpublic double getCost() {\n\t\treturn price * weight; // cost = price of the candy * weight of candies\n\t}",
"public double getCost() {\n\t\t\n\t\tdouble cost = 0;\n\t\t\n\t\tif (Objects.equals(Size, \"small\"))\n\t\t\tcost = 7.00;\n\t\telse if (Objects.equals(Size, \"medium\"))\n\t\t\tcost = 9.00;\n\t\telse if (Objects.equals(Size, \"large\"))\n\t\t\tcost = 11.00;\n\t\t\n\t\tcost += (Cheese - 1)*1.50;\n\t\tcost += Ham*1.50;\n\t\tcost += Pepperoni*1.50;\n\t\t\n\t\treturn cost;\t\t\n\t}",
"public CP getProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }",
"public double getCost() {\r\n\t \treturn(cost);\r\n\t}",
"public float getCost() {\r\n\t\treturn this.cost.floatValue();\r\n\t}",
"public double getCost() {\n return price;\n }",
"public double getCost()\r\n\t{\treturn this.cost;\t}",
"public double getCost() {\n return quantity*ppu;\n\n }",
"public Number getCost()\r\n {\r\n return (m_cost);\r\n }",
"public double cost()\n\t{\n\t\treturn _dblCost;\n\t}",
"public int getCost(){\r\n\t\treturn this.cost;\r\n\t}",
"public Integer getCost() {\r\n\t\treturn cost;\r\n\t}",
"public int getCost() {\n \t\treturn cost;\n \t}",
"public int getCost() {\n return cost;\n }",
"@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}",
"public double getcost() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn room.getcost() + cost;\r\n\t}",
"public int getCost() {\n\t\treturn cost;\n\t}",
"@Override\n public double getCost() {\n return cost;\n }",
"public int getCost() {\n return cost;\n }",
"public int getCost() {\n return cost;\n }",
"public Integer getCost() {\n return cost;\n }",
"public abstract double getCost();",
"int getCost();",
"int getCost();",
"int getCost();",
"@NotNull\n public BigDecimal getCost() {\n return cost;\n }",
"public int getCost() {\n\t\treturn (int) Math.round(weight*price_per_pound);\n\t\t\n\t}",
"public double calculateCost(Purchase purchase);",
"@Override\n\tpublic double getSumOfCost() {\n\t String sql=\"SELECT SUM(cost) FROM supplier_product\";\n\t double total=this.getJdbcTemplate().queryForObject(sql, double.class);\n\t\treturn total;\n\t}",
"@Override\r\n public int getCost() {\r\n return cost;\r\n }",
"public double getCost() {\n\t\treturn 1.25;\n\t}",
"public int getCost()\n {\n return cost;\n }",
"public String getCost() {\n\t\tString t = doc.get(\"cost\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}",
"public String getCost() {\n return cost;\n }",
"public double getCost()\n\t{\n\t\treturn 0.9;\n\t}",
"public double getTotalCost() {\r\n\t\treturn cost;\r\n\t}",
"public String getCost() {\n // Formats the cost amount into money format.\n NumberFormat n = NumberFormat.getCurrencyInstance(Locale.US);\n String s = n.format(Double.parseDouble(_cost));\n return s;\n }",
"public double getCost() {\n double price = 0;\n price += this.numPizzas * this.pizzaType.getCost();\n if(this.numPizzas >= 20) // Discount if >=20 pizzas\n return price * 0.9;\n else if(this.numPizzas >= 10) // Discount if between 10 and 20 pizzas\n return price * 0.95;\n return price; // No discount\n }",
"@Override\r\n\tpublic double getCost() {\n\t\treturn this.cost_of_icecream;\r\n\t}",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"public double getTotalCost() {\r\n return totalCost;\r\n }",
"public double getCost() {\r\n\t\t\r\n\t\tif (super.getSize() == \"Small\") { totalCost = 2.00; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Medium\") { totalCost = 2.50; }\r\n\t\t\r\n\t\tif (super.getSize() == \"Large\") { totalCost = 3.00; }\r\n\t\t\r\n\t\treturn totalCost;\r\n\t}",
"public double calcCost() {\n if (pizzaSize.equals(\"small\")) {\n return 10.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n\n }\n else if (pizzaSize.equals(\"medium\")) {\n return 12.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n else {\n return 14.0 + ((cheeseToppings + pepperoniToppings + veggieToppings) * 2);\n }\n }",
"public int getCosto() {\n\t\treturn producto.getCosto();\n\t}",
"public BigDecimal getCostPrice() {\n return costPrice;\n }",
"public double getCost(){\n return cost;\n }",
"public float getTotalCost() {\n return this.totalCost;\n }",
"public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }",
"public int cost() {\n\t\treturn value;\n\t}",
"public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }",
"double getTotalCost();",
"@Pure\n\tdouble getEstimatedCost();",
"public CostInfo getCostInfo();",
"public double cost() {\n return roomType.cost() + COST;\n }",
"public CP getPsl13_ProductServiceUnitCost() { \r\n\t\tCP retVal = this.getTypedField(13, 0);\r\n\t\treturn retVal;\r\n }",
"public int get_cost() {\n return (int)getUIntElement(offsetBits_cost(), 16);\n }",
"@Override\n public int getCost() {\n\n\n //return cost converted to int\n return (int) cost;\n }",
"@Override\n public int getCost() {\n int price = (int) Math.round(this.weight * this.pricePerLbs); //get the price of the cookies in the form of an int\n return price; //return the price\n\n }",
"public double getTotal() {\n return totalCost;\n }",
"public Number getActualCost()\r\n {\r\n return (m_actualCost);\r\n }",
"public Double getProductPrice(String product){\n return services.get(product);\n }",
"public java.math.BigDecimal getTotalCost () {\n\t\treturn totalCost;\n\t}",
"public double getTotalCost() {\n cost = spr.calculateCost();\n return cost;\n }",
"public int getCost(){\n return this.cost;\n }",
"public abstract int getCost();",
"public abstract int getCost();",
"public abstract int getCost();",
"@Override\n public double getCost() {\n /**\n * @return the cost of Ice Cream\n */\n // TODO Auto-generated method stub\n return this.cost;\n }",
"public int getProductPrice(){\n return this.productRelation.getCost();\n }",
"public String getTotalCost() {\n return this.TotalCost;\n }",
"public double GetCost() {\n if( LotSize != CurLotSize ) {\n double CostPerShot = Cost / (double) LotSize;\n return CommonTools.RoundFractionalTons( CostPerShot * (double) CurLotSize );\n }\n return Cost;\n }",
"@Override\n\tpublic double getPrice() {\n\n\t\tfor(Car temPart:listPart){\n\t\t\tthis.totalCost +=temPart.getPrice();\n\t\t}\n\t\treturn totalCost;\n\t}",
"@Override\n public int getCost() {\n return iceCreamPrice + topPrice;\n }",
"@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}",
"public NM getProductServiceCostFactor() { \r\n\t\tNM retVal = this.getTypedField(24, 0);\r\n\t\treturn retVal;\r\n }",
"double calculateDeliveryCost(Cart cart);",
"public float getCost() {\n if (categoryIdentifier == AppController.periodicCategoryIdentifier) {\n if (pCostEt.getText().toString().isEmpty())\n return -100;\n cost = Float.valueOf(pCostEt.getText().toString());\n } else {\n if (fCostEt.getText().toString().isEmpty())\n return -100;\n cost = Float.valueOf(fCostEt.getText().toString());\n }\n return cost;\n }",
"public int getCost()\r\n\t{\n\t\treturn 70000;\r\n\t}",
"public double getCost() {\n\t\treturn costOverride > 0 ? costOverride : getDefaultCost();\n\t}",
"@GetMapping(\"/{id}/cost\")\n\tpublic Double getItemCost(@PathVariable Long id) {\n\t\treturn itemService.getItemCost(id);\n\t}"
] | [
"0.78040135",
"0.7709143",
"0.7613915",
"0.75233907",
"0.7514418",
"0.7490159",
"0.7490159",
"0.74496895",
"0.74296737",
"0.7428467",
"0.7427946",
"0.7424739",
"0.7424739",
"0.7395002",
"0.73856735",
"0.7385476",
"0.73788625",
"0.73764753",
"0.73624384",
"0.73624384",
"0.73611784",
"0.73584676",
"0.7336719",
"0.73278236",
"0.7306167",
"0.72923005",
"0.727461",
"0.72654027",
"0.72455",
"0.72263837",
"0.7221267",
"0.7220571",
"0.72049785",
"0.71863383",
"0.7175802",
"0.7171601",
"0.7157018",
"0.71461695",
"0.71387756",
"0.71387756",
"0.7136771",
"0.7112678",
"0.710274",
"0.710274",
"0.710274",
"0.7099254",
"0.7089559",
"0.7088824",
"0.7078614",
"0.70734084",
"0.70613796",
"0.70539904",
"0.70493877",
"0.70466405",
"0.7026961",
"0.701423",
"0.6995343",
"0.6994169",
"0.6984811",
"0.6971444",
"0.69632775",
"0.6958577",
"0.6955385",
"0.6937321",
"0.6926336",
"0.69161224",
"0.68792903",
"0.68780434",
"0.6866334",
"0.6864053",
"0.6836525",
"0.6836022",
"0.6833838",
"0.68293285",
"0.68192136",
"0.6811557",
"0.68067527",
"0.67864156",
"0.678438",
"0.67743737",
"0.677349",
"0.6758",
"0.6757468",
"0.6752169",
"0.67449486",
"0.67449486",
"0.67449486",
"0.67350876",
"0.6732554",
"0.6721745",
"0.67130995",
"0.6704441",
"0.66994435",
"0.6675159",
"0.6672119",
"0.66702497",
"0.66597664",
"0.664065",
"0.66325235",
"0.6630348"
] | 0.8016318 | 0 |
returns the tax rate for an equipment product which is 7%. | public double getTaxRate() {
return .07;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double taxPaying() {\r\n double tax;\r\n if (profit == true) {\r\n tax = revenue / 10.00;\r\n }\r\n\r\n else\r\n tax = revenue / 2.00;\r\n return tax;\r\n }",
"public double calcTax() {\n\t\treturn 0.2 * calcGrossWage() ;\n\t}",
"double getTax();",
"public double taxRate () {\n return taxRate;\n }",
"public double getTax() {\r\n\r\n return getSubtotal() * 0.06;\r\n\r\n }",
"public int calculateTax() {\n int premium = calculateCost();\n return (int) Math.round(premium * vehicle.getType().getTax(surety.getSuretyType()));\n }",
"@Override\n\tpublic double getTax() {\n\t\treturn 0.04;\n\t}",
"public Double getTax();",
"public double useTax() {\n \n return super.useTax() + getValue()\n * PER_AXLE_TAX_RATE * getAxles();\n }",
"abstract protected BigDecimal getBasicTaxRate();",
"public double getMarketValueTaxRate(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).MarketValueTax();\r\n }",
"public double getTaxRate() {\n return taxRate;\n }",
"public BigDecimal getPriceStdWTax();",
"double getTaxAmount();",
"@Override\n public double calcTaxes() {\n return getCost() * 0.07;\n }",
"double taxReturn() {\n\t\tdouble ddv = 0;\n\t\tif (d == 'A') {\n\t\t\tddv = 18;\n\t\t} else if (d == 'B') {\n\t\t\tddv = 5;\n\t\t}\n\t\t\n\t\tif (ddv = 0) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tdouble percent = price / 100.0;\n\t\tdouble tax = ddv * percent;\n\t\treturn tax / 100.0 * 15.0;\n\t}",
"public BigDecimal getTaxRate() {\n return taxRate;\n }",
"public int getTax(){\n int tax=0;\n if(this.salary<this.LOWER_LIMIT){\n tax=this.taxableSalary/100*10;\n }else if(this.salary<this.UPPER_LIMIT){\n tax=this.taxableSalary/100*22;\n }else{\n tax=this.UPPER_LIMIT/100*22 + (this.taxableSalary-this.UPPER_LIMIT)/100*40;\n }\n return tax;\n }",
"BigDecimal getTax();",
"public double calculateTax() {\n taxSubtotal = (saleAmount * SALESTAXRATE);\n\n return taxSubtotal;\n }",
"public double taxCharged (){\n return discountedPrice() * taxRate;\n }",
"public int totalTax()\n {\n double tax = taxRate / 100;\n return (int)Math.round(totalCost() * tax);\n }",
"double applyTax(double price);",
"double defaultTaxOnProduct(){\n\t\treturn 12.5;\n\t}",
"public BigDecimal getLBR_TaxRate();",
"public float calculateTax(String state, Integer flatRate);",
"public abstract double calculateTax();",
"public BigDecimal getLBR_ICMSST_TaxRate();",
"public BigDecimal getPriceLimitWTax();",
"public double getTaxes(){\n\t\treturn this.getExciseTax() + this.getFlightSegmentTax() + this.get911SecurityFee() + this.getPassengerFacilityFee();\n\t}",
"public double getTax() {\n return tax_;\n }",
"public BigDecimal getTaxRate() {\n\n\t\tBigDecimal totalTaxRate = getBasicTaxRate().add(getImportTaxRate());\n\n\t\treturn totalTaxRate;\n\t}",
"public double getTaxes() {\n return getArea() * TAX_RATE_PER_M2;\n }",
"public double getTax(){\n\n return this.tax;\n }",
"public double calculateTax(double amount){\n return (amount*TAX_4_1000)/1000;\n }",
"@Override\t\n\tpublic double getTax() {\n\t\treturn 0;\n\t}",
"public double getTax() {\n return tax_;\n }",
"public BigDecimal getTax() {\n return tax;\n }",
"public BigDecimal getLBR_TaxDeferralRate();",
"public BigDecimal getTaxAmtPriceStd();",
"static double tax( double salary ){\n\n return salary*10/100;\n\n }",
"public Double calculateTax(Employee employee) {\n\n Double tax = 0.0;\n\n if ( employee != null ) {\n\n Double salary = employee.getSalary();\n if ( salary > 0 ) {\n\n if ( salary < 500000 ) {\n\n tax = salary * 0.05;\n } else if ( salary > 500000 && salary < 1000000 ) {\n\n tax = salary * 0.1;\n } else {\n\n tax = salary * 0.2;\n }\n }\n }\n\n return tax;\n }",
"public double getTaxValue() {\n\t\treturn TaxCalculatorUtil.getTaxValue(getConfiguredPrice(),getPromotionValue(), getCouponDiscountValue(), getTaxRate(), getTaxationType());\n\t}",
"public BigDecimal getPriceListWTax();",
"public double calculateCost() {\n double output = price * (1 + taxRate);\n return output;\n }",
"public double getTaxAmount() {\n return taxAmount;\n }",
"private final void taxCalculations(){\n\r\n hraDeduction = totalHRA - 0.1*basicIncome;\r\n ltaDeduction = totalLTA - 0.7*totalLTA;\r\n\r\n //exemptions\r\n fundsExemption = fundsIncome - 150000; //upto 1.5 lakhs are exempted under IT Regulation 80C\r\n\r\n grossIncome = basicIncome + totalHRA + totalLTA + totalSpecialAl + fundsIncome ;\r\n\r\n totalDeduction = hraDeduction + ltaDeduction;\r\n\r\n totalTaxableIncome = grossIncome - (totalDeduction + fundsExemption);\r\n\r\n taxLiability = 0.05 * (totalTaxableIncome - 250000) + 0.2*(totalTaxableIncome - 500000);\r\n\r\n taxToPay = (cessPercent*taxLiability)/100 + taxLiability;\r\n }",
"@Override\n\tpublic double taxReturn(String productId, int quantity) {\n\t\tString pro = productId;\n\t\tdouble p = 0;\n\t\tdouble q = quantity;\n\t\tdouble t = 0;\n\t\t\n\t\t//for loop to verify all the array\n\t\tfor(int m = 0; m < Driver.products.size(); m++) {\n\t\t\tif(Driver.products.get(m).getProductId().equals(pro)) {\n\t\t\t\tp = Driver.products.get(m).getPrice();\n\t\t\t}\n\t\t t = p * q * tvTax; //using the specific tax for this group of product \n\t\t\n\t\t}//close for loop\n\t\treturn t;\n\t}",
"@Override\n\tpublic double getRate() {\n\t\treturn 7;\n\t}",
"public abstract double getTaxValue(String country);",
"public BigDecimal getTaxscore() {\n return taxscore;\n }",
"@ApiModelProperty(value = \"Applied rate of the tax\")\n\n\n public Float getTaxRate() {\n return taxRate;\n }",
"public double getTaxedCost()\n\t{\n\t\treturn taxedCost;\n\t}",
"@Override\n\tpublic double salesTaxLiabilityPerItem(double itemPrice) {\n\t\treturn Constants.PERCENT_TAX_FOR_RAW_OR_MANUFACTURED_ITEM * itemPrice;\n\n\t}",
"public static double calculateTax(double price) {\r\n\tfinal double TAX = 0.05;\r\n\tdouble taxAmount = price*TAX;\r\n\treturn taxAmount;\r\n\t}",
"public BigDecimal getTaxAmtPriceLimit();",
"private Vehicle calculationTaxes(Vehicle vehicle) {\n double exchangeRateCurrencyOfContract = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(vehicle.getCurrencyOfContract().name());\n double exchangeRateEUR = serviceForCurrencyExchangeRate.getCurrencyExchangeRateNBU(\"EUR\");\n\n // Calculation Impost\n vehicle.setImpostBasis(serviceForNumber.roundingNumber(\n vehicle.getPriceInCurrency() * exchangeRateCurrencyOfContract,\n 2));\n determinationImpostRate(vehicle);\n vehicle.setImpost(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() * vehicle.getImpostRate() / 100,\n 2));\n\n // Calculation Excise\n vehicle.setExciseBasis(vehicle.getCapacity());\n determinationExciseRate(vehicle);\n vehicle.setExcise(serviceForNumber.roundingNumber(\n vehicle.getExciseBasis() * vehicle.getExciseRate() * exchangeRateEUR,\n 2));\n\n // Calculation VAT\n vehicle.setVATBasis(serviceForNumber.roundingNumber(\n vehicle.getImpostBasis() + vehicle.getImpost() + vehicle.getExcise(),\n 2));\n determinationVATRate(vehicle);\n vehicle.setVAT(serviceForNumber.roundingNumber(\n vehicle.getVATBasis() * vehicle.getVATRate() / 100,\n 2));\n\n return vehicle;\n }",
"public BigDecimal getLBR_TaxReliefAmt();",
"@Override\n\tpublic double rentalPrice() {\n\t\treturn 70.00;\n\t}",
"@Override\r\n\tpublic double taxAmount(long itemSold, double price) {\n\t\treturn 100.230;\r\n\t}",
"public void tpsTax() {\n TextView tpsView = findViewById(R.id.checkoutPage_TPStaxValue);\n tpsTaxTotal = beforeTaxTotal * 0.05;\n tpsView.setText(String.format(\"$%.2f\", tpsTaxTotal));\n }",
"public void tvqTax() {\n TextView tvqView = findViewById(R.id.checkoutPage_TVQtaxValue);\n tvqTaxTotal = beforeTaxTotal * 0.09975;\n tvqView.setText(String.format(\"$%.2f\", tvqTaxTotal));\n }",
"private BigDecimal getImportTaxRate() {\n\t\treturn isImported ? Product.DEFAULT_IMPORT_TAX_RATE : BigDecimal.ZERO;\n\t}",
"@Override\r\n\tpublic double getTaxValue() {\n\t\treturn 0;\r\n\t}",
"public double getTaxa() {\n\t\treturn taxa;\n\t}",
"public MMDecimal getTaxAmount() {\r\n return this.taxAmount;\r\n }",
"public Float getPrixHorsTaxes() {\n return prixHorsTaxes;\n }",
"public BigDecimal getLBR_DIFAL_TaxRateFCPUFDest();",
"public double netPrice () {\n return discountedPrice() + taxCharged();\n }",
"public BigDecimal getLBR_TaxAmt();",
"public BigDecimal getLBR_TaxBase();",
"public float getServiceTax() {\n\t\treturn serviceTax;\n\t}",
"public BigDecimal getTaxAmt() {\n\t\treturn taxAmt;\n\t}",
"public int getLocationTax(){\r\n taxlist.add(new Tax(this.estValue,this.PPR,this.yearsowned,this.locationCategory));\r\n count++;\r\n return taxlist.get(count-1).LocationTax();\r\n }",
"public NM getVATRate() { \r\n\t\tNM retVal = this.getTypedField(45, 0);\r\n\t\treturn retVal;\r\n }",
"public double getSalesTax() {\r\n return salesTax;\r\n }",
"public void setTax(Double tax);",
"public BigDecimal getLBR_ICMS_TaxAmtOp();",
"public double price(){\n if (basePrice() >1000){\n return basePrice() *0.95;\n }else\n return basePrice() * 0.98;\n }",
"public BigDecimal getLBR_ICMSST_TaxAmtWhd();",
"public BigDecimal getLBR_TaxBaseAmt();",
"public CoreComponentTypes.apis.ebay.BasicAmountType getTaxAmount() {\r\n return taxAmount;\r\n }",
"@Override\n\tpublic double calculateTax(double sal, double inv) {\n\t\tdouble tax;\n\t\tdouble taxIncom = sal-inv;\n\t\tif(taxIncom<500000) {\n\t\t\ttax = taxIncom*0.10;\n\t\t}else if(taxIncom<2000000){\n\t\t\ttax = 500000*0.10;\n\t\t\ttax += (taxIncom-500000)*0.20;\n\t\t}else{\n\t\t\ttax = 500000*0.10;\n\t\t\ttax += 1500000*0.20;\n\t\t\ttax += (taxIncom-2000000)*0.30;\n\t\t}\n\t\t\n\t\treturn tax;\n\t}",
"public BigDecimal getLBR_ICMSST_TaxAmt();",
"float calculatePrice () \n\t{\n\t\tfloat final_price = 0;\n\t\tfinal_price = (float)(price * quantity); // price * number of items\n\t\tfinal_price += final_price*(.10); // add tax\n\t\tif(perishable.equals(\"P\"))\n\t\t{\n\t\t\tfloat ship = (float)(20* weight)*quantity; // add shipping\n\t\t\tship += ship*.20;\n\t\t\tfinal_price += ship;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfinal_price += (20* weight)*quantity; // add shipping\n\t\t}\n\t\treturn final_price;\n\t}",
"public BigDecimal getLBR_TaxRateCredit();",
"public String getTotalTaxes(){\n String tax = driver.findElement(oTotalTaxes).getText();\n logger.debug(\"total taxes is\" + tax);\n return tax;\n }",
"public double calcStandardPrice(){\n double standardPrice = getLocation().getBasePrice() + BASE_RATE;\n return standardPrice;\n }",
"public BigDecimal getLBR_TaxDeferralAmt();",
"public BigDecimal getLBR_DIFAL_TaxAmtFCPUFDest();",
"public BigDecimal getLBR_ICMSST_TaxAmtUFSen();",
"public BigDecimal getLBR_ICMSST_TaxBase();",
"public double roundedTax(double tax) {\n\t\tdouble totalTax = ((double)Math.round(tax*10*2))/20;\n\t\treturn totalTax;\n\t}",
"@Override\n\tpublic double cost() {\n\t\treturn Double.parseDouble(rateOfLatte);\n\t}",
"public BigDecimal getLBR_DIFAL_TaxRateICMSUFDest();",
"public static double calculations(int quantity, double cost) {\r\n\tdouble price = 0;\r\n\tprice = quantity*cost;\r\n\treturn price = price+calculateTax(price);\r\n\t}",
"public void setPriceStdWTax (BigDecimal PriceStdWTax);",
"public double calculateTax(double planFee, double overageCost) {\n double tax = (planFee + overageCost) * 0.15;\n return tax;\n }",
"public abstract void calcuteTax(Transfer aTransfer);",
"public BigDecimal getLBR_ICMSST_TaxBaseAmt();"
] | [
"0.7655086",
"0.74480206",
"0.7420506",
"0.7391653",
"0.73194355",
"0.7267215",
"0.72518545",
"0.7238662",
"0.7237959",
"0.7201839",
"0.71946514",
"0.7193056",
"0.7184713",
"0.71685797",
"0.716325",
"0.7115033",
"0.7099655",
"0.7096688",
"0.7082145",
"0.7014626",
"0.69994223",
"0.6950521",
"0.6949994",
"0.68894106",
"0.6828894",
"0.6826949",
"0.68159324",
"0.6808483",
"0.67990386",
"0.67811495",
"0.67772615",
"0.6773528",
"0.6754388",
"0.67474663",
"0.6742422",
"0.673806",
"0.6737048",
"0.6732553",
"0.6717336",
"0.6702197",
"0.66895944",
"0.66888106",
"0.6609475",
"0.65732276",
"0.6540346",
"0.6527863",
"0.64966315",
"0.6488142",
"0.6471254",
"0.6456159",
"0.6419736",
"0.63881856",
"0.6379382",
"0.6370085",
"0.6358906",
"0.6352013",
"0.6340293",
"0.6324739",
"0.63172483",
"0.62951344",
"0.6294463",
"0.6289333",
"0.6282989",
"0.6216979",
"0.6209723",
"0.6205326",
"0.6204018",
"0.6201356",
"0.6196177",
"0.61595577",
"0.615699",
"0.61544406",
"0.6151151",
"0.61471146",
"0.61439306",
"0.61377794",
"0.613708",
"0.61282045",
"0.61232185",
"0.6085794",
"0.6070378",
"0.60695434",
"0.60620266",
"0.6059457",
"0.6056051",
"0.60468304",
"0.6022422",
"0.60153645",
"0.6004398",
"0.59994507",
"0.5998853",
"0.5990317",
"0.598826",
"0.59876305",
"0.5978916",
"0.5963994",
"0.5963505",
"0.59581053",
"0.59478664",
"0.5941329"
] | 0.77923316 | 0 |
equipment does not have a service fee | public double getServiceFee() {
return 0.00;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(expected = FacilityNotFreeException.class)\n\tpublic void testBookNotFree() throws Exception {\n\t\t// create a reservation\n\t\tdataHelper.createPersistedReservation(\"aUser\", Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t\t// book should fail..\n\t\tbookingManagement.book(USER_ID, Arrays.asList(room1.getId()), validStartDate, validEndDate);\n\t}",
"@Override\r\n public double purchaseFee(){\r\n return fee;\r\n }",
"@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }",
"public int getFee(){return 0;}",
"public abstract double getComplianceFee();",
"@Test(expected=MissingPrice.class)\n\tpublic void testNotEnoughBought() {\n\t\tpos.setPricing(\"A\", 4, 7);\n\n\t\tpos.scan(\"A\");\n\t\tpos.total();\n\t}",
"@Test\n public void testMoreRequired() throws VendingMachineInventoryException{\n service.addFunds(\"1.00\");\n Item testitem = new Item(\"testitem\", \"1.50\", \"5\");\n service.addItem(\"testitem\", testitem);\n BigDecimal moneyRequired = service.moreRequired(\"testitem\");\n BigDecimal expectedMoneyRequired = new BigDecimal(\"0.50\");\n assertEquals(moneyRequired, expectedMoneyRequired);\n }",
"boolean hasExchangeprice();",
"@Override\n\tpublic double getAdditionalFee() {\n\t\treturn 0.0;\n\t}",
"@Override\n\tpublic double getAdditionalFee() {\n\t\t\n\t\treturn 0;\n\t}",
"@Test\n\tpublic void testFindFreeFacilityRoomNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(room1.getId()), startDate, reservationEndDate);\n\n\t\t// search for one workplace in room1\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because room is not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}",
"boolean hasAmount();",
"boolean hasAmount();",
"private boolean checkGreedyEnergy() {\r\n return myTotal.get(2) < 10 || (myTotal.get(2) < 13 && myTotal.get(2) <= enTotal.get(2));\r\n }",
"@Override\r\n\tpublic boolean checkBudget() {\n\t\treturn false;\r\n\t}",
"public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }",
"public boolean hasIllegalGoods() {\n return cargoHold.hasIllegalGoods();\n }",
"public String getFeeReason() {\n return feeReason;\n }",
"@Test\n public void verifyNoOfferApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 2);\n \tbasket.getProducts().put(product2, 1);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 8 items = 4.3 ==> \", (calculator.calculatePrice(basket) - 4.3) < 0.0001);\n }",
"public abstract void msgCanOnlyDeliverPartial(Market market, Food food, int amountDeliverable);",
"@Test\n void calculateNegativeDailyCostTest() throws Exception {\n ToolType toolType = ToolType.JACKHAMMER; // weekendFree: true holidayFree: true\n String toolCode = \"JAKR\";\n String brand = \"Werner\";\n int discount = 0;\n int daysRented = 5;\n LocalDate checkoutDate = createDate(\"2015-09-03\");\n\n Tool tool = new Tool(toolType, toolCode, brand, -50.00, false, false);\n\n List<Tool> tools = Arrays.asList(tool);\n Order order = new Order(tools, checkoutDate, daysRented);\n\n List<LocalDate> holidays = createHolidays(checkoutDate.getYear());\n RentalAgreement rentAgmt = createRentalAgreement(order, discount, holidays);\n\n Assertions.assertThrows(Exception.class, ()->\n rentAgmt.calculate(), \"Expected calculate() to throw Exception but it didn't\"\n );\n }",
"@Test\n\tpublic void testFindFreeFacilityWorkplacesNotAvailible() {\n\t\t// get current date\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, 1);\n\t\t// start is current date + 1\n\t\tDate startDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, 24);\n\t\tDate reservationEndDate = cal.getTime();\n\n\t\tcal.add(Calendar.HOUR, -23);\n\t\tDate findEndDate = cal.getTime();\n\n\t\tdataHelper.createPersistedReservation(\"aID\", Arrays.asList(workplace1.getId(), workplace2.getId()),\n\t\t\t\tstartDate, reservationEndDate);\n\n\t\t// search for 1 workplace\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), \"\", 1);\n\t\tCollection<FreeFacilityResult> result;\n\t\tresult = bookingManagement.findFreeFacilites(query, startDate, findEndDate, false);\n\n\t\t// should find no room because workplace1 and workplace 2 are not available\n\t\tassertNotNull(result);\n\t\tassertEquals(0, result.size());\n\t}",
"@Test(expected=InvalidPriceFault_Exception.class)\n\tpublic void testInvalidPrice() throws Exception{\n\t\tSystem.out.println(\"[TEST] Invalid Price \");\n\t\tnew StrictExpectations() {{\n\t\t\tnew UDDINaming(anyString);\n\n\t\t\tuddi.list(\"UpaTransporter%\");\n\t\t\tresult = _endpoints;\n\n\t\t\tnew TransporterClient(\"Broker\");\n\n\t\t\tclient.connectToTransporterByURI(anyString);\n\t\t\tclient.ping();\n\t\t\tresult = \"UpaTransporter1\";\n\t\t}};\n\t\tbroker.requestTransport(\"Leiria\", \"Lisboa\", 0);\n\t}",
"@Test\n public void amountIsNotEnough() {\n assertThrows(CouponNotFoundException.class,\n () -> couponService.calculateCoupon(Arrays.asList(MLA1),Float.valueOf(0)));\n }",
"@Test\n public void checkFuelEmpty() {\n Game.getInstance().getPlayer().setSolarSystems(SolarSystems.SOMEBI);\n Game.getInstance().getPlayer().setFuel(0);\n assertFalse(SolarSystems.SOMEBI.canTravel(SolarSystems.ADDAM));\n \n \n \n }",
"@Test\n public void testNotEnoughCash() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // trying to pay for a sale with insufficient funds\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid-1), 0.001);\n\n // verify sale did not change state to PAID/COMPLETED\n assertFalse(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not change\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }",
"String getNeedsInventoryIssuance();",
"private void businessValidationForOnlinePaymentServiceRequestOrder(PaymentFeeLink order, OnlineCardPaymentRequest request) {\n Optional<BigDecimal> totalCalculatedAmount = order.getFees().stream().map(paymentFee -> paymentFee.getCalculatedAmount()).reduce(BigDecimal::add);\n if (totalCalculatedAmount.isPresent() && (totalCalculatedAmount.get().compareTo(request.getAmount()) != 0)) {\n throw new ServiceRequestExceptionForNoMatchingAmount(\"The amount should be equal to serviceRequest balance\");\n }\n\n //Business validation for amount due for fees\n Optional<BigDecimal> totalAmountDue = order.getFees().stream().map(paymentFee -> paymentFee.getAmountDue()).reduce(BigDecimal::add);\n if (totalAmountDue.isPresent() && totalAmountDue.get().compareTo(BigDecimal.ZERO) == 0) {\n throw new ServiceRequestExceptionForNoAmountDue(\"The serviceRequest has already been paid\");\n }\n }",
"private boolean checkCost(int owner, ItemType item) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\n\tpublic int fees() {\n\t\treturn 25000;\n\t\t\n\t}",
"@Test\r\n\tpublic void testMakePurchase_empty_slot() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"D\"));\r\n\t}",
"boolean investmentIsBondListFull() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }",
"@Test\r\n\tpublic void testMakePurchase_not_enough_money() {\r\n\t\tassertEquals(false, vendMachine.makePurchase(\"A\"));\r\n\t}",
"public boolean couldBeProfitable(){\n return this.priceBought < this.maximumMachineProfit;\n }",
"@Override\n\tpublic int getProfit() {\n\t\treturn 0;\n\t}",
"public void testReserveSeatsZeroHoldId(){\n TheatreTicketService ticketService = new TheatreTicketService();\n String confirmationCode = ticketService.reserveSeats(0, \"[email protected]\");\n assertTrue(confirmationCode == null);\n }",
"public int getFee()\n {\n return fee;\n }",
"@Test\n\tpublic void testCheckSufficientCredits_OverdraftFacility() {\n\n\t\tint creditsRequired = 11;\n\n\t\tSmsMessage msg = new SmsMessage();\n\t\tSmsTask smsTask = new SmsTask();\n\t\tsmsTask.setSakaiSiteId(SmsConstants.SMS_DEV_DEFAULT_SAKAI_SITE_ID);\n\t\tsmsTask.setSmsAccountId(account.getId());\n\t\tsmsTask.setDateCreated(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setDateToSend(new Timestamp(System.currentTimeMillis()));\n\t\tsmsTask.setStatusCode(SmsConst_DeliveryStatus.STATUS_PENDING);\n\t\tsmsTask.setAttemptCount(2);\n\t\tsmsTask.setMessageBody(SmsConstants.SMS_DEV_DEFAULT_SMS_MESSAGE_BODY);\n\t\tsmsTask.setSenderUserName(\"senderUserName\");\n\t\tsmsTask.setMaxTimeToLive(1);\n\t\tsmsTask.getSmsMessages().add(msg);\n\t\tsmsTask.setCreditEstimate(creditsRequired);\n\t\tmsg.setSmsTask(smsTask);\n\n\t\tboolean sufficientCredits = smsBillingImpl.checkSufficientCredits(\n\t\t\t\taccount.getId(), creditsRequired);\n\t\tAssert.assertFalse(\"Expected insufficient credit\", sufficientCredits);\n\t\thibernateLogicLocator.getSmsAccountLogic().persistSmsAccount(account);\n\t\tsufficientCredits = smsBillingImpl.checkSufficientCredits(account\n\t\t\t\t.getId(), creditsRequired);\n\t\tAssert.assertTrue(\"Expected insufficient credit\", !sufficientCredits);\n\t}",
"@Test\r\n\tpublic void testCancelAuctionOnAuctionDoesntExistForNonProfit(){\r\n\t\tCalendar c = new Calendar();\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myAuctDateMoreThan2Days, myCurrDate));\t\t\r\n\t}",
"public Boolean verifyTheValueDeliveryCostIsInZero() {\n\t\tSystem.out.println(\"Starting to verify if the value delivery cost is equal to zero.\");\n\t\treturn verifyIfSomeStringContainsZeroDotZeroZeroValueInside(getTextByLocator(body_value_deliverycost));\n\t}",
"@Test\n\tvoid cannotPurchase() {\n\t\ttestCrew.setMoney(0);\n\t\titemList.get(0).purchase(testCrew);\n\t\tassertEquals(testCrew.getMoney(), 0);\n\t\tassertTrue(testCrew.getMedicalItems().isEmpty());\n\t}",
"double getUnpaidAmount();",
"boolean hasBonusMoney();",
"public boolean isBancrupt(){\r\n \treturn _budget <= 0;\r\n }",
"@Test\r\n public void testPurChaseBeverageWithNotEnoughMoney() {\r\n coffeeMaker.addRecipe(recipe1); // cost 50\r\n assertEquals(25, coffeeMaker.makeCoffee(0, 25)); // not enough amount paid\r\n }",
"public int remainingFees()\r\n\t{\r\n\t\treturn feesTotal-feesPaid;\t\t\r\n\t}",
"public void testReserveSeatsNullEmail(){\n TheatreTicketService ticketService = new TheatreTicketService();\n String confirmationCode = ticketService.reserveSeats(0, null);\n assertTrue(confirmationCode == null);\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testFindFreeFacilitiesWithIllegalStart() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), SEARCH_TEXT, NEEDED_WORKPLACES);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// start is current date - 2\n\t\tDate invalidStartDate = cal.getTime();\n\t\tbookingManagement.findFreeFacilites(query, invalidStartDate, validEndDate, true);\n\t}",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testFindFreeFacilitiesWithIllegalEnd() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), SEARCH_TEXT, NEEDED_WORKPLACES);\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.add(Calendar.HOUR, -2);\n\t\t// end is current date - 2\n\t\tDate invalidEndDate = cal.getTime();\n\t\tbookingManagement.findFreeFacilites(query, validStartDate, invalidEndDate, true);\n\t}",
"boolean hasPrice();",
"boolean hasPrice();",
"boolean hasPrice();",
"@Test\n void calculateDiscountTooLowTest() throws Exception {\n ToolType toolType = ToolType.JACKHAMMER; // weekendFree: true holidayFree: true\n String toolCode = \"JAKR\";\n String brand = \"Werner\";\n int discount = -10;\n int daysRented = 0;\n LocalDate checkoutDate = createDate(\"2015-09-03\");\n\n Tool tool = createTool(toolType, toolCode, brand);\n\n List<Tool> tools = Arrays.asList(tool);\n Order order = new Order(tools, checkoutDate, daysRented);\n\n List<LocalDate> holidays = createHolidays(checkoutDate.getYear());\n RentalAgreement rentAgmt = createRentalAgreement(order, discount, holidays);\n\n Assertions.assertThrows(Exception.class, ()->\n rentAgmt.calculate(), \"Expected calculate() to throw Exception but it didn't\"\n );\n }",
"@Override\r\n\tpublic void makeDeliveryFree() {\n\t\t\r\n\t}",
"public void getBookAvailability() {\n getBookReservationEligibility();\n }",
"private void givenExchangeRateExistsForABaseAndDate() {\n }",
"boolean hasPlainRedeem();",
"@Test\n public void notSell() {\n Game game = Game.getInstance();\n Player player = new Player(\"ED\", 4, 4, 4,\n 4, SolarSystems.GHAVI);\n game.setPlayer(player);\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(2, Goods.Water));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(1, Goods.Food));\n game.getPlayer().getShip().getShipCargo().add(new CargoItem(0, Goods.Furs));\n CargoItem good = game.getPlayer().getShip().getShipCargo().get(2);\n \n int oldCredits = game.getPlayer().getCredits();\n good.getGood().sell(good.getGood(), 1);\n \n CargoItem water = game.getPlayer().getShip().getShipCargo().get(0);\n CargoItem food = game.getPlayer().getShip().getShipCargo().get(1);\n water.setQuantity(2);\n food.setQuantity(1);\n good.setQuantity(0);\n //int P = good.getGood().getPrice(1);\n int curr = game.getPlayer().getCredits();\n //boolean qn = water.getQuantity() == 2 && food.getQuantity() == 1 && good.getQuantity() == 0;\n boolean check = water.getQuantity() == 2;\n System.out.print(curr);\n assertEquals(curr, oldCredits);\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testFindFreeFacilitiesWithStartAfterEnd() {\n\t\tRoomQuery query = new RoomQuery(Arrays.asList(new Property(\"WLAN\")), SEARCH_TEXT, NEEDED_WORKPLACES);\n\t\tbookingManagement.findFreeFacilites(query, validEndDate, validStartDate, true);\n\t}",
"private boolean DeriveStockWith_FundIsAvailable() {\n\t\tif (getFunds() > 0) {\n\t\t\tif (calculateInputStock_Items() > getFunds()) {\n\t\t\t\tSystem.err.println(\"Insufficient Funds, Cannot restock\");\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t\t// available funds can accommodate input stock requirement\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Insufficient Funds\");\n\t\t}\n\t\treturn false;\n\t}",
"public abstract double getLateFee(int daysLate);",
"public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }",
"public float getQuantityAvailableForSale () {\n return (float) 0.0;\n }",
"boolean expendEnergy(double amount) {\r\n if (amount <= energy) {\r\n energy -= amount;\r\n return true;\r\n }\r\n else\r\n return false;\r\n }",
"@Test\r\n\tpublic void testCancelAuctionOnAuctionExsistsForNonProfitLessThan2Days(){\r\n\t\t\r\n\t\tCalendar c = new Calendar();\t\t\r\n\t\tc.addAuction(new AuctionRequest(d1, t1, myNonProfit.getOrgName()));\t\t\r\n\t\tassertFalse(c.cancelAuction(myNonProfit, myAuctDateLessThan2Days, myCurrDate));\r\n\t\t\r\n\t}",
"public void verifyNoMatching(AcBatchFlight e)\n {\n }",
"@Override\r\n\tpublic boolean isPaid() {\n\t\treturn false;\r\n\t}",
"@Override\n public final boolean hasForfeitAttribute() {\n return true;\n }",
"protected void imposeTransactionFee ()\n {\n if (getBalance () < minimumBalance)\n super.withdraw (transactionFee);\n }",
"private BigDecimal getCardServiceFeeAmount(final CartReceiptResponse receiptResponse\n , final PdfPTable paymentSectionTable, final PdfPCell blankSpaceCell, final Locale locale) {\n\n \t/* Get funding source from the CART_RECEIPT_REPRINT response */\n final FundingSourceResponse[] fundingSource = receiptResponse.getFundingSources();\n final SubmittedBill[] submittedBills = receiptResponse.getSubmittedBills();\n /* Initializing serviceFee */\n final BigDecimal serviceFee = addServiceFee(submittedBills);\n for (final FundingSourceResponse aFundingSource : fundingSource) {\n /* Check for the DEBIT/CREDIT card instance */\n if (aFundingSource instanceof VestaFundingSourceResponse) {\n /* ServiceFeePercentRate is null treating it as ZERO other wise get the value */\n BigDecimal cardServiceFeePercent = aFundingSource.getServiceFeePercentRate() == null\n ? new BigDecimal(0) : aFundingSource.getServiceFeePercentRate();\n /* In case seviceFee amount is > ZERO then execute the below block of code to display the line above the total bills */\n if (serviceFee.compareTo(BigDecimal.ZERO) > 0 && cardServiceFeePercent.compareTo(BigDecimal.ZERO) > 0) {\n /* Cell for the card service percent label */\n Font font = getFont(null, FONT_SIZE_12, Font.NORMAL);\n String message = getMessage(locale, \"pdf.receipt.serviceFee\", cardServiceFeePercent);\n PdfPCell serviceFeeLabel = new PdfPCell(new Phrase(message, font));\n /* Cell for the card service fee amount */\n PdfPCell serviceFeeTotal = new PdfPCell(\n new Phrase(getFormattedAmount(serviceFee), font));\n /* Adding above cells to table */\n cellAlignment(serviceFeeLabel, Element.ALIGN_LEFT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, serviceFeeLabel, Rectangle.NO_BORDER, 2, 15);\n\n cellAlignment(serviceFeeTotal, Element.ALIGN_RIGHT, WHITE_COLOR, 0);\n cellAddingToTable(paymentSectionTable, serviceFeeTotal, Rectangle.NO_BORDER, 0, 0);\n\t\t\t\t\t/* Adding blank space to table */\n cellAlignment(blankSpaceCell, Element.ALIGN_LEFT, GRAY_COLOR, 0);\n cellAddingToTable(paymentSectionTable, blankSpaceCell, Rectangle.NO_BORDER, 3, 0);\n }\n }\n }\n return serviceFee;\n }",
"boolean hasLedger();",
"@java.lang.Override\n public boolean hasAmount() {\n return instance.hasAmount();\n }",
"boolean isSetAmount();",
"@Override\n\tpublic float desireability() {\n\t\tAgentSpace agentSpace = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tMap<String,FoodEntry> map = agentSpace.getScentMemories().getFirst();\n\t\tif (map == null || map.size() == 0) { \n\t\t\t// we don't smell anything\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tAgentSpace space = Blackboard.inst().getSpace(AgentSpace.class, _obj.getName());\n\t\tBoundedEntry bounded = space.getBounded(Variable.energy);\n\t\tfloat pct = bounded.getValue() / bounded.getMax();\n\t\treturn 1 - (pct*pct);\n\t}",
"public double getFees(){\n\t\treturn (this.getPassengerFacilityFee() + this.get911SecurityFee());\n\t}",
"private Boolean calculateTotalEmission() {\n\t\ttry {\n\n\t\t\tfoodCO2E = Double.valueOf(JTFFood.getText().isEmpty() ? \"0.0\" : JTFFood.getText())\n\t\t\t\t\t* energySourceDetail.get(FoodIntake).get(JCBFoodUnit.getSelectedItem().toString());\n\n\t\t\tlandfillingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFLandfillingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFLandfillingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(LandfillingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBLandfillingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t\tcompostingFoodWasteCO2E = Double\n\t\t\t\t\t.valueOf(JTFCompostingFoodWaste.getText().isEmpty() ? \"0.0\" : JTFCompostingFoodWaste.getText())\n\t\t\t\t\t* energySourceDetail.get(CompostingFoodWaste)\n\t\t\t\t\t\t\t.get(JCBCompostingFoodWasteUnit.getSelectedItem().toString());\n\n\t\t} catch (NumberFormatException ne) {\n\t\t\tSystem.out.println(\"Number Format Exception while calculating House Hold Emission\" + ne);\n\t\t\treturn false;\n\t\t}\n\t\t//\n\t\ttotalFoodCO2E = foodCO2E + landfillingFoodWasteCO2E + compostingFoodWasteCO2E;\n\t\ttotalFoodCO2E = Math.round(totalFoodCO2E * 100D) / 100D;\n\t\treturn true;\n\t}",
"@Test\r\n\tpublic void testNoPersonMarkup() throws BasePriceMustBePositiveException, \r\n\t NegativePersonCountException, ProductCategoryNotSpecifiedException {\r\n\t\tNuPackEstimator estimator = new NuPackEstimator(new BigDecimal(\"100\"), 0, \"electronics\");\r\n\t assertEquals(estimator.estimateFinalCost(), new BigDecimal(\"107.10\"));\r\n\t}",
"@Override\n public double calcSalesFee() {\n return getCost() + getSalesPurchase();\n }",
"boolean hasQuantity();",
"@Override\n public int getCost() {\n\treturn 0;\n }",
"public Boolean verifyTheValueTotalCostIsInZero() {\n\t\tSystem.out.println(\"Starting to verify if the value total cost is equal to zero.\");\n\t\treturn verifyIfSomeStringContainsZeroDotZeroZeroValueInside(getTextByLocator(body_value_total));\n\t}",
"@Test\n public void verifyOffersApplied() {\n \tProduct product = new Product(\"Watermelon\", 0.8);\n \tProduct product2 = new Product(\"Apple\", 0.2);\n \tProduct product3 = new Product(\"Orange\", 0.5);\n \tBasket basket = new Basket();\n \tbasket.getProducts().put(product, 6);\n \tbasket.getProducts().put(product2, 4);\n \tbasket.getProducts().put(product3, 5);\n \tassertTrue(\"Have to get the price of 15 items = 6.1 ==> \", (calculator.calculatePrice(basket) - 6.1) < 0.0001);\n }",
"public static boolean isPreservedFoodAvailable(Person person) {\n\t\tboolean result = false;\n\t\tUnit containerUnit = person.getTopContainerUnit();\n\t\tif (!(containerUnit instanceof MarsSurface)) {\n\t\t\tInventory inv = containerUnit.getInventory();\n\t\t\tif (inv != null && foodConsumptionRate > MIN)\n\t\t\t\tresult = inv.getAmountResourceStored(ResourceUtil.foodID, false) > MIN;\n//\t\t\t\tStorage.retrieveAnResource(foodConsumptionRate, ResourceUtil.foodID, inv, false);\n\t\t}\n\t\treturn result;\n\t}",
"@Test\n public void noFrozenBalance() {\n UnfreezeBalanceActuator actuator = new UnfreezeBalanceActuator(getContractForBandwidth(UnfreezeBalanceActuatorTest.OWNER_ADDRESS), UnfreezeBalanceActuatorTest.dbManager);\n TransactionResultCapsule ret = new TransactionResultCapsule();\n try {\n actuator.validate();\n actuator.execute(ret);\n TestCase.fail(\"cannot run here.\");\n } catch (ContractValidateException e) {\n Assert.assertTrue((e instanceof ContractValidateException));\n Assert.assertEquals(\"no frozenBalance(BANDWIDTH)\", e.getMessage());\n } catch (ContractExeException e) {\n Assert.assertFalse((e instanceof ContractExeException));\n }\n }",
"public long getFee() {\n return fee_;\n }",
"public String getFeeDescription() {\n return feeDescription;\n }",
"@Override\n\tpublic double getPremiumFee(FDRuleContextI ctx) {\n\t\treturn 0;\n\t}",
"private boolean checkShippingElementExist(WebElement article) {\n\t\ttry {\n\t\t\tarticle.findElement(By.xpath(\"ul/li[@class='lvshipping']//span[@class='fee']\"));\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\r\n void shouldReturnOneZeroPoints() {\r\n InsuranceRiskService insuranceRiskService = new DisabilityInsuranceRiskService();\r\n InsuranceRiskRequest insuranceRiskRequest = new InsuranceRiskRequest();\r\n insuranceRiskRequest.setAge(35);\r\n insuranceRiskRequest.setHouse(null);\r\n insuranceRiskRequest.setIncome(BigDecimal.valueOf(999999));\r\n insuranceRiskRequest.setDependents(2);\r\n insuranceRiskRequest.setMaritalStatus(\"single\");\r\n Assertions.assertEquals(2, insuranceRiskService.calculate(3, insuranceRiskRequest));\r\n }",
"@Then(\"Verify the price the selected item\")\n\tpublic void verify_the_price_the_selected_item() {\n\t throw new io.cucumber.java.PendingException();\n\t}",
"public BigDecimal getFee() {\n return fee;\n }",
"public boolean isBuyable();",
"public void setFee(int fee)\n {\n this.fee = fee;\n }",
"@Override\n public String getDescription() {\n return \"Claim currency reserve\";\n }",
"private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }",
"@Override\r\n\tpublic Reservation faireUneDemandeAnnulation(Reservation r) {\n\t\treturn null;\r\n\t}",
"public boolean aUnPrix() {\n return false;\n }",
"boolean examinePaidItems(){\n\t\t\tint count = 0;\n\t\t\tif (!this.items.isEmpty()){\n\t\t\t\tfor (int i = 0; i < this.items.size(); i++){\n\t\t\t\t\tif (this.items.get(i).montaryValue != 0){\n\t\t\t\t\t\tSystem.out.print(this.items.get(i).itemName + \" ($\" + (this.items.get(i).montaryValue * -1) + \"), \");\n\t\t\t\t\t\tcount++;}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!this.receptacle.isEmpty()){//if the location has containers.\n\t\t\t\tfor (int k = 0; k < this.receptacle.size(); k++){//loops through the containers in the location\n\t\t\t\t\tif (!(this.receptacle.get(k) instanceof SpecialtyContainer)){//some containers are hidden, like the depths of the cove. \n\t\t\t\t\t\tfor (int j = 0; j < this.receptacle.get(k).contents.size(); j++){//looks for the items in the non hidden containers\n\t\t\t\t\t\t\tif (this.receptacle.get(k).contents.get(j).montaryValue < 0){//if the item needs to be bought\n\t\t\t\t\t\t\t\tSystem.out.print(this.receptacle.get(k).contents.get(j).itemName + \" ($\" + \n\t\t\t\t\t\t\t\t\t\t(this.receptacle.get(k).contents.get(j).montaryValue * -1) + \"), \");\n\t\t\t\t\t\t\t\tcount++;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif (count == 0){//it didn't find any items you need to pay for.\n\t\t\t\tSystem.out.println(\"There's nothing here that costs money.\");\n\t\t\t\treturn false;}\n\t\t\treturn true;\n\t\t}",
"public ExemptedFeesVM() {\n list = new ArrayList<>();\n }",
"@Entao(\"^nao sera possivel por falta de estoque$\")\n\tpublic void naoSeraPossivelPorFaltaDeEstoque() throws Throwable {\n\t throw new PendingException();\n\t}"
] | [
"0.60248935",
"0.5982366",
"0.5960439",
"0.5930705",
"0.59162104",
"0.5898548",
"0.5894737",
"0.5886604",
"0.5869653",
"0.583615",
"0.5693375",
"0.5683785",
"0.5683785",
"0.566258",
"0.5648008",
"0.56475157",
"0.56466216",
"0.56433684",
"0.56412554",
"0.5636169",
"0.56098807",
"0.56065327",
"0.5581753",
"0.55712736",
"0.5570301",
"0.55530715",
"0.5533288",
"0.553124",
"0.5525388",
"0.5500549",
"0.5485756",
"0.5477387",
"0.5460788",
"0.54557014",
"0.5431706",
"0.54238164",
"0.54225326",
"0.53917366",
"0.5384522",
"0.53811014",
"0.5380484",
"0.5378638",
"0.5358404",
"0.5343584",
"0.53422093",
"0.533462",
"0.5327273",
"0.53239137",
"0.5322072",
"0.53204817",
"0.53204817",
"0.53204817",
"0.5317538",
"0.53047216",
"0.5304571",
"0.53002846",
"0.5287893",
"0.5285884",
"0.52728",
"0.5271337",
"0.5271317",
"0.5270201",
"0.5267303",
"0.52668935",
"0.52650505",
"0.526174",
"0.52523035",
"0.52493805",
"0.5244639",
"0.52430946",
"0.5243061",
"0.5242821",
"0.5235382",
"0.52343905",
"0.52331924",
"0.5227942",
"0.52263105",
"0.5222408",
"0.5213185",
"0.5209021",
"0.52085197",
"0.5205657",
"0.5204681",
"0.51950324",
"0.51945513",
"0.5192174",
"0.5191258",
"0.5188847",
"0.5187001",
"0.5185193",
"0.51841193",
"0.51817757",
"0.5181442",
"0.5170953",
"0.5167493",
"0.51658195",
"0.5161293",
"0.5158429",
"0.5149706",
"0.51424"
] | 0.5826176 | 10 |
Using charArray Sorting, 6ms! | public boolean isAnagram(String s, String t) {
if(s.length() != t.length()) return false;
char[] chs = s.toCharArray();
char[] cht = t.toCharArray();
Arrays.sort(chs);
Arrays.sort(cht);
String ss = String.valueOf(chs);
String tt = String.valueOf(cht);
return ss.equals(tt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }",
"private static void sort(String[] a, int lo, int hi, int d) { \n if (hi <= lo + CUTOFF) {\n insertion(a, lo, hi, d);\n return;\n }\n int lt = lo;\n int gt = hi;\n int v = charAt(a[lo], d);\n int i = lo + 1;\n while (i <= gt) {\n int t = charAt(a[i], d);\n if (t < v) {\n \texch(a, lt++, i++);\n }\n else if (t > v) {\n \texch(a, i, gt--);\n }\n else {\n \ti++;\n }\n }\n //a[lo..lt-1] < v = a[lt..gt] < a[gt+1..hi]. \n sort(a, lo, lt-1, d);\n if (v >= 0) sort(a, lt, gt, d+1);\n sort(a, gt+1, hi, d);\n }",
"public String doSort();",
"static boolean charArraySorted(char[] carray) {\n\t\tfor (int i = 0; i + 1 < carray.length; i++) {\n\t\t\tif (carray[i] > carray[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t\treturn true;\n\t}",
"public void sortChars(String[] array){\n HashMap<String, LinkedList<String>> list = new HashMap<String, LinkedList<String>>();\n\n for(String s: array){\n String key = sortChars(s);\n if(!list.containsKey(key)){\n list.put(key, new LinkedList<String>());\n }\n LinkedList<String> anagrams = list.get(key);\n anagrams.push(s);\n }\n\n int index = 0;\n for(String key: list.keySet()){\n LinkedList<String> anagrams = list.get(key);\n for(String val: anagrams){\n array[index] = val;\n index++;\n }\n }\n }",
"public static void sort(String[] arr) {\r\n System.out.println(\"sorting word\");\r\n int min; // the index of min\r\n String temp;\r\n for (int i = 0; i < arr.length - 1; i++) // start form beginning to the second last element\r\n {\r\n min = findMin(arr, i); // find the minimum content index of the array\r\n // swap the place\r\n temp = arr[i];\r\n arr[i] = arr[min];\r\n arr[min] = temp;\r\n }\r\n }",
"static void stringSort(String[] arr) {\n\t\tfor(int i = 0; i<arr.length-1;i++) {\n\t\t\tint index =i;\n\t\t\tfor(int j =i+1; j<arr.length;j++) {\n\t\t\t\tif(arr[j].compareTo(arr[index])<0) {\n\t\t\t\t\tindex = j; //finding the smallest index\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t//Swap the found minimum element with the first element\n\t\t\tString temp = arr[index]; \n arr[index] = arr[i]; \n arr[i] = temp; \n\t\t}\n for(String a:arr) {\n \t\t\tSystem.out.println(a);\n\t}\n\t}",
"public static void countSort(char seq[])\n {\n Arrays.sort(seq); \n }",
"public void oldSort()\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) {\n\t\t\tfor (int secondIndex = index + 1; secondIndex < arraySize; secondIndex++) {\n\t\t\t\tint temp = 0;\n\t\t\t\tif (array[index] > array[secondIndex]) {\n\t\t\t\t\ttemp = array[index];\n\t\t\t\t\tarray[index] = array[secondIndex];\n\t\t\t\t\tarray[secondIndex] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void sort() {\r\n for (int i = 0; i < namesOfApp.length && i < runTimeOfApp.length; i++) {\r\n for (int j = 0; j < i; j++) {\r\n if (runTimeOfApp[j] < runTimeOfApp[i]) {\r\n String tempName = namesOfApp[i];\r\n long tempRunTime = runTimeOfApp[i];\r\n namesOfApp[i] = namesOfApp[j];\r\n runTimeOfApp[i] = runTimeOfApp[j];\r\n namesOfApp[j] = tempName;\r\n runTimeOfApp[j] = tempRunTime;\r\n }\r\n }\r\n }\r\n\r\n }",
"@Override\n \tpublic void sort() {\n \t\tArrays.sort(data);\n \t}",
"public static void sortIgnoringSpaces(String[] a) {\r\n Arrays.sort(a);\r\n for(int i = 0; i<a.length-1;i++){\r\n System.out.println(a[i]); \r\n }\r\n \r\n }",
"public void charSorting(char input[]) {\n int n = input.length;\n char[] output = new char[n];\n\n // Create an array of 256 size to store count the frequency of char and assign with 0\n int[] count = new int[256];\n for (int i = 0; i < 256; i++)\n count[i] = 0;\n\n //Count the frequency of char in input array\n for (int i = 0; i < n; i++)\n count[input[i]]++;\n\n // Change count[i] so that count[i] now contains actual\n // position of this character in output array\n //Computing cumulative sum\n for (int i = 1; i <= 255; i++)\n count[i] += count[i - 1];\n\n //Assign the chars in output array by operating in reverse order\n for (int i = n - 1; i >= 0; i--) {\n output[count[input[i]] - 1] = input[i];\n count[input[i]]--;\n }\n\n //Print the output array\n for (int i = 0; i < n ; i++)\n System.out.print(output[i] + \" \");\n }",
"private static long sortingTime(double[] array, boolean isStandardSort) {\n long start = 0; // starting time\n if (isStandardSort) { \n start = System.currentTimeMillis(); \n Arrays.sort(array);\n } else {\t\n start = System.currentTimeMillis();\n selectionSort(array);\n }\n return System.currentTimeMillis() - start; // measure time consumed\n }",
"@Test\n\tpublic void testSortSpecialChars() throws SortException {\n\t\tString[] inputArr = new String[] { \"@$#\", \"&*(\", \"^%&\", \"!^&^\" };\n\t\tList<String> arrayList = sortApplication.sortSpecialChars(inputArr);\n\t\tassertEquals(\"!^&^\", arrayList.get(0));\n\t\tassertEquals(\"&*(\", arrayList.get(1));\n\t\tassertEquals(\"@$#\", arrayList.get(2));\n\t\tassertEquals(\"^%&\", arrayList.get(3));\n\t}",
"public String [] sort(String [] array){\n\t\t\n\t\tthis.array = array;\n\t\tint length = array.length;\n\t\tquicksort(0, length-1);\n\t\treturn array;\n\n\t}",
"private static void alphabetize() {\r\n Collections.sort(kwicIndex, String.CASE_INSENSITIVE_ORDER);\r\n }",
"public void stringSelectionSort() {\n int nextMin;\n\n for (int i = 0; i < StringList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < StringList.length; j++) {\n if (StringList[j].compareTo(StringList[nextMin]) < 0)\n nextMin = j;\n }\n if (nextMin != i)\n swapSelectionStrings(StringList, i, nextMin);\n }\n }",
"private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }",
"@Test\n\tpublic void testSortSimpleNumbersSpecialChars() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortSimpleNumbersSpecialChars(inputArr3);\n\t\tassertEquals(\"&23jan\", arrayList.get(0));\n\t\tassertEquals(\"100 pea*s\", arrayList.get(1));\n\t\tassertEquals(\"20 m!n\", arrayList.get(2));\n\t\tassertEquals(\"chief) 24\", arrayList.get(3));\n\t\tassertEquals(\"jer100 *\", arrayList.get(4));\n\t}",
"public static void sort(String[] strArray) {\n Arrays.sort(strArray);\n }",
"@Test\n\tpublic void testSortAll() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortAll(inputArr1);\n\t\tassertEquals(\"#B@n@n0\", arrayList.get(0));\n\t\tassertEquals(\"100 B*anana\", arrayList.get(1));\n\t\tassertEquals(\"20 B*anana\", arrayList.get(2));\n\t\tassertEquals(\"P3@r\", arrayList.get(3));\n\t\tassertEquals(\"p3@R\", arrayList.get(4));\n\t}",
"void countSortG(char[] str) {\n\t\tchar[] output = new char[str.length];\n\n\t\t// Create a count array to store count of inidividul characters and\n\t\t// initialize count array as 0\n\t\tint[] count = new int[RANGEG + 1];\n\t\t;\n\t\tint i = 0;\n\n\t\t// Store count of each character\n\t\tfor (i = 0; i < str.length; ++i)\n\t\t\t++count[str[i]];\n\n\t\t// Change count[i] so that count[i] now contains actual position of\n\t\t// this character in output array\n\t\tfor (i = 1; i <= RANGE; ++i)\n\t\t\tcount[i] += count[i - 1];\n\n\t\t// Build the output character array\n\t\tfor (i = 0; i < str.length; ++i) {\n\t\t\toutput[count[str[i]] - 1] = str[i];\n\t\t\t--count[str[i]];\n\t\t}\n\n\t\t// Copy the output array to str, so that str now\n\t\t// contains sorted characters\n\t\tfor (i = 0; i < str.length; ++i)\n\t\t\tstr[i] = output[i];\n\n\t\tSystem.out.println();\n\t}",
"static String sort(String s){\n char[] content = s.toCharArray();\n Arrays.sort(content);\n return new String(content);\n }",
"public static void main(String[] args){\n\n StopWatch watch1 = new StopWatch();\n int row = 100000;\n int[] array = new int[row];\n for(int i=0; i<row; i++){\n array[i] = RandomNumber(1,1000);\n }\n\n array = SortArray(array);\n\n double time1 = watch1.getElapsedTime();\n System.out.printf(\"%.2f seconds\\n\",time1);\n }",
"public void jsort() {\n\tArrays.sort(data);\n }",
"public String[] bubbleSortString(String[] input){\r\n\t\tString temp=\"\";\r\n\t\tfor(int i=0;i<input.length;i++){\r\n\t\t\tfor(int j=i+1;j<input.length;j++){\r\n\t if(input[i].compareTo(input[j])>0){\r\n\t \t temp=input[i];\r\n\t \t input[i]=input[j];\r\n\t \t input[j]=temp;\r\n\t }\r\n\t\t\t}\r\n\t\t}return input;\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tint a[] = new int[4];//[0,0,0,0]\n\t\ta[0]=14;\n\t\ta[1]=12;\n\t\ta[2]=13;\n\t\ta[3]=11;\n\t\tSystem.out.println(Arrays.toString(a));\n\t\t\n\t\t//How to put elements in ascending order\n\t\tArrays.sort(a);\n\t\tSystem.out.println(Arrays.toString(a));\n\t\t\n\t\t//Type a program to add all elements in the array \"a\"\n\t\tint sum =0;\n\t\tfor(int i =0;i<a.length;i++) {\n\t\t\tsum = sum + a[i];\n\t\t\n\t\t}\n\t\tSystem.out.println(\"Sum : \" + sum);\n\t\t// Create a char array which has 6 elements with second way\n\t\t\n\t\tchar b[] = {'a','d','A','b','c','D'};\n\t\tSystem.out.println(Arrays.toString(b));\n\t\tArrays.sort(b);\n\t\tSystem.out.println(Arrays.toString(b));\n\t\t\n\t\t//Type a program to concatenate the elements in the array \"b\"\n String concat = \"\";\n for(int i = 0;i<b.length;i++) {\n \tconcat = concat + b[i];\n }\n System.out.println(\"Concatenated: \" + concat);//Concatenated: ADabcd\n \n String c[] = {\"Ali\", \"John\", \"ALI\", \"Brad\", \"Mary\", \"Angie\"};//These are stored in heap memory, but inside\n //the array only the references of these elements is stored. When you print the elements,\n //Java take the Strings from the heap memory an then print them on the console.\n //So do not forget that arrays cannot store non-primitive things. But can store only the addresses(references) of them.\n System.out.println(Arrays.toString(c));//[Ali, John, ALI, Brad, Mary, Angie]\n \n Arrays.sort(c);\n System.out.println(Arrays.toString(c));//[ALI, Ali, Angie, Brad, John, Mary]\n \n //Print the elements whose indexes are even on the console.\n for(int i =0;i<c.length;i++) {\n \tif(i%2==0) {\n \t\tSystem.out.print(c[i] + \" \");//ALI Angie John (index 0,2,6)\n \t}}\n //How to check if a specific element exists in the array or not\n \t\t\n //To check if an element exists in an array or not we use \"binarySearch()\"\n //Be Careful!!! ==> Before using \"binarySearch()\" method you HAVE TO use sort()\n //If you use \"binarySearch()\" without using sort(), you will get a result but\n //it will not be meaningful\n \t\t\n int d[] = {3,5,2,12,4,3,6};\n //Check if 12 exists in array \"d\"\n \t\tArrays.sort(d);\n \t\tSystem.out.println(Arrays.toString(d));//[2, 3, 3, 4, 5, 6, 12]\n \t\t//binarySearch() returns NON NEGATIVE values if the element exists.\n \t\t//If the element exists you will get the index of the element from binarySearch() method.\n \t\tSystem.out.println(Arrays.binarySearch(d, 12));//6 (6 is the index of the element which after sorted=>12)\n \t\t\n \t\tSystem.out.println(Arrays.binarySearch(d, 9));//-7 \"-\" means it doesn't exists in the array. 7 means if the number(9) \n \t\t//exists, it would be in the 7th order(not index just number) according to the sorted array.\n \t\t//If the element does not exist, you will get NEGATIVE number. Negative sign displays\n \t\t//non-existance, the number displays the order number IF the element exists\n \t\tSystem.out.println(Arrays.binarySearch(d, 15));//-8\n \t\t//binarySearch() method cannot be used for repeated elements, you can get output but \n \t\t//it is not meaningful.\n \t\tSystem.out.println(Arrays.binarySearch(d, 3));\n \t\t\n \t\t\n \t}",
"public void insertionStringSort()\n {\n\t for(int j=1; j<AL.size(); j++)\n\t {\n\t\t Generics temp = AL.get(j);\n\t\t int possibleIndex = j;\n\t\t \n\t\t while(possibleIndex>0 && AL.get(possibleIndex - 1).toString().compareTo(temp.toString())>0)\n\t\t {\n\t\t\t AL.set(possibleIndex, AL.get(possibleIndex -1));\n\t\t\t possibleIndex--;\n\t\t\t \n\t\t }\n\t\t \n\t\t AL.set(possibleIndex, temp);\n\t }\n \n }",
"@Test\n\tpublic void testSortCapitalNumbersSpecialChars() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortCapitalNumbersSpecialChars(inputArr2);\n\t\tassertEquals(\"&P3AL\", arrayList.get(0));\n\t\tassertEquals(\"100 AP1#E\", arrayList.get(1));\n\t\tassertEquals(\"30 AP1#E\", arrayList.get(2));\n\t\tassertEquals(\"6P3@R\", arrayList.get(3));\n\t\tassertEquals(\"6PE@R\", arrayList.get(4));\n\t\tassertEquals(\"AP1#E\", arrayList.get(5));\n\t\tassertEquals(\"APP1E#\", arrayList.get(6));\n\t}",
"static String sortString(String a){\n char[] charInString = a.toCharArray();\n Arrays.sort(charInString);\n return String.valueOf(charInString);\n }",
"public static void main1(String[] args) {\n\t\t\r\n\t\t\r\n\t\tint A[]= {1,4,3,2,6,7,21};\r\n\t\tchar s[]= {'e','a','c','d'};\r\n\t\t\r\n\t\t Arrays.sort(A);\r\n\t\t Arrays.sort(s);\r\n\r\n\t System.out.printf(\"Sorted array : %s\", Arrays.toString(A)); \r\n\t System.out.println();\r\n\t System.out.printf(\"Sorted array : %s\", Arrays.toString(s)); \r\n\r\n\t \r\n\t \r\n\t\t \r\n\t\t\r\n\t\t\r\n\r\n\t}",
"@Test\n\tpublic void testSortSimpleSpecialChars() throws SortException {\n\t\tString[] inputArr = new String[] { \"*oranges\", \"a^pples\", \"a!pples\", \"feb*\", \"feb%\" };\n\t\tList<String> arrayList = sortApplication.sortSimpleSpecialChars(inputArr);\n\t\tassertEquals(\"*oranges\", arrayList.get(0));\n\t\tassertEquals(\"a!pples\", arrayList.get(1));\n\t\tassertEquals(\"a^pples\", arrayList.get(2));\n\t\tassertEquals(\"feb%\", arrayList.get(3));\n\t\tassertEquals(\"feb*\", arrayList.get(4));\n\n\t}",
"private static void sort(int[] arr, String[] arr2) {\n\t\tfor(int j = 1; j<arr.length;j++)\r\n\t\t{\r\n\t\t\tint key = arr[j];\r\n\t\t\tString key2 = arr2[j];\r\n\t\t\tint i = j-1;\r\n\t\t\twhile((i>-1) && (arr[i] > key))\r\n\t\t\t{\r\n\t\t\t\tarr[i+1] = arr[i];\r\n\t\t\t\tarr2[i+1] = arr2[i];\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t\tarr[i+1] = key;\r\n\t\t\tarr2[i+1] = key2;\r\n\t\t}\r\n\t}",
"static boolean stringArraySorted(String[] sarray) {\n\t\tfor (int i = 0; i + 1 < sarray.length; i++) {\n\t\t\tif (sarray[i].compareTo(sarray[i + 1]) > 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public static void main(String arg[])\n {\n\tScanner sc=new Scanner(System.in);\n\tSystem.out.println(\"How many no you are goinig to enter?\");\n\tint value =sc.nextInt();\n\tString arr[]= new String[value];\n for(int k=0;k<value;k++)\n\t{\n \tarr[k]=sc.next();\n }\n int len=arr.length;\n\n //par2:sort compare\n \tfor(int i=0; i<len;i++)\n\t{\n \tfor(int k=0;k<len-1;k++)\n\t {\t \n\t if(arr[k].compareTo(arr[k+1]) > 0)\n\t {\n\n \t\tString temp=arr[k];\n \t\tarr[k]=arr[k+1];\n \t\tarr[k+1]=temp;\n }\n\t }\n }\n\n//print\n\t for(int l=0;l<len;l++)\n\t {\n\t System.out.println(\" after sort \"+arr[l]+\"\\n\");\n\t }\n\t}",
"@Test\n\tpublic void testSortCapitalNumbersSpecialCharsWithNumFlag() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortCapitalNumbersSpecialCharsWithNumFlagOn(inputArr2);\n\t\tassertEquals(\"&P3AL\", arrayList.get(0));\n\t\tassertEquals(\"6P3@R\", arrayList.get(1));\n\t\tassertEquals(\"6PE@R\", arrayList.get(2));\n\t\tassertEquals(\"30 AP1#E\", arrayList.get(3));\n\t\tassertEquals(\"100 AP1#E\", arrayList.get(4));\n\t\tassertEquals(\"AP1#E\", arrayList.get(5));\n\t\tassertEquals(\"APP1E#\", arrayList.get(6));\n\n\t}",
"private static String sortChar(String s) {\n\t\tchar ch[] = new char[s.length()];\r\n\t\tch = s.toCharArray();\r\n\t\tArrays.sort(ch);\r\n\t\treturn new String(ch);\r\n\t}",
"public void radixSorting() {\n\t\t\n\t}",
"public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }",
"public void sortStringArray() {\n\t\tSystem.out.println(\"PROPERY BELONGS TO ONLY CHILD CLASS!!\");\n\t}",
"public static void projectInventory() {\n\n String ProductBrandunsorted = \"dca\";\n\n char[] ProductBrandsorted = ProductBrandunsorted.toCharArray();\n\n Arrays.sort(ProductBrandsorted);\n System.out.println(ProductBrandsorted);\n\n\n String[] proBrandsSorted = {\"bi\", \"apple\", \"free\"};\n\n\n Arrays.sort(proBrandsSorted);\n //loop\n for (String name : proBrandsSorted) {\n System.out.println(name);\n\n }\n }",
"public static void main(String[] args) {\n int sampleArray[] = arrayInitializer(15000);\n SortArray testArray = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray.toString());\n\n // Sort the array with Bubbles method\n long startTime = System.currentTimeMillis();\n testArray.sortArray();\n long stopTime = System.currentTimeMillis();\n System.out.println(\"Sorted by Bubbles method array is:\");\n //System.out.println(testArray.toString());\n showTime(\"Bubbles sorting took: \", startTime, stopTime);\n\n // Sort the array with Binary Tree method\n SortArray testArray2 = new SortArray(sampleArray);\n System.out.println(\"Initial array is:\");\n //System.out.println(testArray2.toString());\n\n System.out.println(\"Sorted by Binary tree method array is:\");\n startTime = System.currentTimeMillis();\n testArray2.sortArrayBinaryTree();\n stopTime = System.currentTimeMillis();\n //System.out.println(testArray2.toString());\n showTime(\"Tree sorting took: \", startTime, stopTime);\n System.out.println(\"Job is done!\");\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 static void basicTime(){\t\n\t\tint[] array;\n\t\t//Basic sort timings\n\t\tSystem.out.printf(\"%12s%10s%10s%10s%10s%10s%n\", \"Size\", \"Bubble\", \"Insertion\", \"Selection\", \"Quick\", \"Merge\");\n\t\t//1K\n\t\tarray = generateArray(1000, 0, 1000);\n\t\tallSorts(array);\n\t\t//5K\n\t\tarray = generateArray(5000, 0, 5000);\n\t\tallSorts(array);\n\t\t//10K\n\t\tarray = generateArray(10000, 0, 10000);\n\t\tallSorts(array);\n\t\t//50K\n\t\tarray = generateArray(50000, 0, 50000);\n\t\tallSorts(array);\n\t\t//100K\n\t\tSystem.out.printf(\"%12d%10s\",100000,\"N/A\");\n\t\tarray = generateArray(100000, 0, 100000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//500K\n\t\tSystem.out.printf(\"%12d%10s\",500000,\"N/A\");\n\t\tarray = generateArray(500000, 0, 500000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//1M\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",1000000,\"N/A\", \"N/A\", \"N/A\");\n\t\tarray = generateArray(1000000, 0, 1000000);\n\t\t//Performs quick sort\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\t\n\t\t\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t\t//5M\n\t\tarray = generateArray(5000000, 0, 5000000);\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",5000000,\"N/A\", \"N/A\", \"N/A\");\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t}",
"private static String testSorts(int[] arr) {\n\t\tint[] initial = arr.clone();\n\t\tdouble start;\n\t\tdouble[] heapTime = new double[10];\n\t\tdouble[] quickTime = new double[10];\n\t\tdouble[] mergeTime = new double[10];\n\t\t\n\t\tfor (int i=0; i < 10; i++){ //runs 10 times\n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t Sorting.heapSort(arr);\n\t heapTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.quickSort(arr); \n\t quickTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.mergeSort(arr); \n\t mergeTime[i] = System.nanoTime()-start;\n\t\t}\n\t\t\n\t double heapMean= meanVal(heapTime) ;\n\t double quickMean= meanVal(quickTime);\n\t double mergeMean= meanVal(mergeTime);\n\t \n\t String result = \"Means | HeapSort: \" +heapMean + \" QuickSort: \" + quickMean + \" MergeSort: \" + mergeMean + \"\\n\" + \n\t \"Variance| HeapSort: \"+ varianceVal(heapTime, heapMean)+ \" QuickSort: \" + varianceVal(quickTime, quickMean)+\n\t \" MergeSort: \" +varianceVal(mergeTime, mergeMean);\n\t \n\t return result;\n\t\t\n\t}",
"private static void sortHelperMSD(String[] asciis, int start, int end, int index) {\n // Optional MSD helper method for optional MSD radix sort\n return;\n }",
"public static void sort(String[] a) {\n StdRandom.shuffle(a);\n sort(a, 0, a.length-1, 0);\n assert isSorted(a);\n }",
"private static void sortingMemo() {\n\t\t\n\t}",
"public String[] insertionSortString(String[] input){\r\n\t\tString temp=\"\";\r\n\t\tfor(int i=1;i<input.length;i++){\r\n\t\t\tfor(int j=i;j>0;j--){\r\n\t if(input[j-1].compareTo(input[j])>0){\r\n\t \t temp=input[j-1];\r\n\t \t input[j-1]=input[j];\r\n\t \t input[j]=temp;\r\n\t }\r\n\t\t\t}\r\n\t\t}return input;\r\n\t}",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}",
"@Test\n\tpublic void testSortSimpleNumbersSpecialCharsWithNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortSimpleNumbersSpecialCharsWithNumFlagOn(inputArr3);\n\t\tassertEquals(\"&23jan\", arrayList.get(0));\n\t\tassertEquals(\"20 m!n\", arrayList.get(1));\n\t\tassertEquals(\"100 pea*s\", arrayList.get(2));\n\t\tassertEquals(\"chief) 24\", arrayList.get(3));\n\t\tassertEquals(\"jer100 *\", arrayList.get(4));\n\t}",
"public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}",
"private String[] sortStringArray(String[] lines, Comparator<String> comparator) {\n Arrays.sort(lines, comparator);\n return lines;\n }",
"private static List<String> sort(String a)\n {\n String temp;\n List<String> list = new ArrayList<String>();\n for(int t = 0; t < a.length(); t++)\n {\n list.add(\"\"+a.charAt(t));\n }\n for(int i = 1; i < list.size(); i++)\n {\n for(int j = i ; j > 0; j--)\n {\n if(list.get(j).charAt(0) < list.get(j-1).charAt(0))\n {\n temp = list.get(j);\n list.set(j,list.get(j-1));\n list.set(j-1,temp);\n }\n \n }\n }\n return list;\n }",
"@Test\r\n public void testSort() {\r\n System.out.println(\"sort\");\r\n int[] array = {6, 3, 7, 9, 4, 1, 3, 7, 0};\r\n int[] expResult = {0, 1, 3, 3, 4, 6, 7, 7, 9};\r\n\r\n int[] result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n \r\n array = new int[10000];\r\n for (int i = 0; i < array.length; i++) {\r\n array[i] = new Random().nextInt(Integer.MAX_VALUE);\r\n }\r\n expResult = Arrays.copyOf(array, array.length);\r\n Arrays.sort(expResult);\r\n \r\n result = new InsertionSort().sort(array);\r\n\r\n assertArrayEquals(expResult, result);\r\n }",
"public static ArrayList<String> lineLengthSort(ArrayList<String> inArray)\n\t{\n\t\tboolean hasSwapped = true;\n\t\twhile (hasSwapped)\n\t\t{\n\t\t\thasSwapped = false;\n\t\t\tfor(int i = 1; i < inArray.size(); i++)\n\t\t\t{\n\t\t\t\tif(inArray.get(i - 1).length() > inArray.get(i).length())\n\t\t\t\t{\n\t\t\t\t\tString temp = inArray.get(i - 1);\n\t\t\t\t\tinArray.set(i - 1, inArray.get(i));\n\t\t\t\t\tinArray.set(i, temp);\n\t\t\t\t\thasSwapped = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn inArray;\n\t}",
"@Test\n\tpublic void testSortSimpleCapitalSpecialChars() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortSimpleCapitalSpecialChars(inputArr4);\n\t\tassertEquals(\"!Pear\", arrayList.get(0));\n\t\tassertEquals(\"!peAR\", arrayList.get(1));\n\t\tassertEquals(\"!peAr\", arrayList.get(2));\n\t\tassertEquals(\"APpl^\", arrayList.get(3));\n\t\tassertEquals(\"Appl^\", arrayList.get(4));\n\t}",
"@Test\n\tpublic void testSortNumbersSpecialChars() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortNumbersSpecialChars(inputArr5);\n\t\tassertEquals(\"#%356\", arrayList.get(0));\n\t\tassertEquals(\"1 &(*\", arrayList.get(1));\n\t\tassertEquals(\"100 @\", arrayList.get(2));\n\t\tassertEquals(\"22#%!\", arrayList.get(3));\n\t\tassertEquals(\"33 *&@\", arrayList.get(4));\n\t}",
"public void sortGivenArray_name(){\n movieList = quickSort(movieList);\n }",
"@Test\n\tpublic void testSortStringsSimple() throws SortException {\n\t\tString[] inputArr = new String[] { \"nicholas\", \"jerry\", \"zackary\", \"arthur\", \"benny\" };\n\t\tList<String> arrayList = sortApplication.sortStringsSimple(inputArr);\n\t\tassertEquals(\"arthur\", arrayList.get(0));\n\t\tassertEquals(\"benny\", arrayList.get(1));\n\t\tassertEquals(\"jerry\", arrayList.get(2));\n\t\tassertEquals(\"nicholas\", arrayList.get(3));\n\t\tassertEquals(\"zackary\", arrayList.get(4));\n\t}",
"private void timedSort(SortingAlgorithm algo) throws Exception {\n algo.insertArray(intSelect.getArray());\n long start = System.nanoTime();\n algo.sort();\n long elapsedTime = System.nanoTime() - start;\n\n System.out.print(\"\\n\" + algo + \":\" + elapsedTime / 1000000.0 + \"ms\");\n if (showArray) {\n System.out.println(\" \" + Arrays.toString(algo.getSortTarget()));\n }\n System.out.println();\n }",
"public void sort(Contestant[] arr){\n\t\t/* code goes here */\n\t\t\n\t\t//WHAT IS DIFFERENCE BETWEEN THIS AND sortAllRows???\n\t\t\n\t}",
"private void testCountingSort() {\n int listSize = 1000000;\r\n // Generate list of random values\r\n int[] a = new int[listSize];\r\n Random r = new Random();\r\n for (int i = 0; i < a.length; i++) {\r\n a[i] = r.nextInt(20000);\r\n }\r\n \r\n //a = new int[] {10, 20, 8, -4, -7, 22 };\r\n\r\n // Copy list to new array\r\n int[] a2 = new int[listSize];\r\n System.arraycopy(a, 0, a2, 0, a.length);\r\n\r\n TestUtil.print(a);\r\n // Sort the two arrays\r\n long time = System.currentTimeMillis();\r\n countSort(a);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Count sort took: \" + time);\r\n TestUtil.print(a);\r\n time = System.currentTimeMillis();\r\n Arrays.sort(a2);\r\n time = System.currentTimeMillis() - time;\r\n System.out.println(\"Java sort took: \" + time);\r\n\r\n // Compare the two arrays\r\n for (int i = 0; i < listSize; i++) {\r\n if (a[i] != a2[i]) {\r\n System.out.println(\"Error: Results do not match.\");\r\n return;\r\n }\r\n }\r\n System.out.println(\"Sort successful\");\t\t\r\n\t}",
"public String[] insertionSort(String[] in) {\n\t\tString[] out = new String[in.length]; // create a copy so I can reuse the array, not sure that's necessary with the junit test but I'll keep it\n\t\tSystem.arraycopy(in, 0, out, 0, in.length);\n\t\t\n\t\tfor (int i = 1; i < out.length; i += 1){\n\t\t\tString temp = out[i];\n\t\t\tint j = i;\n\t\t\t\n\t\t\t//swap strings like the int insertionSort\n\t\t\twhile(j > 0 && out[j - 1].compareTo(temp) > 0) {\n\t\t\t\tout[j] = out[j - 1];\n\t\t\t\tj = j - 1;\n\t\t\t}\n\t\t\tout[j] = temp;\n\t\t}\n\t\treturn out;\n\t}",
"public static void apply_alg(String name)\n {\n String[] a = {\"hello\", \"how\" , \"are\" , \"you\"};\n Double [] d = {2.13,37.3,45.01,21.3,3.0,1.223,21.213,42.112,5.2};\n Character[] word = { 'S', 'H', 'E', 'L', 'L', 'S', 'O', 'R', 'T', 'E', 'X', 'A', 'M', 'P', 'L', 'E'};\n Date [] col = new Date[6];\n\n //insertion counter\n int c = 0;\n\n //initialize years in descending order\n for (int i = 5; i >= 0; i--)\n {\n //construct date object\n Date whenever = new Date (1,1, Integer.parseInt(\"201\" + i));\n\n //add date to array\n col[c] = whenever;\n\n //increment insertion counter\n c++;\n }\n\n System.out.println(\"Sorting an array using \" + name + \" sort!\\n\");\n\n switch (name)\n {\n case \"selection\":\n\n System.out.println(\"Sorting an array of strings!\");\n sorting.selection_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.selection_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.selection_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"insertion\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n break;\n\n case \"shell\":\n System.out.println(\"Sorting an array of strings!\");\n sorting.insertion_sort(a);\n assert sorting.isSorted(a);\n sorting.print_array(a);\n System.out.println();\n\n System.out.println(\"Sorting an array of doubles!\");\n sorting.insertion_sort(d);\n assert sorting.isSorted(d);\n sorting.print_array(d);\n System.out.println();\n\n System.out.println(\"Sorting an array of Dates!\");\n sorting.insertion_sort(col);\n assert sorting.isSorted(col);\n sorting.print_array(col);\n\n System.out.println(\"\\nSorting array of Characters!\");\n sorting.shell_sort(word);\n assert sorting.isSorted(word);\n sorting.print_array(word);\n\n break;\n\n\n default:\n\n System.out.println(\"No valid algorithm inputted!\");\n\n break;\n\n\n\n\n }\n\n\n }",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] o1, String[] o2) {\n\t\t\t\t\t\treturn o1[0].compareTo(o2[0]);\r\n\t\t\t\t\t}",
"@Test\n public void case2SortSingleElement(){\n //Checking for a single element\n SortDemoData data1 ;\n data1 = new SortDemoData();\n\n data1.initializeArray(\"1\");\n String[] output1 = data1.runAlgo(algoUnderTest).toString().split(\"\\\\s\");\n assertTrue(map.get(algoUnderTest),Integer.parseInt(output1[5]) == data1.myArray[0].key);\n\n\n }",
"public static <T> long Sort( T[] array )\n\t{\n\t\tlong start = System.currentTimeMillis();\n\t\tmergeSort( array, 0, array.length - 1, null );\n\t\tlong end = System.currentTimeMillis();\n\t\treturn ( end - start );\n\t}",
"static void sort(int[] a)\n {\n for ( int j = 1; j<a.length; j++)\n {\n int i = j - 1;\n while(i>=0 && a[i]>a[i+1])\n {\n int temp = a[i];\n a[i] = a[i+1];\n a[i+1] = temp;\n i--;\n }\n }\n }",
"@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }",
"private static String sortString(String str) {\n char[] charArray = str.toCharArray();\n java.util.Arrays.sort(charArray);\n return new String(charArray);\n }",
"boolean isUniqueUsingSorting(String str) {\n\t\tchar[] array = str.toCharArray();\n\t\t// Sorting the char array take NlogN time\n\t\tArrays.sort(array);\n\t\tfor (int i = 0; i < array.length - 1; i++) {\n\t\t\t// If adjacent characters are equal, return false\n\t\t\tif (array[i] == array[i + 1]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void timSort(int[] nums) {\n\t\t\t\n\t}",
"protected void sortCode() {\n for (int i = 1; i < codeCount; i++) {\n int who = i;\n for (int j = i + 1; j < codeCount; j++) {\n if (code[j].getFileName().compareTo(code[who].getFileName()) < 0) {\n who = j; // this guy is earlier in the alphabet\n }\n }\n if (who != i) { // swap with someone if changes made\n SketchCode temp = code[who];\n code[who] = code[i];\n code[i] = temp;\n }\n }\n }",
"private Character[] characterResultsToArray(GenericList<Character> results, Comparator<Character> c) {\n Character[] resultArray = new Character[results.size()];\n int i = 0;\n for(Character characterResult : results) {\n resultArray[i] = characterResult;\n i++;\n }\n MergeSort.sort(resultArray, c);\n return resultArray;\n }",
"public static void main(String[] args) \n\t{\n\t \n\t\tlong startTimer = System.currentTimeMillis();\n\t\t//mrethod 1\n\t\tint res=Utility.binarySearchWord();\n\t\tif(res==-1)\n\t\t\tSystem.out.println(\"your word not found\");\n\t\t else\n\t\t System.out.println(\"your word found at index:\"+res);\n\t\tlong first=System.currentTimeMillis();\n\t\tSystem.out.println((first-startTimer)/1000+\"seconds\");\n\t \n\t\t//method 2\n\t\tint res1=Utility.binarySearchForInteger();\n\t\tif(res1==-1)\n\t\t\tSystem.out.println(\"your no. not found\");\n\t\t else\n\t\t System.out.println(\"your no.found at index:\"+res1);\n\t\tlong second=System.currentTimeMillis();\n\t\tSystem.out.println((second-first)/1000+\"seconds\");\n\t\t\n\t\t//method 3\n\t\tint res3[]=Utility.bubbleSortForIntegers();\n\t\tfor(int i=0;i<res3.length;i++)\n\t\t\tSystem.out.println(res3[i]);\n\t\tlong third=System.currentTimeMillis();\n\t\tSystem.out.println((third-second)/1000+\"seconds\");\n\t\t\n\t\t//method 4\n\t\tString res4[]=Utility.bubbleSortForStrings();\n\t\tfor(int i=0;i<res4.length;i++)\n\t\t\tSystem.out.println(res4[i]);\n\t\tlong fourth=System.currentTimeMillis();\n\t\tSystem.out.println((fourth-third)/1000+\"seconds\");\n\t\t\n\t\t//method 5\n\t\tint res5[]=Utility.insertionSortForInteger();\n\t\tfor(int i=0;i<res5.length;i++)\n\t\t\tSystem.out.println(res5[i]);\n\t\tlong fifth=System.currentTimeMillis();\n\t\tSystem.out.println((fifth-fourth)/1000+\"seconds\");\n\t\t\n\t\t//method 6\n\t\tString res6[]=Utility.insertionSortForString();\n\t\tfor(int i=0;i<res6.length;i++)\n\t\t\tSystem.out.println(res6[i]);\n\t\tlong sixth=System.currentTimeMillis();\n\t\tSystem.out.println((sixth-fifth)/1000+\"seconds\");\n\t}",
"public static void main(String[] args) throws IOException{\n final int ELEMENT_SIZE = 1000;\n \n // How large (how many elements) the arrays will be\n int dataSize = 0;\n // How many times the program will run\n int trials = 1;\n // User-inputted number that dictates what sort the program will use\n int sortSelector = 0;\n // Variables for running time caculations\n long startTime = 0;\n long endTime = 0;\n long duration = 0;\n // The longest time a sort ran, in seconds\n double maxTime = 0;\n // The fastest time a sort ran, in seconds\n double minTime = Double.MAX_VALUE;\n // The average time a sort ran, running \"trials\" times\n double average = 0;\n // A duration a sort ran, in seconds\n double durationSeconds = 0;\n\n Scanner reader = new Scanner(System.in);\n \n System.out.println(\"Please enter a size for the test array: \");\n dataSize = reader.nextInt();\n \n System.out.println(\"Please enter the amount of times you would like the sort to run: \");\n trials = reader.nextInt();\n // Slection menu for which sort to run\n System.out.println(\"Please designate the sorting algorithim you would like the program to use: \");\n System.out.println(\"Enter \\\"1\\\" for BubbleSort \");\n System.out.println(\"Enter \\\"2\\\" for SelectionSort \");\n System.out.println(\"Enter \\\"3\\\" for InsertionSort \");\n System.out.println(\"Enter \\\"4\\\" for QuickSort \");\n System.out.println(\"Enter \\\"5\\\" for MergeSort \");\n sortSelector = reader.nextInt();\n // Print sorting results header and begin running sort(s)\n System.out.println();\n System.out.println(\"Trial Running times (in seconds): \");\n \n int[] original = new int[dataSize];\n int[] sortingArray = new int[dataSize];\n \n // This loop controls the amount of times a sorting algorithim will run\n for(int i = 1; i <= trials; i++){\n // Start by generating test array\n for(int j = 0; j < dataSize; j++){\n original[j] = (int)((Math.random() * ELEMENT_SIZE) + 1);\n }\n // Copy the original to a working array\n for(int j = 0; j < dataSize; j++){\n sortingArray[j] = original[j];\n }\n // Start the \"timer\"\n startTime = System.nanoTime();\n // Run whatever sort the user selected, BubbleSort is default\n switch(sortSelector){\n case 1:\n BubbleSort.runSort(sortingArray);\n break;\n case 2:\n SelectionSort.runSort(sortingArray);\n break;\n case 3:\n InsertionSort.runSort(sortingArray);\n break;\n case 4:\n QuickSort.runSort(sortingArray);\n break;\n case 5:\n MergeSort.runSort(sortingArray);\n break;\n default:\n BubbleSort.runSort(sortingArray);\n break;\n }\n // End the \"timer\"\n endTime = System.nanoTime();\n // Generate the program's running duration\n duration = endTime - startTime;\n // Convert running time to seconds\n durationSeconds = ((double)duration / 1000000000.0);\n // Print the duration (to file)\n System.out.println(durationSeconds);\n // Update min/max running times\n if(durationSeconds < minTime){\n minTime = durationSeconds;\n }\n if(durationSeconds > maxTime){\n maxTime = durationSeconds;\n }\n // Add latest trial to running average\n average += durationSeconds;\n }\n // After trials conclude, the average running time has to be calculated\n average /= ((double)trials);\n \n System.out.println(\"\\nAfter running your selected sort \" + trials + \" times: \");\n System.out.println(\"The slowest sort took \" + maxTime + \" seconds, \");\n System.out.println(\"the fastest sort took \" + minTime + \" seconds, \");\n System.out.println(\"and the average running time was \" + average + \" seconds. \");\n \n // Left this in for testing the sorting algorithims themselves\n /*\n System.out.println();\n for(int element : original){\n System.out.println(element);\n }\n System.out.println();\n for(int element : sortingArray){\n System.out.println(element);\n }\n */\n }",
"@Override\n\tpublic String sort(String content) {\n\t\treturn null;\n\t}",
"void sort() {\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\t\t\t\tif (array[j - 1] > array[j]) { // if the first term is larger\n\t\t\t\t\t\t\t\t\t\t\t\t// than the last term, then the\n\t\t\t\t\t\t\t\t\t\t\t\t// temp holds the previous term\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];// swaps places within the array\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}",
"@Test\n\tpublic void testSortNumbersSpecialCharsWithNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortNumbersSpecialCharsWithNumFlagOn(inputArr5);\n\t\tassertEquals(\"#%356\", arrayList.get(0));\n\t\tassertEquals(\"1 &(*\", arrayList.get(1));\n\t\tassertEquals(\"22#%!\", arrayList.get(2));\n\t\tassertEquals(\"33 *&@\", arrayList.get(3));\n\t\tassertEquals(\"50 @\", arrayList.get(4));\n\t\tassertEquals(\"68!\", arrayList.get(5));\n\t}",
"@Test\n\tpublic void testSortAllNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortAllWithNumFlagOn(inputArr1);\n\t\tassertEquals(\"#B@n@n0\", arrayList.get(0));\n\t\tassertEquals(\"20 B*anana\", arrayList.get(1));\n\t\tassertEquals(\"100 B*anana\", arrayList.get(2));\n\t\tassertEquals(\"P3@r\", arrayList.get(3));\n\t\tassertEquals(\"p3@R\", arrayList.get(4));\n\t}",
"public static void sort(Comparable[] a) {\n for (int i = 0 ; i < a.length ; i++) { // each position scan\n int min = i;\n for (int j = i+1; j < a.length; j++) { // each time we have to scan through remaining entry\n if (HelperFunctions.less(a[j], a[min])) {\n min = j ;\n }\n HelperFunctions.exch(a, i, min);\n }\n }\n }",
"private static void allSorts(int[] array) {\n\t\tSystem.out.printf(\"%12d\",array.length);\n\t\tint[] temp;\n\t\tStopWatch1 timer;\n\t\t\n\t\t//Performs bubble sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.bubbleSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t}",
"private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}",
"public static void main(String...args){\nbyte[] byte_arr = new byte[]{69,66,65,68,67,70};\r\nchar[] char_arr = new char[]{'D','F','C','A','E','B'};\r\ndouble[] double_arr = new double[6];\r\nfloat [] float_arr = new float[]{25F,21F,27F,19F,59F,3F};\r\nint[] int_arr = new int[]{16,7,28,9,13,10};\r\nlong [] long_arr = new long[]{25L,16L,37L,8L,9L,20L};\r\nshort[] short_arr = new short[]{15,66,37,68,69,70};\r\nString[] str_arr = new String[]{\"One\",\"Two\",\"Three\",\"Four\",\"Five\"};//will be used for Objects\r\n//Will use the the car array to work with comparators\r\nCar[] car_arr = new Car[]{new Car(\"Toyota Rav4\",12300),new Car(\"Nissan Almera\",65000),new Car(\"Honda Civic\",132000)};\r\n\r\n\r\n// use of the static sort() method// it returns void\r\nSystem.out.println(\"SORTING AN ARRAY\");\r\nArrays.sort(byte_arr);\r\nSystem.out.print(\"byte_arr sorted: \");\r\nfor(byte b:byte_arr){ System.out.print(b+\" \");}\r\n\r\nSystem.out.println();\r\n\r\nArrays.sort(float_arr);\r\nSystem.out.print(\"float_arr sorted: \");\r\nfor(float f:float_arr){ System.out.print(f+\" \");}\r\n\r\nSystem.out.println();\r\n\r\nArrays.sort(str_arr);\r\nSystem.out.print(\"str_arr sorted: \");\r\nfor(String s:str_arr){ System.out.print(s+\" \");}\r\n\r\nSystem.out.println();\r\n\r\n//Because Car is an Object and does not implement Comparable interface, it's sorted using a comparator\r\n//Our comparator compares based on the millage in descending order\r\nArrays.sort(car_arr,new Car_Comparator());\r\nSystem.out.print(\"car_arr sorted: \");\r\nfor(Car c:car_arr){ System.out.print(c+\" \");}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nSEARCHING FOR AN ELEMENT IN AN ARRAY WITH binarySearch()\");\r\n\r\n//The binarySearch() search for an element and returns the index\r\n//It is useful when when the array is sorted\r\nSystem.out.println(\"Index of 37L for long_arr unsorted: \"+Arrays.binarySearch(long_arr,37L));\r\nArrays.sort(long_arr);\r\nSystem.out.println(\"Index of 37L for long_arr sorted: \"+Arrays.binarySearch(long_arr,37L));\r\n\r\nSystem.out.println(\"\\nCOPYING AN ARRAY TO ANOTHER\");\r\nshort[] short_arr_copy1 = Arrays.copyOf(short_arr, 6);\r\nSystem.out.print(\"copy of short_arr for length=6: \");\r\nfor(short sh:short_arr_copy1){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\nSystem.out.println(\"\\nIf lenght<short_arr, short_arr is partially copied from the beginning: \");\r\nshort[] short_arr_copy2 = Arrays.copyOf(short_arr, 3);\r\nSystem.out.print(\"copy of short_arr for length=3: \");\r\nfor(short sh:short_arr_copy2){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nIf lenght>short_arr, the copy is populated with zeros: \");\r\nshort[] short_arr_copy3 = Arrays.copyOf(short_arr, 8);\r\nSystem.out.print(\"copy of short_arr for length=8: \");\r\nfor(short sh:short_arr_copy3){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n \r\nSystem.out.println();\r\nSystem.out.println(\"\\nCOPYING A RANGE OF AN ARRAY TO ANOTHER\");\r\nint[] int_arr_range_copy = Arrays.copyOfRange(int_arr,2,4);\r\nSystem.out.print(\"initial int_arr: \");\r\nfor(int i:int_arr)System.out.print(i+\" \");\r\nSystem.out.print(\"\\ncopy of int_arr from index 2 to 4: \");\r\nfor(int sh:int_arr_range_copy){\r\n\tSystem.out.print(sh+\" \");\r\n}\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nCOMPARE AN ARRAYS USING equals()\");\r\n//retruns true if both arrays have the same content, otherwise, fasle\r\nSystem.out.println(\"Compare int_arr to its duplicate: \"+Arrays.equals(int_arr, new int[]{16,7,28,9,13,10}));\r\nSystem.out.println(\"Compare int_arr to a different one: \"+Arrays.equals(int_arr, new int[6]));\r\n\r\nSystem.out.println();\r\nSystem.out.println(\"\\nFILL AN ARRAY OR PORTION OF ARRAY USING fill(): \");\r\nSystem.out.print(\"char_arr contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n//fill char_arr with a special value\r\nArrays.fill(char_arr,'T');\r\nSystem.out.print(\"\\nchar_arr now contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n//Fill a portion of char_arr\r\nArrays.fill(char_arr,2, 5, 'E');\r\nSystem.out.print(\"\\nchar_arr now contains: \");\r\nfor(char c : char_arr)System.out.print(c+\" \");\r\n\t\r\n\tSystem.out.println();\r\n\tSystem.out.println(\"\\nUSE OF SPLITERATOR WITH ARRAYS: \");\r\n\t//Populate the double_arr\r\n\tfor(int i=0;i<double_arr.length;i++){\r\n\t\tdouble_arr[i] = i*(-1*2.17)+1;}\r\n\t\r\n\t\r\n\t//print double_arr\r\n\tSystem.out.print(\"\\ndouble_arr now contains: \");\r\n\tfor(double d : double_arr)System.out.print(d+\" \");\r\n\t\t\r\n}",
"public String sortString(String s) {\n List<Character> characters = s.chars().mapToObj(c -> (char) c).collect(Collectors.toList());\n // Sort the input O(logN)\n Collections.sort(characters);\n StringBuilder result = new StringBuilder();\n\n // Iterator over entire input array\n while(!characters.isEmpty()) {\n Set<Character> seenChars = new HashSet();\n // Pick the smallest character from s and append it to the result\n char smallestChar = characters.remove(0);\n result.append(smallestChar);\n seenChars.add(smallestChar);\n\n Iterator<Character> sortedIterator = characters.iterator();\n while (sortedIterator.hasNext()) {\n char c = sortedIterator.next();\n if (!seenChars.contains(c)) {\n result.append(c);\n seenChars.add(c);\n // Remove this character from input\n sortedIterator.remove();\n }\n }\n if (result.length() == s.length()) {\n break;\n }\n\n seenChars = new HashSet();\n char largest = characters.remove(characters.size() - 1);\n result.append(largest);\n seenChars.add(largest);\n\n // Pick the largest character from s and append it to the result\n ListIterator<Character> reverseIterator = characters.listIterator(characters.size());\n while (reverseIterator.hasPrevious()) {\n char c = reverseIterator.previous();\n if (!seenChars.contains(c)) {\n result.append(c);\n seenChars.add(c);\n reverseIterator.remove();\n }\n }\n if (result.length() == s.length()) {\n break;\n }\n }\n\n return result.toString();\n }",
"public void sort() {\n\t\t\tfor (int j = nowLength - 1; j > 1; j--) {\n\t\t\t\tfor (int i = 0; i < j; i++) {\n\t\t\t\t\tif (ray[i] > ray[i+1]) {\n\t\t\t\t\t\tint tmp = ray [i];\n\t\t\t\t\t\tray[i] = ray[i+1];\n\t\t\t\t\t\tray[i+1] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tprint();\n\t\t\t}\n\t}",
"public static <T> long Sort( T[] array, Comparator<? super T> comp )\n\t{\n\t\tlong start = System.currentTimeMillis();\n\t\tmergeSort( array, 0, array.length - 1, comp );\n\t\tlong end = System.currentTimeMillis();\n\t\treturn ( end - start );\n\t}",
"public static void s1AscendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Ascending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n start = System.nanoTime();\n sli.sort1(ai);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }",
"private static void getSortedusinStream(String[]...array) {\n\t\t\n\n\n\t\tList<String> result = new ArrayList<>();\n\n\t\tStream.of(array)\n\t\t\t\t.flatMap(Stream::of)\n\t\t\t\t.map(x -> (String)x)\n\t\t\t\t.sorted()\n\t\t\t\t.forEach(result::add);\n\n\t\tSystem.out.println(Arrays.toString(result.toArray(new String[0])));\n\t\t\n//\t\tList<String> list = new ArrayList<>();\n//\n//\t\tfor (String[] arra : array)\n//\t\t\tCollections.addAll(list, arra);\n//\n//\t\tCollections.sort(list);\n//\t\tSystem.out.println(Arrays.toString( list.toArray(new String[0])));\n\t\t\n\t\t\n\t\t // Function to merge two arrays of \n// // same type \n// return Stream.concat(Arrays.stream(a), \n// Arrays.stream(b)) \n// .toArray();\n\t\t\n\t\t\n//\t\treturn IntStream.concat(Arrays.stream(array1), Arrays.stream(array2))\n// .sorted()\n// .toArray();\n\n\t}",
"public static <T> void parallelSort(char[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}",
"public static void ordenarShellSort( Comparable[ ] datos ) {\n\n\t\t// TODO implementar el algoritmo ShellSort\n\t\tlong startTime = System.currentTimeMillis();\n\t\tint N=datos.length;\n\t\tint j=1;\n\t\twhile(j<N/3) j=3*j+1; \n\t\twhile(j>=1) {\n\t\t\tfor(int i=j; i<N; i++) {\n\t\t\t\tfor(int k=i;k>=j&&less(datos[k],datos[k-j]);k-=j) {\n\t\t\t\t\texchange(datos,k,k-j);\n\t\t\t\t}\n\t\t\t}\n\t\tj=j/3;\n\t\t}\n\t\tlong endTime = System.currentTimeMillis() - startTime;\n\t\tSystem.out.println(endTime+\"\");\n\t}",
"private static void selectionSort(String[] numbers) {\n for (int top = numbers.length-1; top > 0; top-- ) {\n int maxloc = 0;\n for (int i = 1; i <= top; i++) {\n if (numbers[i].compareTo(numbers[maxloc]) > 0)\n maxloc = i;\n }\n String temp = numbers[top];\n numbers[top] = numbers[maxloc];\n numbers[maxloc] = temp;\n }\n }",
"public static void main(String[] args) {\n Integer[] s = {39, 20, 40, 1, 2, 3, 4, 5, 6, 7};\n Stopwatch timer = new Stopwatch();\n\n sort(s);\n\n double time = timer.elapsedTime();\n assert isSorted(s);\n StdOut.print(\"time: \" + time);\n StdOut.println();\n show(s);\n }",
"void increaseSortLetter();",
"private static String fixSorts(String strIn){\r\n\t // get a matcher object\r\n\t matches = ptrnNumbers.matcher(strIn);\r\n\t while (matches.find()){\r\n\t \tstrIn = strIn.substring(0,matches.start())+\" \"+strPrepend+strIn.substring(matches.start()+1);\r\n\t }\r\n\t //System.out.println(\">>>\"+strIn);\r\n\t\treturn strIn;\r\n\t}",
"private static <T> void sort1(char x[], char[] a2, int off, int len) {\n\t\t// Insertion sort on smallest arrays\n\t\tif (len < 7) {\n\t\t\tfor (int i=off; i<len+off; i++)\n\t\t\t\tfor (int j=i; j>off && x[j-1]>x[j]; j--)\n\t\t\t\t\tswap(x,a2, j, j-1);\n\t\t\treturn;\n\t\t}\n\n\t\t// Choose a partition element, v\n\t\tint m = off + (len >> 1); // Small arrays, middle element\n\t\tif (len > 7) {\n\t\t\tint l = off;\n\t\t\tint n = off + len - 1;\n\t\t\tif (len > 40) { // Big arrays, pseudomedian of 9\n\t\t\t\tint s = len/8;\n\t\t\t\tl = med3(x, l, l+s, l+2*s);\n\t\t\t\tm = med3(x, m-s, m, m+s);\n\t\t\t\tn = med3(x, n-2*s, n-s, n);\n\t\t\t}\n\t\t\tm = med3(x, l, m, n); // Mid-size, med of 3\n\t\t}\n\t\tchar v = x[m];\n\n\t\t// Establish Invariant: v* (<v)* (>v)* v*\n\t\tint a = off, b = a, c = off + len - 1, d = c;\n\t\twhile(true) {\n\t\t\twhile (b <= c && x[b] <= v) {\n\t\t\t\tif (x[b] == v)\n\t\t\t\t\tswap(x,a2, a++, b);\n\t\t\t\tb++;\n\t\t\t}\n\t\t\twhile (c >= b && x[c] >= v) {\n\t\t\t\tif (x[c] == v)\n\t\t\t\t\tswap(x,a2, c, d--);\n\t\t\t\tc--;\n\t\t\t}\n\t\t\tif (b > c)\n\t\t\t\tbreak;\n\t\t\tswap(x,a2, b++, c--);\n\t\t}\n\n\t\t// Swap partition elements back to middle\n\t\tint s, n = off + len;\n\t\ts = Math.min(a-off, b-a ); vecswap(x, a2,off, b-s, s);\n\t\ts = Math.min(d-c, n-d-1); vecswap(x, a2,b, n-s, s);\n\n\t\t// Recursively sort non-partition-elements\n\t\tif ((s = b-a) > 1)\n\t\t\tsort1(x,a2, off, s);\n\t\tif ((s = d-c) > 1)\n\t\t\tsort1(x,a2, n-s, s);\n\t}",
"public void sort() {\n\t\tdivider(0, array.size() - 1);\n\t}",
"public static void main(String[] args) {\n\n String[] a={\"anusha\",\"ashmita\",\"manisha\",\"rista\",\"bhumika\",\"riyanshi\"};\n int min;\n String temp=\"\";\n for(int i=0; i< a.length; i++){\n min=i;\n for(int j=i+1; j<a.length; j++){\n if(a[j].compareTo(a[min])<0){\n min=j;\n }\n }\n temp=a[i];\n a[i]=a[min];\n a[min]=temp;\n }\n for(int i=0; i<a.length; i++){\n System.out.print(a[i]+\" \");\n }\n }",
"public void sort() {\n\tqsort(a,0,a.length-1);\n }"
] | [
"0.69534355",
"0.6599986",
"0.6593223",
"0.6491522",
"0.64727545",
"0.64468503",
"0.63859063",
"0.6360277",
"0.6324219",
"0.6305814",
"0.6283169",
"0.62612754",
"0.6256238",
"0.62284285",
"0.61944544",
"0.6162573",
"0.61379457",
"0.61355376",
"0.6134253",
"0.61194587",
"0.6118626",
"0.611842",
"0.61067146",
"0.61062413",
"0.61060536",
"0.61056095",
"0.6103257",
"0.6083717",
"0.6080028",
"0.60785383",
"0.6066201",
"0.60631233",
"0.60614526",
"0.60573375",
"0.60460293",
"0.6043998",
"0.60419446",
"0.6027354",
"0.60261",
"0.6022424",
"0.6020673",
"0.6017509",
"0.6011858",
"0.60089314",
"0.60074294",
"0.6005404",
"0.5999762",
"0.5998987",
"0.5993911",
"0.5992955",
"0.59919405",
"0.5987875",
"0.5982279",
"0.5962534",
"0.5960237",
"0.5957197",
"0.59517765",
"0.5931719",
"0.5930765",
"0.5929795",
"0.5926098",
"0.59019125",
"0.58918184",
"0.58609205",
"0.58563495",
"0.5855851",
"0.5853282",
"0.58495593",
"0.5835889",
"0.5832473",
"0.58265936",
"0.582341",
"0.5822067",
"0.58183277",
"0.58139247",
"0.58137673",
"0.5813194",
"0.5810825",
"0.5810174",
"0.5807575",
"0.579536",
"0.57952785",
"0.57950854",
"0.579485",
"0.5790533",
"0.57740396",
"0.57703066",
"0.5761746",
"0.57592344",
"0.5757924",
"0.57555825",
"0.57424265",
"0.574087",
"0.5740862",
"0.5736962",
"0.57343096",
"0.572573",
"0.5724224",
"0.57141805",
"0.57128626",
"0.57110834"
] | 0.0 | -1 |
Get Base64encoded image data, which cannot exceed 5 MB. The long side cannot exceed 4,000 px for images in .jpg format or 2,000 px for images in other formats. The recommended image aspect ratio is 3:4 (generally, the aspect ratio of images taken by mobile phones). The face must be greater than 100100 px in size. Supported image formats are PNG, JPG, JPEG, and BMP. GIF is currently not supported. | public String getImage() {
return this.Image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBase64EncodedPNG()\n\t{\n\t\tString base64Png = null;\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\ttry\n\t\t{\n\t\t\tif (getBlackWhiteBitmap().compress(Bitmap.CompressFormat.PNG, 100, output))\n\t\t\t{\n\t\t\t\tbyte[] imgData = output.toByteArray();\n\t\t\t\tbase64Png = Base64.encodeToString(imgData, Base64.DEFAULT);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn base64Png;\n\t}",
"public String getImageBase64() {\n return this.imageBase64;\n }",
"public BufferedImage getImage() {\n\t\tString base64ImageString = getData();\n\t\tByteArrayInputStream byteStream = new ByteArrayInputStream(Base64\n\t\t\t\t.decodeBase64(base64ImageString.getBytes()));\n\t\ttry {\n\t\t\treturn ImageIO.read(byteStream);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"static String convertToBase64(byte[] image){\n return !Objects.isNull(image)\n ? Base64.getEncoder().encodeToString(image)\n : \"\";\n }",
"public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"public static String encodeTobase64(Bitmap image){\n if(image != null) {\n Bitmap image2 = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n\n Log.d(\"Image Log:\", imageEncoded);\n return imageEncoded;\n }\n else{\n return \"\";\n }\n }",
"public static String getImage(Drawable drawable,String path) {\n File cheakfile = new File( path );\n String base64String = null;\n\n if(drawable!=null) {\n //\n File file = new File(path);\n Bitmap bitmap=((BitmapDrawable)drawable).getBitmap();\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100 /*ignored for PNG*/, bos);\n byte[] bitmapdata = bos.toByteArray();\n base64String = Base64.encodeToString(bitmapdata, Base64.DEFAULT);\n \n\n //write the bytes in file\n // FileOutputStream fos;\n // try {\n // fos = new FileOutputStream(file);\n // fos.write(bitmapdata);\n // } catch (IOException e) {\n // // TODO Auto-generated catch block\n // e.printStackTrace();\n // }\n // \n }\n\n return base64String;\n }",
"public String getStringImage() {\n if (bitmap != null) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] imageBytes = baos.toByteArray();\n String encodedImage = Base64.encodeToString(imageBytes, Base64.DEFAULT);\n return encodedImage;\n } else {\n return null;\n }\n }",
"public String getImageBase64(String imagePath) {\n\t\tString base64Image = \"\";\n\t\tFile file = new File(imagePath);\n\t\ttry (FileInputStream imageInFile = new FileInputStream(file)) {\n\t\t\t// Reading a Image file from file system\n\t\t\tbyte imageData[] = new byte[(int) file.length()];\n\t\t\timageInFile.read(imageData);\n\t\t\tbase64Image = Base64.getEncoder().encodeToString(imageData);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image not found\" + e);\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"Exception while reading the Image \" + ioe);\n\t\t}\n\t\treturn base64Image;\n\t}",
"public static String getStringBase64Bitmap(Bitmap bitmap){\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n byte[] bitmapBytes = bos.toByteArray();\n String encodedImage = Base64.encodeToString(bitmapBytes, Base64.DEFAULT);\n Log.i(\"getStringBase64Bitmap\",encodedImage);\n return encodedImage;\n }",
"public String getEncodedImage() {\n String base64String = Base64.getEncoder().encodeToString(profilePictureBytes);\n return base64String;\n }",
"byte[] getProfileImage();",
"public static String getBase64FromImage(ImageView imageView) {\n\n\n imageView.buildDrawingCache();\n Bitmap bitmap = imageView.getDrawingCache();\n //Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();\n return getBase64FromBitmap(bitmap);\n }",
"public static String convertImageToBase64(String path) {\n\n Bitmap btmp = BitmapFactory.decodeFile(path);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n btmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] byteArrayImage = baos.toByteArray();\n\n return Base64.encodeToString(byteArrayImage, Base64.DEFAULT);\n }",
"public String emitAsImageBase64(int width,int height) {\n BufferedImage img = emitAsBufferedImage(width,height);\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"String convertImageToBase64String(final BufferedImage img) {\n final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", byteArrayOutputStream);\n return Base64.getEncoder().encodeToString(byteArrayOutputStream.toByteArray());\n } catch (IOException e) {\n logger.error(\"cannot convert image to base 64\", e);\n }\n return null;\n }",
"public static String encodeToBase64(Bitmap image) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n return Base64.encodeToString(b, Base64.DEFAULT);\n }",
"public static String bitmapEncodeTobase64(Bitmap image) {\n Bitmap immage = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n immage.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n return imageEncoded;\n }",
"private BufferedImage imageFromBase64(final String imageString) {\r\n\t\ttry {\r\n\t\t\tfinal boolean useCache=ImageIO.getUseCache();\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.setUseCache(false); /* Wird benötigt, wenn im Stream nicht gesprungen werden kann, was bei einem ByteArrayInputStream nun definitiv möglich ist. */\r\n\t\t\t\treturn ImageIO.read(new ByteArrayInputStream(Base64.getDecoder().decode(imageString)));\r\n\t\t\t} finally {\r\n\t\t\t\tImageIO.setUseCache(useCache);\r\n\t\t\t}\r\n\t\t} catch (IOException | IllegalArgumentException e) {return null;}\r\n\t}",
"public static byte[] decode(String encoded) {\n \n if (encoded == null)\n return null;\n \n char[] base64Data = encoded.toCharArray();\n // remove white spaces\n int len = removeWhiteSpace(base64Data);\n \n if (len%FOURBYTE != 0) {\n return null;//should be divisible by four\n }\n \n int numberQuadruple = (len/FOURBYTE );\n \n if (numberQuadruple == 0)\n return new byte[0];\n \n byte decodedData[] = null;\n byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;\n char d1=0,d2=0,d3=0,d4=0;\n \n int i = 0;\n int encodedIndex = 0;\n int dataIndex = 0;\n decodedData = new byte[ (numberQuadruple)*3];\n \n for (; i<numberQuadruple-1; i++) {\n \n if (!isData( (d1 = base64Data[dataIndex++]) )||\n !isData( (d2 = base64Data[dataIndex++]) )||\n !isData( (d3 = base64Data[dataIndex++]) )||\n !isData( (d4 = base64Data[dataIndex++]) ))\n return null;//if found \"no data\" just return null\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n b3 = base64Alphabet[d3];\n b4 = base64Alphabet[d4];\n \n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n }\n \n if (!isData( (d1 = base64Data[dataIndex++]) ) ||\n !isData( (d2 = base64Data[dataIndex++]) )) {\n return null;//if found \"no data\" just return null\n }\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n \n d3 = base64Data[dataIndex++];\n d4 = base64Data[dataIndex++];\n if (!isData( (d3 ) ) ||\n !isData( (d4 ) )) {//Check if they are PAD characters\n if (isPad( d3 ) && isPad( d4)) { //Two PAD e.g. 3c[Pad][Pad]\n if ((b2 & 0xf) != 0)//last 4 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 1 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;\n return tmp;\n } else if (!isPad( d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]\n b3 = base64Alphabet[ d3 ];\n if ((b3 & 0x3 ) != 0)//last 2 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 2 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex++] = (byte)( b1 <<2 | b2>>4 );\n tmp[encodedIndex] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n return tmp;\n } else {\n return null;//an error like \"3c[Pad]r\", \"3cdX\", \"3cXd\", \"3cXX\" where X is non data\n }\n } else { //No PAD e.g 3cQl\n b3 = base64Alphabet[ d3 ];\n b4 = base64Alphabet[ d4 ];\n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n \n }\n \n return decodedData;\n }",
"public String fromImageToString(BitmapDrawable personPhoto){\n Bitmap photoBitmap = personPhoto.getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n photoBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] photoByteFormat = stream.toByteArray();\n String encodedImage = Base64.encodeToString(photoByteFormat, Base64.NO_WRAP);\n return encodedImage;\n }",
"public String getEncoded64ImageStringFromBitmap(Bitmap bitmap) {\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] byteFormat = stream.toByteArray();\n // get the base 64 string\n //String imgString = Base64.encodeToString(byteFormat, Base64.NO_WRAP);\n String imgString = Base64.encodeToString(byteFormat, Base64.DEFAULT);\n\n return imgString;\n }",
"private byte[] getCover() {\n\t\tbyte[] buffer = new byte[MAX_FB2_SIZE];\n\t\tbyte[] cover64;\n\t\tint amount = 0;\n\t\tint count = 0;\n\t\ttry {\n\t\t\twhile ((amount < MAX_FB2_SIZE) && (count != -1)) {\n\t\t\t\tcount = this.input.read(buffer, amount, MAX_FB2_SIZE - amount);\n\t\t\t\tif (count != -1)\n\t\t\t\t\tamount += count;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t}\n\t\tif (amount == MAX_FB2_SIZE) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tint stop = -1;\n\t\t\tint start = -1;\n\t\t\tint counter = amount - 1;\n\t\t\twhile (counter >= 0) {\n\t\t\t\tif (buffer[counter] == '<')\n\t\t\t\t\tif (buffer[counter + 1] == '/')\n\t\t\t\t\t\tif (buffer[counter + 2] == 'b')\n\t\t\t\t\t\t\tif (buffer[counter + 7] == 'y')\n\t\t\t\t\t\t\t\tif (buffer[counter + 8] == '>') {\n\t\t\t\t\t\t\t\t\tstop = counter - 1;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\twhile (counter >= 0) {\n\t\t\t\tif (buffer[counter] == '<')\n\t\t\t\t\tif (buffer[counter + 1] == 'b')\n\t\t\t\t\t\tif (buffer[counter + 3] == 'n')\n\t\t\t\t\t\t\tif (buffer[counter + 5] == 'r')\n\t\t\t\t\t\t\t\tif (buffer[counter + 6] == 'y') {\n\t\t\t\t\t\t\t\t\tstart = counter;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t\tif ((start == -1) || (stop == -1)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\twhile (counter < stop) {\n\t\t\t\tif (buffer[counter] == '>') {\n\t\t\t\t\tstart = counter + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\tint newSize = stop - start + 1;\n\t\t\tcover64 = new byte[newSize];\n\t\t\tSystem.arraycopy(buffer, start, cover64, 0, newSize);\n\t\t}\n\t\treturn Base64Decoder.decode(cover64);\n\t}",
"public static byte[] getResizedImageData(byte[] image, int width,\n\t\t\tint height, int widthLimit, int heightLimit, int byteLimit) {\n\t\tif (image == null) {\n\t\t\treturn null;\n\t\t}\n\t\t// int width = WIDTH;\n\t\t// int height = HEIGHT;\n\n\t\t// int widthLimit = WIDTH_LIMIT;\n\t\t// int heightLimit = HEIGHT_LIMIT;\n\n\t\t// int byteLimit = byteLimit;\n\n\t\tint outWidth = width;\n\t\tint outHeight = height;\n\n\t\tfloat scaleFactor = 1.F;\n\t\twhile ((outWidth * scaleFactor > widthLimit)\n\t\t\t\t|| (outHeight * scaleFactor > heightLimit)) {\n\t\t\tscaleFactor *= .75F;\n\t\t}\n\n\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t// Log.v(TAG, \"getResizedBitmap: wlimit=\" + widthLimit +\n\t\t// \", hlimit=\" + heightLimit + \", sizeLimit=\" + byteLimit +\n\t\t// \", width=\" + width + \", height=\" + height +\n\t\t// \", initialScaleFactor=\" + scaleFactor +\n\t\t// \", uri=\" + uri);\n\t\t// }\n\n\t\tInputStream input = null;\n\t\ttry {\n\t\t\tByteArrayOutputStream os = null;\n\t\t\tint attempts = 1;\n\t\t\tint sampleSize = 1;\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\t\tint quality = IMAGE_COMPRESSION_QUALITY;\n\t\t\tBitmap b = null;\n\n\t\t\t// In this loop, attempt to decode the stream with the best possible\n\t\t\t// subsampling (we\n\t\t\t// start with 1, which means no subsampling - get the original\n\t\t\t// content) without running\n\t\t\t// out of memory.\n\t\t\tdo {\n\t\t\t\tinput = new ByteArrayInputStream(image);\n\t\t\t\toptions.inSampleSize = sampleSize;\n\t\t\t\ttry {\n\t\t\t\t\tb = BitmapFactory.decodeStream(input, null, options);\n\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\treturn null; // Couldn't decode and it wasn't because of\n\t\t\t\t\t\t\t\t\t\t// an exception,\n\t\t\t\t\t\t\t\t\t\t// bail.\n\t\t\t\t\t}\n\t\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedBitmap: img too large to decode (OutOfMemoryError), \"\n\t\t\t\t\t// +\n\t\t\t\t\t// \"may try with larger sampleSize. Curr sampleSize=\" +\n\t\t\t\t\t// sampleSize);\n\t\t\t\t\tsampleSize *= 2; // works best as a power of two\n\t\t\t\t\tattempts++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} finally {\n\t\t\t\t\tif (input != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\n\t\t\tif (b == null) {\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)\n\t\t\t\t// && attempts >= NUMBER_OF_RESIZE_ATTEMPTS) {\n\t\t\t\t// Log.v(TAG,\n\t\t\t\t// \"getResizedImageData: gave up after too many attempts to resize\");\n\t\t\t\t// }\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tboolean resultTooBig = true;\n\t\t\tattempts = 1; // reset count for second loop\n\t\t\t// In this loop, we attempt to compress/resize the content to fit\n\t\t\t// the given dimension\n\t\t\t// and file-size limits.\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif (options.outWidth > widthLimit\n\t\t\t\t\t\t\t|| options.outHeight > heightLimit\n\t\t\t\t\t\t\t|| (os != null && os.size() > byteLimit)) {\n\t\t\t\t\t\t// The decoder does not support the inSampleSize option.\n\t\t\t\t\t\t// Scale the bitmap using Bitmap library.\n\t\t\t\t\t\tint scaledWidth = (int) (outWidth * scaleFactor);\n\t\t\t\t\t\tint scaledHeight = (int) (outHeight * scaleFactor);\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: retry scaling using \" +\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap: w=\" + scaledWidth +\n\t\t\t\t\t\t// \", h=\" + scaledHeight);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tb = Bitmap.createScaledBitmap(b, scaledWidth,\n\t\t\t\t\t\t\t\tscaledHeight, false);\n\t\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t\t// \"Bitmap.createScaledBitmap returned NULL!\");\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\n\t\t\t\t\t// Compress the image into a JPG. Start with\n\t\t\t\t\t// IMAGE_COMPRESSION_QUALITY.\n\t\t\t\t\t// In case that the image byte size is still too large\n\t\t\t\t\t// reduce the quality in\n\t\t\t\t\t// proportion to the desired byte size.\n\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\tint jpgFileSize = os.size();\n\t\t\t\t\tif (jpgFileSize > byteLimit) {\n\t\t\t\t\t\tquality = (quality * byteLimit) / jpgFileSize; // watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// int\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division!\n\t\t\t\t\t\tif (quality < MINIMUM_IMAGE_COMPRESSION_QUALITY) {\n\t\t\t\t\t\t\tquality = MINIMUM_IMAGE_COMPRESSION_QUALITY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: compress(2) w/ quality=\" +\n\t\t\t\t\t\t// quality);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\t}\n\t\t\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedImageData - image too big (OutOfMemoryError), will try \"\n\t\t\t\t\t// + \" with smaller scale factor, cur scale factor: \" +\n\t\t\t\t\t// scaleFactor);\n\t\t\t\t\t// fall through and keep trying with a smaller scale factor.\n\t\t\t\t}\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t// Log.v(TAG, \"attempt=\" + attempts\n\t\t\t\t// + \" size=\" + (os == null ? 0 : os.size())\n\t\t\t\t// + \" width=\" + outWidth * scaleFactor\n\t\t\t\t// + \" height=\" + outHeight * scaleFactor\n\t\t\t\t// + \" scaleFactor=\" + scaleFactor\n\t\t\t\t// + \" quality=\" + quality);\n\t\t\t\t// }\n\t\t\t\tscaleFactor *= .75F;\n\t\t\t\tattempts++;\n\t\t\t\tresultTooBig = os == null || os.size() > byteLimit;\n\t\t\t} while (resultTooBig && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\t\t\tb.recycle(); // done with the bitmap, release the memory\n\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE) && resultTooBig) {\n\t\t\t// Log.v(TAG,\n\t\t\t// \"getResizedImageData returning NULL because the result is too big: \"\n\t\t\t// +\n\t\t\t// \" requested max: \" + byteLimit + \" actual: \" + os.size());\n\t\t\t// }\n\n\t\t\treturn resultTooBig ? null : os.toByteArray();\n\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}",
"static Image forData(String imageType, byte[] data) {\n\t\treturn () -> String.format(\"data:image/%s;base64,%s\", imageType, Base64.encodeBase64String(data));\n\t}",
"public static String getImageBase64String(BufferedImage image) {\n String result = null;\n try {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n OutputStream b64 = new Base64OutputStream(os);\n ImageIO.write(image, \"png\", b64);\n result = os.toString(\"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n throw new RuntimeException(e.getMessage(), e);\n } catch (IOException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n return result;\n }",
"public static String CreateMD5(File file) {\n String base64Image = \"\";\n try (FileInputStream imageInFile = new FileInputStream(file)) {\n // Reading a Image file from file system\n byte imageData[] = new byte[(int) file.length()];\n imageInFile.read(imageData);\n base64Image = Base64.getEncoder().encodeToString(imageData);\n } catch (FileNotFoundException e) {\n DialogWindow.ShowErrorPane(\"Image could not be found.\", \"Error Image Missing\");\n// System.out.println(\"Image not found\" + e);\n } catch (IOException ioe) {\n DialogWindow.ShowErrorPane(\"Error while the image was being converted.\", \"Error Converting Image\");\n// System.out.println(\"Exception while reading the Image \" + ioe);\n }\n return base64Image;\n }",
"public String convertImage(ImageView itemImage){\n Bitmap bmp = ((BitmapDrawable)itemImage.getDrawable()).getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n String imageFile = Base64.encodeToString(byteArray, Base64.DEFAULT);\n return imageFile;\n }",
"org.apache.xmlbeans.XmlBase64Binary xgetSignatureImage();",
"public static byte[] getResizedImageData(int width, int height,\n\t\t\tint widthLimit, int heightLimit, int byteLimit, Uri uri,\n\t\t\tContext context) {\n\t\tint outWidth = width;\n\t\tint outHeight = height;\n\n\t\tfloat scaleFactor = 1.F;\n\t\twhile ((outWidth * scaleFactor > widthLimit)\n\t\t\t\t|| (outHeight * scaleFactor > heightLimit)) {\n\t\t\tscaleFactor *= .75F;\n\t\t}\n\n\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t// Log.v(TAG, \"getResizedBitmap: wlimit=\" + widthLimit +\n\t\t// \", hlimit=\" + heightLimit + \", sizeLimit=\" + byteLimit +\n\t\t// \", width=\" + width + \", height=\" + height +\n\t\t// \", initialScaleFactor=\" + scaleFactor +\n\t\t// \", uri=\" + uri);\n\t\t// }\n\n\t\tInputStream input = null;\n\t\ttry {\n\t\t\tByteArrayOutputStream os = null;\n\t\t\tint attempts = 1;\n\t\t\tint sampleSize = 1;\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\t\tint quality = IMAGE_COMPRESSION_QUALITY;\n\t\t\tBitmap b = null;\n\n\t\t\t// In this loop, attempt to decode the stream with the best possible\n\t\t\t// subsampling (we\n\t\t\t// start with 1, which means no subsampling - get the original\n\t\t\t// content) without running\n\t\t\t// out of memory.\n\t\t\tdo {\n\t\t\t\tinput = context.getContentResolver().openInputStream(uri);\n\t\t\t\toptions.inSampleSize = sampleSize;\n\t\t\t\ttry {\n\t\t\t\t\tb = BitmapFactory.decodeStream(input, null, options);\n\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\treturn null; // Couldn't decode and it wasn't because of\n\t\t\t\t\t\t\t\t\t\t// an exception,\n\t\t\t\t\t\t\t\t\t\t// bail.\n\t\t\t\t\t}\n\t\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedBitmap: img too large to decode (OutOfMemoryError), \"\n\t\t\t\t\t// +\n\t\t\t\t\t// \"may try with larger sampleSize. Curr sampleSize=\" +\n\t\t\t\t\t// sampleSize);\n\t\t\t\t\tsampleSize *= 2; // works best as a power of two\n\t\t\t\t\tattempts++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} finally {\n\t\t\t\t\tif (input != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\n\t\t\tif (b == null) {\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)\n\t\t\t\t// && attempts >= NUMBER_OF_RESIZE_ATTEMPTS) {\n\t\t\t\t// Log.v(TAG,\n\t\t\t\t// \"getResizedImageData: gave up after too many attempts to resize\");\n\t\t\t\t// }\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tboolean resultTooBig = true;\n\t\t\tattempts = 1; // reset count for second loop\n\t\t\t// In this loop, we attempt to compress/resize the content to fit\n\t\t\t// the given dimension\n\t\t\t// and file-size limits.\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif (options.outWidth > widthLimit\n\t\t\t\t\t\t\t|| options.outHeight > heightLimit\n\t\t\t\t\t\t\t|| (os != null && os.size() > byteLimit)) {\n\t\t\t\t\t\t// The decoder does not support the inSampleSize option.\n\t\t\t\t\t\t// Scale the bitmap using Bitmap library.\n\t\t\t\t\t\tint scaledWidth = (int) (outWidth * scaleFactor);\n\t\t\t\t\t\tint scaledHeight = (int) (outHeight * scaleFactor);\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: retry scaling using \" +\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap: w=\" + scaledWidth +\n\t\t\t\t\t\t// \", h=\" + scaledHeight);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tb = Bitmap.createScaledBitmap(b, scaledWidth,\n\t\t\t\t\t\t\t\tscaledHeight, false);\n\t\t\t\t\t\t// if (b == null) {\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap returned NULL!\");\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t// return null;\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\t// Compress the image into a JPG. Start with\n\t\t\t\t\t// IMAGE_COMPRESSION_QUALITY.\n\t\t\t\t\t// In case that the image byte size is still too large\n\t\t\t\t\t// reduce the quality in\n\t\t\t\t\t// proportion to the desired byte size.\n\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\tint jpgFileSize = os.size();\n\t\t\t\t\tif (jpgFileSize > byteLimit) {\n\t\t\t\t\t\tquality = (quality * byteLimit) / jpgFileSize; // watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// int\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division!\n\t\t\t\t\t\tif (quality < MINIMUM_IMAGE_COMPRESSION_QUALITY) {\n\t\t\t\t\t\t\tquality = MINIMUM_IMAGE_COMPRESSION_QUALITY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: compress(2) w/ quality=\" +\n\t\t\t\t\t\t// quality);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\t}\n\t\t\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedImageData - image too big (OutOfMemoryError), will try \"\n\t\t\t\t\t// + \" with smaller scale factor, cur scale factor: \" +\n\t\t\t\t\t// scaleFactor);\n\t\t\t\t\t// fall through and keep trying with a smaller scale factor.\n\t\t\t\t}\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t// Log.v(TAG, \"attempt=\" + attempts\n\t\t\t\t// + \" size=\" + (os == null ? 0 : os.size())\n\t\t\t\t// + \" width=\" + outWidth * scaleFactor\n\t\t\t\t// + \" height=\" + outHeight * scaleFactor\n\t\t\t\t// + \" scaleFactor=\" + scaleFactor\n\t\t\t\t// + \" quality=\" + quality);\n\t\t\t\t// }\n\t\t\t\tscaleFactor *= .75F;\n\t\t\t\tattempts++;\n\t\t\t\tresultTooBig = os == null || os.size() > byteLimit;\n\t\t\t} while (resultTooBig && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\t\t\tb.recycle(); // done with the bitmap, release the memory\n\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE) && resultTooBig) {\n\t\t\t// Log.v(TAG,\n\t\t\t// \"getResizedImageData returning NULL because the result is too big: \"\n\t\t\t// +\n\t\t\t// \" requested max: \" + byteLimit + \" actual: \" + os.size());\n\t\t\t// }\n\n\t\t\treturn resultTooBig ? null : os.toByteArray();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}",
"private static String descifrarBase64(String arg) {\n Base64.Decoder decoder = Base64.getDecoder();\n byte[] decodedByteArray = decoder.decode(arg);\n\n return new String(decodedByteArray);\n }",
"private byte[] getImage(){\n byte image[] = null;\n try {\n if(isImageGiven()) {\n image = getImageBytes();\n }\n }catch (IOException e){\n Toast.makeText(this,\"Error in Creating the image \"+e, Toast.LENGTH_SHORT).show();\n }\n return image;\n }",
"public static Bitmap decodeBase64(String input) \n\t\t{\n\t\t byte[] decodedByte = Base64.decode(input, 0);\n\t\t return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length); \n\t\t}",
"public static Bitmap getBitmapFromStringBase64(String imageString){\n byte[] imageAsBytes = Base64.decode(imageString, Base64.DEFAULT);\n Bitmap bitmap = BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.length);\n return bitmap;\n }",
"public static void main(String[] args) throws IOException {\n String strImg=\"iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\n\" +\n \"jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGMSURBVFhH7ZUxbsIwFIYZK7F17h06darEzsLQ\\n\" +\n \"E1RsXIAdMXIANrgAAzMT4go5kBs7/sOLY+e9tGksWxk+yXJ+XvI923hWFIUampfZh8H3LDaTcO5M\\n\" +\n \"wrkzCfs5q8Nqrg6X5vzn25eBzlX4836E2ctafZe5mt3Zn2MQCN/UaVO9JPRRTXE+/0SYtbLPTNWk\\n\" +\n \"30h3C9/3aqsLWzgBiHN5XFuy2rYpm716kPnHcVH+bqFOd5rlCQtDVnfRjjuFSR7inLCs9ljCFIlw\\n\" +\n \"yfvy1YA8xDW+vEFSO7SlnSZIGFQYQLxuQDkXFJfWtjkcge3x5s8x/Iuwm6fyLXFB7etOS9Ltiz+7\\n\" +\n \"tbo6WY5RhF2ouB531ra12itabeu+Kx1FmELFQSPTOr/ArnLPqymqML2eIN6SH3qF8VLfw5oRhGkW\\n\" +\n \"4npM5U0DTOYPZzimsKEjS8Wre3ceaIAc2ZaODBV36duAJIQBxEPyGq4BSQlTOHHgiicrDKTiIHlh\\n\" +\n \"IBXPRhhw4tkJg5C4WFh0XyfAJJw7k3DeFOoHaIAJVpYI2HsAAAAASUVORK5CYII=\";\n\n\n\n\n String base64Img=null;\n HttpRequester httprequest = new HttpRequester();\n\n CloseableHttpClient httpClient =null;\n String url=\"https://creditcard.ecitic.com/citiccard/cppnew/entry.do?func=entryebank&ebankPage=mainpage\";\n httpClient = HttpClients.createDefault();\n CookieStore cookieStore = new BasicCookieStore();\n HttpContext localContext = new BasicHttpContext();\n localContext.setAttribute(\"http.cookie-store\", cookieStore);\n RequestConfig.custom().setConnectTimeout(20000);\n RequestConfig.custom().setSocketTimeout(20000);\n RequestConfig.custom().setConnectionRequestTimeout(20000);\n RequestConfig requestConfig = RequestConfig.custom().build();\n Map<String, String> requestHeaderMap=new HashMap<String, String>();\n requestHeaderMap.put(\"Accept-Encoding\", \"gzip, deflate\");\n requestHeaderMap.put(\"Host\", \"creditcard.ecitic.com\");\n requestHeaderMap.put(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0\");\n requestHeaderMap.put(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n requestHeaderMap.put(\"Connection\", \"Keep-Alive\");\n requestHeaderMap.put(\"Cache-Control\", \"private\");\n requestHeaderMap.put(\"Accept-Language\", \"zh-CN\");\n// if (!StringUtil.isEmpty(userIp)&&!userIp.equals(\"127.0.0.1\")) {\n// requestHeaderMap.put(\"X-Forwarded-For\", userIp);\n// }\n// logger.info(bean.getCuserId()+\"zhongxin userIp=\"+userIp);\n String content= HpClientUtil.httpGet(url, requestHeaderMap, httpClient, localContext, \"GBK\");\n\n String channel=content.substring(content.indexOf(\"var channel\"), content.indexOf(\"var source\"));\n String source =content.substring(content.indexOf(\"var source\"), content.indexOf(\"var from\"));\n channel=channel.substring(channel.indexOf(\"\\\"\")+1, channel.lastIndexOf(\"\\\"\"));\n source=source.substring(source.indexOf(\"\\\"\") + 1, source.lastIndexOf(\"\\\"\"));\n String vcodeUrl=\"https://creditcard.ecitic.com/citiccard/cppnew/jsp/valicode.jsp?time=\"+System.currentTimeMillis();\n\n\n BufferedImage localBufferedImage=null;\n localBufferedImage=HpClientUtil.getRandomImageOfJPEG(vcodeUrl, requestHeaderMap, httpClient, localContext, requestConfig);\n base64Img= BankHelper.GetImageBase64(localBufferedImage, \"jpeg\");\n System.out.println(base64Img);\n url = \"http://192.168.3.50:8080/captcha/hack?captcha=\";\n\n try {\n // url = java.net.URLDecoder.decode(url, \"utf-8\");\n strImg= java.net.URLEncoder.encode(base64Img, \"utf-8\");\n url = url +strImg + \"&bankid=2&imgtype=1\" ;\n HttpRespons hr = httprequest.sendGet(url);\n //获取招商银行的登录sessionID\n content=hr.getContent();\n System.out.println(content);\n JSONObject json=JSONObject.parseObject(content);\n System.out.println(json.getString(\"text\"));\n\n\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n System.out.println(url);\n GenerateImage(base64Img);\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n\r\n ImageView image = (ImageView) findViewById(R.id.editprofile_image);\r\n try {\r\n if (requestCode == requestCode && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImage = data.getData();\r\n Log.d(\"d\", \"Image URI: \" + selectedImage);\r\n\r\n Bitmap bm = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);\r\n image.setImageBitmap(bm);\r\n\r\n //Encoding image to base64\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);\r\n byte[] byteArray = byteArrayOutputStream .toByteArray();\r\n to64 = Base64.encodeToString(byteArray, Base64.DEFAULT);\r\n Log.d(\"d\", \"Encoded String: \" + to64);\r\n\r\n }\r\n }catch (IOException e){\r\n Toast.makeText(this, \"An error occurred.\", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }",
"public static String bitMapToBase64String(Bitmap bitmap){\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteStream);\n byte[] byteArray = byteStream.toByteArray();\n String baseString = Base64.encodeToString(byteArray,Base64.DEFAULT);\n return baseString;\n }",
"public static Bitmap decodeToBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"public static Bitmap decodeBase64(String input){\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedByte,0,decodedByte.length);\n }",
"@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"@Schema(example = \"iVBORw0KGgoAAAANSUhEUgAAACIAAAAoCAYAAACb3CikAAAABGdBTUEAALGPC\", description = \"Binary image content, base64 encoded.\")\n public String getImage() {\n return image;\n }",
"com.google.protobuf.ByteString\n getProfileImageBytes();",
"private String convertintobase64(Bitmap bitmap2) {\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbitmap2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n\t\tbyte[] b = baos.toByteArray();\n\t\tString temp = Base64.encodeToString(b, Base64.DEFAULT | Base64.NO_WRAP);\n\t\tSystem.out.println(\"encoded string is:\" + temp);\n\t\treturn temp;\n\t}",
"public String getStringImage(Bitmap bmp) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.JPEG, 70, baos);\n byte[] imageBytes = baos.toByteArray();\n String encodedImage = Base64.encodeToString(imageBytes, Base64.DEFAULT);\n return encodedImage;\n\n }",
"public Image getImage() {\n ByteArrayInputStream byteIn = new ByteArrayInputStream(Base64.decodeBase64(this.getImageBase64()));\n\n BufferedImage image;\n\n try {\n image = ImageIO.read(byteIn);\n }\n catch (IOException e) {\n if (this.logger != null) {\n this.logger.warning(\"Error when decoding base64 server icon\");\n }\n\n image = null;\n }\n\n if (image == null) {\n return new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);\n }\n else {\n return image;\n }\n }",
"private void loadImageInGUI(String image_64){\n if (image_64.length() > 10) {\r\n //Log.d(\"ddd\", \"writooo\");\r\n ImageView userImage = header.findViewById(R.id.profile_img);\r\n byte[] decodedString = Base64.decode(image_64, Base64.DEFAULT);\r\n Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\r\n userImage.setImageBitmap(decodedByte);\r\n imageLoaded = true;\r\n }\r\n }",
"@Override\n\tpublic String getImagePath64X64() {\n\t\treturn null;\n\t}",
"@Override\n protected String doInBackground(Void... params) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }",
"@Override\r\n public String getImage(String path, String ext) {\r\n String imageString = \"\";\r\n try {\r\n BufferedImage originalImage = ImageIO.read(new File(path));\r\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\r\n ImageIO.write(originalImage, ext, bos);\r\n byte[] imageBytes = bos.toByteArray();\r\n BASE64Encoder encoder = new BASE64Encoder();\r\n imageString = encoder.encode(imageBytes);\r\n System.out.println(\"Image \"+path+\" loaded\");\r\n bos.close();\r\n return imageString;\r\n } catch (IOException ex) {\r\n System.err.println(\"\"+ex.getMessage());\r\n return null;\r\n }\r\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"public static Bitmap decodeBase64(String input)\n {\n byte[] decodedBytes = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);\n }",
"public byte[] convertCircleBitmapToByteArray(Bitmap imagem){\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n imagem.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte imagemBytes[] = stream.toByteArray();\n return imagemBytes;\n\n }",
"public static String toBase64(byte[] data)\n {\n return Base64.encodeToString(data, Base64.NO_WRAP);\n }",
"private Bitmap getGoodsImageFromDatabase(String goodId) {\r\n Cursor cursor = helper.getSpecifyGoodImage(goodId);\r\n cursor.moveToFirst();\r\n byte bytes[] = Base64.decode(cursor.getString(0), Base64.DEFAULT);\r\n cursor.close();\r\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\r\n return bitmap;\r\n }",
"public static Bitmap decodeBitmapSize(Bitmap bm, int IMAGE_BIGGER_SIDE_SIZE) {\n Bitmap b = null;\r\n\r\n\r\n //convert Bitmap to byte[]\r\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.JPEG, 100, stream);\r\n byte[] byteArray = stream.toByteArray();\r\n\r\n //We need to know image width and height, \r\n //for it we create BitmapFactory.Options object and do BitmapFactory.decodeByteArray\r\n //inJustDecodeBounds = true - means that we do not need load Bitmap to memory\r\n //but we need just know width and height of it\r\n BitmapFactory.Options opt = new BitmapFactory.Options();\r\n opt.inJustDecodeBounds = true;\r\n BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, opt);\r\n int CurrentWidth = opt.outWidth;\r\n int CurrentHeight = opt.outHeight;\r\n\r\n\r\n //there is function that can quick scale images\r\n //but we need to give in scale parameter, and scale - it is power of 2\r\n //for example 0,1,2,4,8,16...\r\n //what scale we need? for example our image 1000x1000 and we want it will be 100x100\r\n //we need scale image as match as possible but should leave it more then required size\r\n //in our case scale=8, we receive image 1000/8 = 125 so 125x125, \r\n //scale = 16 is incorrect in our case, because we receive 1000/16 = 63 so 63x63 image \r\n //and it is less then 100X100\r\n //this block of code calculate scale(we can do it another way, but this way it more clear to read)\r\n int scale = 1;\r\n int PowerOf2 = 0;\r\n int ResW = CurrentWidth;\r\n int ResH = CurrentHeight;\r\n if (ResW > IMAGE_BIGGER_SIDE_SIZE || ResH > IMAGE_BIGGER_SIDE_SIZE) {\r\n while (1 == 1) {\r\n PowerOf2++;\r\n scale = (int) Math.pow(2, PowerOf2);\r\n ResW = (int) ((double) opt.outWidth / (double) scale);\r\n ResH = (int) ((double) opt.outHeight / (double) scale);\r\n if (Math.max(ResW, ResH) < IMAGE_BIGGER_SIDE_SIZE) {\r\n PowerOf2--;\r\n scale = (int) Math.pow(2, PowerOf2);\r\n ResW = (int) ((double) opt.outWidth / (double) scale);\r\n ResH = (int) ((double) opt.outHeight / (double) scale);\r\n break;\r\n }\r\n\r\n }\r\n }\r\n\r\n\r\n //Decode our image using scale that we calculated\r\n BitmapFactory.Options opt2 = new BitmapFactory.Options();\r\n opt2.inSampleSize = scale;\r\n //opt2.inScaled = false;\r\n b = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, opt2);\r\n\r\n\r\n //calculating new width and height\r\n int w = b.getWidth();\r\n int h = b.getHeight();\r\n if (w >= h) {\r\n w = IMAGE_BIGGER_SIDE_SIZE;\r\n h = (int) ((double) b.getHeight() * ((double) w / b.getWidth()));\r\n } else {\r\n h = IMAGE_BIGGER_SIDE_SIZE;\r\n w = (int) ((double) b.getWidth() * ((double) h / b.getHeight()));\r\n }\r\n\r\n\r\n //if we lucky and image already has correct sizes after quick scaling - return result\r\n if (opt2.outHeight == h && opt2.outWidth == w) {\r\n return b;\r\n }\r\n\r\n\r\n //we scaled our image as match as possible using quick method\r\n //and now we need to scale image to exactly size\r\n b = Bitmap.createScaledBitmap(b, w, h, true);\r\n\r\n\r\n return b;\r\n }",
"public static Bitmap decodeBase64(String input) {\r\n byte[] decodedBytes = Base64.decode(input, 0);\r\n return BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);\r\n }",
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }",
"private Bitmap decodeBitmapBase64 (String encodedString)\t{\n\t\ttry {\n\n\t\t\tbyte[] decodedString = Base64.decode(encodedString.getBytes(\"UTF-8\"), Base64.DEFAULT);\n\t\t\tBitmap decodedImage = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\n\n\t\t\treturn decodedImage;\n\n\t\t} catch (Exception e) {\n\n\t\t\tToast.makeText(getBaseContext(), \"Catch # 12:19\", Toast.LENGTH_LONG).show();\n\t\t\treturn null;\n\n\t\t}\n\n\t}",
"java.util.List<com.google.protobuf.ByteString> getImgDataList();",
"com.google.protobuf.ByteString getPicture();",
"public native byte[] imageToBlob(ImageInfo imageInfo);",
"public static Bitmap decodeBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory\n .decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"public byte[] allocBase64Buffer()\n/* */ {\n/* 175 */ _verifyAlloc(this._base64Buffer);\n/* 176 */ return this._base64Buffer = this._bufferRecycler.allocByteBuffer(3);\n/* */ }",
"public static ArrayList<String> getChunkFromBase64(String base64) {\n\n ArrayList<String> arrylstChunks = new ArrayList<>();\n int index = 0;\n while(index < base64.length()) {\n arrylstChunks.add(base64.substring(index, Math.min(index + AppConstants.CHUNK_SIZE, base64.length())));\n index += AppConstants.CHUNK_SIZE;\n }\n\n return arrylstChunks;\n }",
"public String save(){\n this.setDrawingCacheEnabled(true);\n this.buildDrawingCache();\n //mBitmap = Bitmap.createBitmap(this.getWidth(),this.getHeight(),Bitmap.Config.ARGB_8888);\n Bitmap bmp = Bitmap.createBitmap(this.getDrawingCache());\n this.setDrawingCacheEnabled(false);\n\n ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG,100,byteArrayOutputStream);\n byte[] imgBytes=byteArrayOutputStream.toByteArray();\n\n return Base64.encodeToString(imgBytes,Base64.DEFAULT);\n\n }",
"private static byte[] decodeBase64(String data) {\n return Base64.decode(data, BASE64_DFLAGS);\n }",
"public static String encodeToBase64(Bitmap image, Bitmap.CompressFormat compressFormat, int quality)\r\n {\r\n ByteArrayOutputStream byteArrayOS = new ByteArrayOutputStream();\r\n image.compress(compressFormat, quality, byteArrayOS);\r\n return Base64.encodeToString(byteArrayOS.toByteArray(), Base64.DEFAULT);\r\n }",
"public byte[] getImageBytes()\n {\n byte[] buff = null;\n \n try\n {\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n ImageIO.write(img, \"jpg\", bos);\n buff = bos.toByteArray();\n bos.flush();\n bos.close();\n }\n catch(Exception ex)\n {\n System.out.println(\"Problem Serializeing PicNode\");\n ex.printStackTrace();\n }\n return buff;\n }",
"public InputStream mo12944a(String str) {\n if (str.startsWith(\"data:image\")) {\n int indexOf = str.indexOf(44);\n if (indexOf == -1) {\n throw new IllegalArgumentException(\"Missing comma in data URL.\");\n } else if (str.substring(0, indexOf).endsWith(\";base64\")) {\n return new ByteArrayInputStream(Base64.decode(str.substring(indexOf + 1), 0));\n } else {\n throw new IllegalArgumentException(\"Not a base64 image data URL.\");\n }\n } else {\n throw new IllegalArgumentException(\"Not a valid image data URL.\");\n }\n }",
"com.google.protobuf.ByteString\n getImageBytes();",
"public static String encodeToBase64(Bitmap image, Bitmap.CompressFormat compressFormat, int quality)\n {\n ByteArrayOutputStream byteArrayOS = new ByteArrayOutputStream();\n image.compress(compressFormat, quality, byteArrayOS);\n return Base64.encodeToString(byteArrayOS.toByteArray(), Base64.DEFAULT);\n }",
"public static String byteToBase64(byte[] data){\n BASE64Encoder endecoder = new BASE64Encoder();\n return endecoder.encode(data);\n }",
"public static Bitmap bitmapDecodeBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory\n .decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"private String saveDownloadedImage(Bitmap bmp) {\n if (bmp != null) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, baos);\n byte[] imgBytes = baos.toByteArray();\n String base64String = Base64.encodeToString(imgBytes,\n Base64.DEFAULT);\n\n //Return the encoded image as String\n return base64String;\n }\n return null;\n }",
"static byte[] base64decode(String base64)\n {\n // Remove all whitespace.\n base64 = base64.replaceAll(\"\\\\s\", \"\");\n int endTrim = 0;\n if (base64.endsWith(\"==\")) {\n endTrim = 2;\n base64 = base64.substring(0, base64.length() - 2) + \"AA\";\n } else if (base64.endsWith(\"=\"))\n {\n endTrim = 1;\n base64 = base64.substring(0, base64.length() - 1) + \"A\";\n }\n if (base64.length() % 4 != 0) throw new IllegalArgumentException(\"Illegal base64 string, length \" + base64.length());\n int length = (base64.length() / 4) * 3 - endTrim;\n base64 = base64.replace('=', 'A');\n byte[] result = new byte[length];\n int stringLength = base64.length();\n int index = 0;\n for (int i = 0; i < stringLength; i += 4)\n {\n int i0 = BASE64_STRING.indexOf(base64.charAt(i));\n int i1 = BASE64_STRING.indexOf(base64.charAt(i + 1));\n int i2 = BASE64_STRING.indexOf(base64.charAt(i + 2));\n int i3 = BASE64_STRING.indexOf(base64.charAt(i + 3));\n byte b0 = (byte) ((i0 << 2) | (i1 >> 4));\n byte b1 = (byte) ((i1 << 4) | (i2 >> 2));\n byte b2 = (byte) ((i2 << 6) | i3);\n result[index++] = b0;\n if (index < length)\n {\n result[index++] = b1;\n if (index < length)\n {\n result[index++] = b2;\n }\n }\n }\n return result;\n }",
"public byte[] getImageData() {\n return profilePictureBytes;\n }",
"public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n }\n\n ;\n\n @Override\n protected String doInBackground(Void... params) {\n\n //bitmap = Bitmap.createScaledBitmap(bitmap, original_width, original_height, true);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n\n // Put converted Image string into Async Http Post param\n params.add(new BasicNameValuePair(\"image\", encodedString));\n // Trigger Image upload\n new upload_image().execute();\n }\n }.execute(null, null, null);\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case 3: {\n if (resultCode == Activity.RESULT_OK && data != null) {\n Uri image = data.getData();\n try {\n Bitmap temp = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), image);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n temp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byte[] byteArray = byteArrayOutputStream.toByteArray();\n int num = 50;\n while (byteArray.length > 10000 && num > 0) { // compress image to not more than 10 kb\n byteArrayOutputStream.flush();\n byteArrayOutputStream.reset();\n\n temp.compress(Bitmap.CompressFormat.JPEG, num, byteArrayOutputStream);\n num = num / 2;\n byteArray = byteArrayOutputStream.toByteArray();\n }\n this.profilePic = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT);\n profilePicChanged = true;\n Toast.makeText(dialog.getContext(), \"Image Uploaded\", Toast.LENGTH_SHORT).show();\n decodeImage(profilePic, editImage);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public static String decodificarImagen(byte[] imagen){\n\t\tif(imagen!=null && imagen.length>0){\n\t\t\treturn \"data:image/jpeg;base64,\"+DatatypeConverter.printBase64Binary(imagen);\n\t\t}\n\t\treturn null;\n\t}",
"private static ByteString readImageBytes(BlobKey blobKey) throws IOException {\n BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();\n BlobInfo blobInfo = new BlobInfoFactory().loadBlobInfo(blobKey);\n long blobSize = blobInfo.getSize();\n\n ByteArrayOutputStream outputBytes = new ByteArrayOutputStream();\n int fetchSize = BlobstoreService.MAX_BLOB_FETCH_SIZE;\n long currentByteIndex = 0;\n\n // Fetch all the bytes from the blob in fragments of the maximum fetch size.\n while (currentByteIndex < blobSize) {\n // End index is inclusive, so subtract 1 to get fetchSize bytes.\n // Get data starting at currentByteIndex until either the fetch size or\n // the end of the blob is reached.\n byte[] bytes =\n blobstoreService.fetchData(blobKey, currentByteIndex, currentByteIndex + fetchSize - 1);\n outputBytes.write(bytes);\n\n currentByteIndex += fetchSize;\n }\n\n return ByteString.copyFrom(outputBytes.toByteArray());\n }",
"private Base64(){}",
"private byte[] getGravatarPicture(final String email, final PictureType size) throws EnMeGenericException {\n log.debug(\"getGravatarPicture \"+size);\n log.debug(\"getGravatarPicture \"+email);\n return PictureUtils.downloadGravatar(email, size.toInt());\n }",
"public byte[] getPicData() {\n try {\n ParseFile pic = fetchIfNeeded().getParseFile(\"pic\");\n return pic.getData();\n }\n catch (ParseException e) {\n Log.d(TAG, \"Error in getting photo from Parse: \" + e);\n return null;\n }\n }",
"java.lang.String getProfileImage();",
"static byte[] base64ToByteArray(String s) {\r\n byte[] alphaToInt = base64ToInt;\r\n int sLen = s.length();\r\n int numGroups = sLen/4;\r\n if (4*numGroups != sLen)\r\n throw new IllegalArgumentException(\r\n \"String length must be a multiple of four.\");\r\n int missingBytesInLastGroup = 0;\r\n int numFullGroups = numGroups;\r\n if (sLen != 0) {\r\n if (s.charAt(sLen-1) == '=') {\r\n missingBytesInLastGroup++;\r\n numFullGroups--;\r\n }\r\n if (s.charAt(sLen-2) == '=')\r\n missingBytesInLastGroup++;\r\n }\r\n byte[] result = new byte[3*numGroups - missingBytesInLastGroup];\r\n\r\n // Translate all full groups from base64 to byte array elements\r\n int inCursor = 0, outCursor = 0;\r\n for (int i=0; i<numFullGroups; i++) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch3 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n result[outCursor++] = (byte) ((ch2 << 6) | ch3);\r\n }\r\n\r\n // Translate partial group, if present\r\n if (missingBytesInLastGroup != 0) {\r\n int ch0 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n int ch1 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch0 << 2) | (ch1 >> 4));\r\n\r\n if (missingBytesInLastGroup == 1) {\r\n int ch2 = base64toInt(s.charAt(inCursor++), alphaToInt);\r\n result[outCursor++] = (byte) ((ch1 << 4) | (ch2 >> 2));\r\n }\r\n }\r\n // assert inCursor == s.length()-missingBytesInLastGroup;\r\n // assert outCursor == result.length;\r\n return result;\r\n }",
"public javax.activation.DataHandler getBase64Binary() {\n return localBase64Binary;\n }",
"public String saveImage(String name, String base64) {\n\t\tString pathFile = pathFileBase + name;\n\t\ttry {\n\t\t\tFileOutputStream imageOutFile = new FileOutputStream(pathFile);\n\t\t\tbyte[] imageByteArray = Base64.getDecoder().decode(base64);\n\t\t\timageOutFile.write(imageByteArray);\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image not found\" + e);\n\t\t\treturn null;\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"Exception while writing the Image \" + ioe);\n\t\t\treturn null;\n\t\t}\n\t\treturn pathFile;\n\t}",
"private void decodeBase64AndSetImage(String completeImageData, ImageView imageView) {\n String imageDataBytes = completeImageData.substring(completeImageData.indexOf(\",\")+1);\n\n InputStream stream = new ByteArrayInputStream(Base64.decode(imageDataBytes.getBytes(), Base64.DEFAULT));\n\n Bitmap bitmap = BitmapFactory.decodeStream(stream);\n\n imageView.setImageBitmap(bitmap);\n }",
"@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onPictureTaken(byte[] data, Camera camera) {\n Log.d(\"Hawk.CameraHandler\",\"onPictureCalled\");\n //\n bmp = BitmapFactory.decodeByteArray(data, 0, data.length); //Convert raw byte array to Bitmap format\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream); //Write the Bitmap to ByteArrayOutputStream\n byte[] byteArray = byteArrayOutputStream .toByteArray(); //Get byte array from ByteArrayOutputStream\n //\n encodedImage=Base64.getEncoder().encodeToString(byteArray); //Convert the byte array to Base64 encoded string\n camera.stopPreview(); //Stop the preview\n Log.d(\"EncodedImage\",\"starthere#\"+encodedImage+\"###ENDED\");\n picReady=true; //Indicates that encoded string is ready\n camera.release();\n }",
"public byte[] bitmap();",
"private String encodeBytesFromBuffer(int howMany) {\n String result;\n\n if (innerStreamHasMoreData) {\n howMany = howMany - howMany % 3;\n }\n\n if (howMany == 0) {\n return \"\";\n }\n\n byte[] encodeBuffer = new byte[howMany];\n System.arraycopy(buffer, 0, encodeBuffer, 0, howMany);\n result = Base64.encodeToString(encodeBuffer);\n\n bytesInBuffer -= howMany;\n if (bytesInBuffer != 0) {\n System.arraycopy(buffer, howMany, buffer, 0, bytesInBuffer);\n }\n\n return result;\n }",
"private static final byte[] xfsim_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -128,\n\t\t\t\t-128, -128, -64, -64, -64, 0, 0, 0, -1, -1, -1, 0, 0, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 72, 88, -70,\n\t\t\t\t-36, 14, 48, -58, 23, -86, -83, 64, 48, 48, -70, -17, -112,\n\t\t\t\t-74, 112, 66, 105, 14, -31, 54, 8, 68, -37, -94, -103, -54,\n\t\t\t\t-70, 4, 44, 42, 36, 93, -89, -29, -9, 101, -112, -111, 105, 88,\n\t\t\t\t2, 4, 68, 28, -97, -57, 24, 43, -124, -128, 2, 104, -54, 40,\n\t\t\t\t56, 90, -85, 88, 77, 82, -23, 57, 42, -120, -32, -110, 99, -20,\n\t\t\t\t72, 0, 0, 59 };\n\t\treturn data;\n\t}",
"@Override\r\n public byte[] getCustomImageInBytes() {\r\n\r\n return imageInByte;\r\n }",
"@SuppressLint(\"StaticFieldLeak\")\n public void encodeImagetoString() {\n new AsyncTask<String, Void, String>() {\n\n protected void onPreExecute() {\n\n };\n\n @Override\n protected String doInBackground(String... params) {\n int compressVal = 100;\n\n// BitmapFactory.Options options = null;\n// options = new BitmapFactory.Options();\n// options.inSampleSize = 3;\n\n log(imgPath);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(imgPath, options);\n options.inJustDecodeBounds = false;\n options.inSampleSize = ScalingUtilities.calculateSampleSize(options.outWidth, options.outHeight, 1920,\n 1080, ScalingUtilities.ScalingLogic.FIT);\n bitmap = BitmapFactory.decodeFile(imgPath,options);\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n\n try {\n bitmap.compress(Bitmap.CompressFormat.JPEG, 75, stream);\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n\n// int size = 10000000;\n// while ( size > 150 * 1024) {\n// if(compressVal <= 5)\n// {\n// break;\n// }\n// stream.reset();\n// bitmap.compress(Bitmap.CompressFormat.JPEG, compressVal, stream);\n// byte[] temp_byte_arr = stream.toByteArray();\n// size = temp_byte_arr.length;\n// Log.d(TAG,size+\"\");\n// compressVal-=5;\n// }\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n log(\"success\");\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n //added by Tonny @23-Mar-2018\n Picasso.get()\n .load(new File(imgPath))\n .resize(200, 200)\n .centerCrop()\n .into(ivPreview);\n //remarked by Tonny @23-Mar-2018 older version\n// Picasso.with(con)\n// .load(new File(imgPath))\n// .resize(200, 200)\n// .centerCrop()\n// .into(ivPreview);\n //data_flag = ChatMsgContainer.message_data_type_picture;\n setupAttachedFile(ChatMsgContainer.message_data_type_picture);\n }\n }.execute(null, null, null);\n }",
"public static MutableImage fromBase64String(String base64Image)\n throws IOException {\n if (base64Image == null) {\n return null;\n }\n\n var base64 = base64Image.replaceFirst(\"(?is)^.*?base64,(.*)$\", \"$1\");\n var bais = new ByteArrayInputStream(\n Base64.getMimeDecoder().decode(base64));\n return new MutableImage(ImageIO.read(bais));\n }",
"private String encodeBase64(String msg) {\n\t\tbyte[] bytesEncoded = Base64.encodeBase64(msg.getBytes());\n\t\t//System.out.println(\"encoded value is \" + new String(bytesEncoded));\n\n\t\treturn new String(bytesEncoded);\n\t}",
"public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n };\n\n @Override\n protected String doInBackground(Void... params) {\n BitmapFactory.Options options = null;\n options = new BitmapFactory.Options();\n options.inSampleSize = 3;\n bitmap = BitmapFactory.decodeFile(imgPath,\n options);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n prgDialog.setMessage(\"Calling Upload\");\n // Put converted Image string into Async Http Post param\n params.put(\"image\", encodedString);\n params.put(\"groupid\",gr_id[spinner.getSelectedItemPosition()]);\n params.put(\"userid\", 1);//userid will be the user who has logged in from the application\n // Trigger Image upload\n triggerImageUpload();\n }\n }.execute(null, null, null);\n }",
"private byte[] getImageOne() {\n Bitmap icon = BitmapFactory.decodeResource(getApplicationContext().getResources(),\n R.drawable.image0);\n return ImageConvert.convertImage2ByteArray(icon);\n }",
"public static byte[] fromBase64(String data)\n {\n return Base64.decode(data, Base64.NO_WRAP);\n }",
"public String base64Encode(String str) throws StoreFactoryException;",
"protected String getEncodedFileContent() throws IOException\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n Path path = Paths.get(fullAttachmentFilename);\n byte[] byteArray = Files.readAllBytes(path);\n Base64 x = new Base64();\n String encodedFileContent = x.encodeAsString(byteArray);\n return encodedFileContent;\n }"
] | [
"0.6256649",
"0.60630405",
"0.60102755",
"0.59895444",
"0.596625",
"0.5942994",
"0.5938994",
"0.59248227",
"0.5852545",
"0.58364594",
"0.5758443",
"0.5716495",
"0.5713213",
"0.5689068",
"0.5653655",
"0.56535864",
"0.5644664",
"0.56228846",
"0.56169075",
"0.561031",
"0.55973405",
"0.5585732",
"0.5563358",
"0.5516903",
"0.54913026",
"0.5481323",
"0.5457719",
"0.545434",
"0.5443903",
"0.54356384",
"0.5417959",
"0.5416436",
"0.5386309",
"0.53627086",
"0.5329868",
"0.53163916",
"0.53136516",
"0.525918",
"0.52578896",
"0.5239567",
"0.5237988",
"0.5230195",
"0.5227436",
"0.51873344",
"0.5181509",
"0.51806587",
"0.51428854",
"0.5142364",
"0.51404774",
"0.51389253",
"0.51383305",
"0.5130909",
"0.51287955",
"0.51253694",
"0.512468",
"0.51128656",
"0.5109366",
"0.5103735",
"0.509514",
"0.5078148",
"0.50759107",
"0.5071439",
"0.5063691",
"0.50528187",
"0.50468063",
"0.50448024",
"0.5044801",
"0.5032948",
"0.50277346",
"0.50222635",
"0.50014776",
"0.49999955",
"0.49931863",
"0.49852073",
"0.49841046",
"0.49749276",
"0.49718863",
"0.4964787",
"0.49645907",
"0.49584693",
"0.49571586",
"0.49497336",
"0.49496934",
"0.49445963",
"0.4918235",
"0.49156603",
"0.4911782",
"0.49087247",
"0.49055982",
"0.49005878",
"0.48949727",
"0.48888677",
"0.4880519",
"0.4878599",
"0.48771068",
"0.4876556",
"0.48761135",
"0.4858633",
"0.4846745",
"0.48466304",
"0.48375487"
] | 0.0 | -1 |
Set Base64encoded image data, which cannot exceed 5 MB. The long side cannot exceed 4,000 px for images in .jpg format or 2,000 px for images in other formats. The recommended image aspect ratio is 3:4 (generally, the aspect ratio of images taken by mobile phones). The face must be greater than 100100 px in size. Supported image formats are PNG, JPG, JPEG, and BMP. GIF is currently not supported. | public void setImage(String Image) {
this.Image = Image;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void loadImageInGUI(String image_64){\n if (image_64.length() > 10) {\r\n //Log.d(\"ddd\", \"writooo\");\r\n ImageView userImage = header.findViewById(R.id.profile_img);\r\n byte[] decodedString = Base64.decode(image_64, Base64.DEFAULT);\r\n Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\r\n userImage.setImageBitmap(decodedByte);\r\n imageLoaded = true;\r\n }\r\n }",
"private void decodeBase64AndSetImage(String completeImageData, ImageView imageView) {\n String imageDataBytes = completeImageData.substring(completeImageData.indexOf(\",\")+1);\n\n InputStream stream = new ByteArrayInputStream(Base64.decode(imageDataBytes.getBytes(), Base64.DEFAULT));\n\n Bitmap bitmap = BitmapFactory.decodeStream(stream);\n\n imageView.setImageBitmap(bitmap);\n }",
"public void setImageBase64(String imageBase64) {\n if (imageBase64 == null) {\n throw new NullArgumentException(\"imageBase64 must not be null\");\n }\n if (!Base64.isBase64(imageBase64)) {\n throw new IllegalArgumentException(\"imageBase64 is not valid base64\");\n }\n\n this.imageBase64 = imageBase64;\n }",
"public DataURL setBase64(boolean base64){\n this.base64 = base64;\n return this;\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {\n if (resultCode == RESULT_OK && requestCode == IMAGE_PICK_CODE && data != null) {\n // set image in amageView.\n Uri uri = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), uri);\n profile.setImageBitmap(bitmap);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n //here you can choose quality factor in third parameter(ex. i choosen 25)\n bitmap.compress(Bitmap.CompressFormat.JPEG, 25, baos);\n byte[] fileInBytes = baos.toByteArray();\n uploadImageToFireStore(fileInBytes);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n super.onActivityResult(requestCode, resultCode, data);\r\n\r\n ImageView image = (ImageView) findViewById(R.id.editprofile_image);\r\n try {\r\n if (requestCode == requestCode && resultCode == RESULT_OK && null != data) {\r\n Uri selectedImage = data.getData();\r\n Log.d(\"d\", \"Image URI: \" + selectedImage);\r\n\r\n Bitmap bm = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImage);\r\n image.setImageBitmap(bm);\r\n\r\n //Encoding image to base64\r\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);\r\n byte[] byteArray = byteArrayOutputStream .toByteArray();\r\n to64 = Base64.encodeToString(byteArray, Base64.DEFAULT);\r\n Log.d(\"d\", \"Encoded String: \" + to64);\r\n\r\n }\r\n }catch (IOException e){\r\n Toast.makeText(this, \"An error occurred.\", Toast.LENGTH_LONG).show();\r\n }\r\n\r\n }",
"public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case 3: {\n if (resultCode == Activity.RESULT_OK && data != null) {\n Uri image = data.getData();\n try {\n Bitmap temp = MediaStore.Images.Media.getBitmap(getActivity().getContentResolver(), image);\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n temp.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);\n byte[] byteArray = byteArrayOutputStream.toByteArray();\n int num = 50;\n while (byteArray.length > 10000 && num > 0) { // compress image to not more than 10 kb\n byteArrayOutputStream.flush();\n byteArrayOutputStream.reset();\n\n temp.compress(Bitmap.CompressFormat.JPEG, num, byteArrayOutputStream);\n num = num / 2;\n byteArray = byteArrayOutputStream.toByteArray();\n }\n this.profilePic = Base64.encodeToString(byteArrayOutputStream.toByteArray(), Base64.DEFAULT);\n profilePicChanged = true;\n Toast.makeText(dialog.getContext(), \"Image Uploaded\", Toast.LENGTH_SHORT).show();\n decodeImage(profilePic, editImage);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n }",
"public void setPic(byte[] data) {\n ParseFile pic = new ParseFile(getObjectId().toString()+ \".jpg\", data);\n //SAVE PIC THEN ONCE DONE, PERFORM SAVE ON THE PHOTO OBJECT\n pic.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error in uploading photo to Parse: \" + e);\n }\n }\n }, new ProgressCallback() {\n @Override\n public void done(Integer percentDone) {\n\n }\n });\n put(\"pic\", pic);\n saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error saving photo to Parse: \" + e);\n }\n }\n });\n }",
"public static String encodeTobase64(Bitmap image){\n if(image != null) {\n Bitmap image2 = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image2.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n\n Log.d(\"Image Log:\", imageEncoded);\n return imageEncoded;\n }\n else{\n return \"\";\n }\n }",
"static Image forData(String imageType, byte[] data) {\n\t\treturn () -> String.format(\"data:image/%s;base64,%s\", imageType, Base64.encodeBase64String(data));\n\t}",
"private void setImage(String image) {\n Bitmap bitmap;\n try {\n byte[] encodeByte = Base64.decode(image, Base64.DEFAULT);\n bitmap = BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length);\n } catch (Exception e) {\n e.getMessage();\n Log.d(\"No valid image\", \"setImage: Failed\");\n return;\n }\n\n ImageView imgView = (ImageView) findViewById(R.id.cameraView);\n if (imgView != null && image != null) {\n imgView.setImageBitmap(bitmap);\n }\n }",
"public static Bitmap getBitmapFromStringBase64(String imageString){\n byte[] imageAsBytes = Base64.decode(imageString, Base64.DEFAULT);\n Bitmap bitmap = BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.length);\n return bitmap;\n }",
"public String getImageBase64() {\n return this.imageBase64;\n }",
"static String convertToBase64(byte[] image){\n return !Objects.isNull(image)\n ? Base64.getEncoder().encodeToString(image)\n : \"\";\n }",
"public static Bitmap decodeBitmapSize(Bitmap bm, int IMAGE_BIGGER_SIDE_SIZE) {\n Bitmap b = null;\r\n\r\n\r\n //convert Bitmap to byte[]\r\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\r\n bm.compress(Bitmap.CompressFormat.JPEG, 100, stream);\r\n byte[] byteArray = stream.toByteArray();\r\n\r\n //We need to know image width and height, \r\n //for it we create BitmapFactory.Options object and do BitmapFactory.decodeByteArray\r\n //inJustDecodeBounds = true - means that we do not need load Bitmap to memory\r\n //but we need just know width and height of it\r\n BitmapFactory.Options opt = new BitmapFactory.Options();\r\n opt.inJustDecodeBounds = true;\r\n BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, opt);\r\n int CurrentWidth = opt.outWidth;\r\n int CurrentHeight = opt.outHeight;\r\n\r\n\r\n //there is function that can quick scale images\r\n //but we need to give in scale parameter, and scale - it is power of 2\r\n //for example 0,1,2,4,8,16...\r\n //what scale we need? for example our image 1000x1000 and we want it will be 100x100\r\n //we need scale image as match as possible but should leave it more then required size\r\n //in our case scale=8, we receive image 1000/8 = 125 so 125x125, \r\n //scale = 16 is incorrect in our case, because we receive 1000/16 = 63 so 63x63 image \r\n //and it is less then 100X100\r\n //this block of code calculate scale(we can do it another way, but this way it more clear to read)\r\n int scale = 1;\r\n int PowerOf2 = 0;\r\n int ResW = CurrentWidth;\r\n int ResH = CurrentHeight;\r\n if (ResW > IMAGE_BIGGER_SIDE_SIZE || ResH > IMAGE_BIGGER_SIDE_SIZE) {\r\n while (1 == 1) {\r\n PowerOf2++;\r\n scale = (int) Math.pow(2, PowerOf2);\r\n ResW = (int) ((double) opt.outWidth / (double) scale);\r\n ResH = (int) ((double) opt.outHeight / (double) scale);\r\n if (Math.max(ResW, ResH) < IMAGE_BIGGER_SIDE_SIZE) {\r\n PowerOf2--;\r\n scale = (int) Math.pow(2, PowerOf2);\r\n ResW = (int) ((double) opt.outWidth / (double) scale);\r\n ResH = (int) ((double) opt.outHeight / (double) scale);\r\n break;\r\n }\r\n\r\n }\r\n }\r\n\r\n\r\n //Decode our image using scale that we calculated\r\n BitmapFactory.Options opt2 = new BitmapFactory.Options();\r\n opt2.inSampleSize = scale;\r\n //opt2.inScaled = false;\r\n b = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length, opt2);\r\n\r\n\r\n //calculating new width and height\r\n int w = b.getWidth();\r\n int h = b.getHeight();\r\n if (w >= h) {\r\n w = IMAGE_BIGGER_SIDE_SIZE;\r\n h = (int) ((double) b.getHeight() * ((double) w / b.getWidth()));\r\n } else {\r\n h = IMAGE_BIGGER_SIDE_SIZE;\r\n w = (int) ((double) b.getWidth() * ((double) h / b.getHeight()));\r\n }\r\n\r\n\r\n //if we lucky and image already has correct sizes after quick scaling - return result\r\n if (opt2.outHeight == h && opt2.outWidth == w) {\r\n return b;\r\n }\r\n\r\n\r\n //we scaled our image as match as possible using quick method\r\n //and now we need to scale image to exactly size\r\n b = Bitmap.createScaledBitmap(b, w, h, true);\r\n\r\n\r\n return b;\r\n }",
"public static MutableImage fromBase64String(String base64Image)\n throws IOException {\n if (base64Image == null) {\n return null;\n }\n\n var base64 = base64Image.replaceFirst(\"(?is)^.*?base64,(.*)$\", \"$1\");\n var bais = new ByteArrayInputStream(\n Base64.getMimeDecoder().decode(base64));\n return new MutableImage(ImageIO.read(bais));\n }",
"void xsetSignatureImage(org.apache.xmlbeans.XmlBase64Binary signatureImage);",
"public static void main(String[] args) throws IOException {\n String strImg=\"iVBORw0KGgoAAAANSUhEUgAAADwAAAAeCAYAAABwmH1PAAAAAXNSR0IArs4c6QAAAARnQU1BAACx\\n\" +\n \"jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGMSURBVFhH7ZUxbsIwFIYZK7F17h06darEzsLQ\\n\" +\n \"E1RsXIAdMXIANrgAAzMT4go5kBs7/sOLY+e9tGksWxk+yXJ+XvI923hWFIUampfZh8H3LDaTcO5M\\n\" +\n \"wrkzCfs5q8Nqrg6X5vzn25eBzlX4836E2ctafZe5mt3Zn2MQCN/UaVO9JPRRTXE+/0SYtbLPTNWk\\n\" +\n \"30h3C9/3aqsLWzgBiHN5XFuy2rYpm716kPnHcVH+bqFOd5rlCQtDVnfRjjuFSR7inLCs9ljCFIlw\\n\" +\n \"yfvy1YA8xDW+vEFSO7SlnSZIGFQYQLxuQDkXFJfWtjkcge3x5s8x/Iuwm6fyLXFB7etOS9Ltiz+7\\n\" +\n \"tbo6WY5RhF2ouB531ra12itabeu+Kx1FmELFQSPTOr/ArnLPqymqML2eIN6SH3qF8VLfw5oRhGkW\\n\" +\n \"4npM5U0DTOYPZzimsKEjS8Wre3ceaIAc2ZaODBV36duAJIQBxEPyGq4BSQlTOHHgiicrDKTiIHlh\\n\" +\n \"IBXPRhhw4tkJg5C4WFh0XyfAJJw7k3DeFOoHaIAJVpYI2HsAAAAASUVORK5CYII=\";\n\n\n\n\n String base64Img=null;\n HttpRequester httprequest = new HttpRequester();\n\n CloseableHttpClient httpClient =null;\n String url=\"https://creditcard.ecitic.com/citiccard/cppnew/entry.do?func=entryebank&ebankPage=mainpage\";\n httpClient = HttpClients.createDefault();\n CookieStore cookieStore = new BasicCookieStore();\n HttpContext localContext = new BasicHttpContext();\n localContext.setAttribute(\"http.cookie-store\", cookieStore);\n RequestConfig.custom().setConnectTimeout(20000);\n RequestConfig.custom().setSocketTimeout(20000);\n RequestConfig.custom().setConnectionRequestTimeout(20000);\n RequestConfig requestConfig = RequestConfig.custom().build();\n Map<String, String> requestHeaderMap=new HashMap<String, String>();\n requestHeaderMap.put(\"Accept-Encoding\", \"gzip, deflate\");\n requestHeaderMap.put(\"Host\", \"creditcard.ecitic.com\");\n requestHeaderMap.put(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0\");\n requestHeaderMap.put(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n requestHeaderMap.put(\"Connection\", \"Keep-Alive\");\n requestHeaderMap.put(\"Cache-Control\", \"private\");\n requestHeaderMap.put(\"Accept-Language\", \"zh-CN\");\n// if (!StringUtil.isEmpty(userIp)&&!userIp.equals(\"127.0.0.1\")) {\n// requestHeaderMap.put(\"X-Forwarded-For\", userIp);\n// }\n// logger.info(bean.getCuserId()+\"zhongxin userIp=\"+userIp);\n String content= HpClientUtil.httpGet(url, requestHeaderMap, httpClient, localContext, \"GBK\");\n\n String channel=content.substring(content.indexOf(\"var channel\"), content.indexOf(\"var source\"));\n String source =content.substring(content.indexOf(\"var source\"), content.indexOf(\"var from\"));\n channel=channel.substring(channel.indexOf(\"\\\"\")+1, channel.lastIndexOf(\"\\\"\"));\n source=source.substring(source.indexOf(\"\\\"\") + 1, source.lastIndexOf(\"\\\"\"));\n String vcodeUrl=\"https://creditcard.ecitic.com/citiccard/cppnew/jsp/valicode.jsp?time=\"+System.currentTimeMillis();\n\n\n BufferedImage localBufferedImage=null;\n localBufferedImage=HpClientUtil.getRandomImageOfJPEG(vcodeUrl, requestHeaderMap, httpClient, localContext, requestConfig);\n base64Img= BankHelper.GetImageBase64(localBufferedImage, \"jpeg\");\n System.out.println(base64Img);\n url = \"http://192.168.3.50:8080/captcha/hack?captcha=\";\n\n try {\n // url = java.net.URLDecoder.decode(url, \"utf-8\");\n strImg= java.net.URLEncoder.encode(base64Img, \"utf-8\");\n url = url +strImg + \"&bankid=2&imgtype=1\" ;\n HttpRespons hr = httprequest.sendGet(url);\n //获取招商银行的登录sessionID\n content=hr.getContent();\n System.out.println(content);\n JSONObject json=JSONObject.parseObject(content);\n System.out.println(json.getString(\"text\"));\n\n\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n System.out.println(url);\n GenerateImage(base64Img);\n }",
"public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }",
"private BufferedImage imageFromBase64(final String imageString) {\r\n\t\ttry {\r\n\t\t\tfinal boolean useCache=ImageIO.getUseCache();\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.setUseCache(false); /* Wird benötigt, wenn im Stream nicht gesprungen werden kann, was bei einem ByteArrayInputStream nun definitiv möglich ist. */\r\n\t\t\t\treturn ImageIO.read(new ByteArrayInputStream(Base64.getDecoder().decode(imageString)));\r\n\t\t\t} finally {\r\n\t\t\t\tImageIO.setUseCache(useCache);\r\n\t\t\t}\r\n\t\t} catch (IOException | IllegalArgumentException e) {return null;}\r\n\t}",
"public static String getImage(Drawable drawable,String path) {\n File cheakfile = new File( path );\n String base64String = null;\n\n if(drawable!=null) {\n //\n File file = new File(path);\n Bitmap bitmap=((BitmapDrawable)drawable).getBitmap();\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100 /*ignored for PNG*/, bos);\n byte[] bitmapdata = bos.toByteArray();\n base64String = Base64.encodeToString(bitmapdata, Base64.DEFAULT);\n \n\n //write the bytes in file\n // FileOutputStream fos;\n // try {\n // fos = new FileOutputStream(file);\n // fos.write(bitmapdata);\n // } catch (IOException e) {\n // // TODO Auto-generated catch block\n // e.printStackTrace();\n // }\n // \n }\n\n return base64String;\n }",
"public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n }\n\n ;\n\n @Override\n protected String doInBackground(Void... params) {\n\n //bitmap = Bitmap.createScaledBitmap(bitmap, original_width, original_height, true);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n\n // Put converted Image string into Async Http Post param\n params.add(new BasicNameValuePair(\"image\", encodedString));\n // Trigger Image upload\n new upload_image().execute();\n }\n }.execute(null, null, null);\n }",
"private Base64(){}",
"public static Bitmap decodeBase64(String input) \n\t\t{\n\t\t byte[] decodedByte = Base64.decode(input, 0);\n\t\t return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length); \n\t\t}",
"public void encodeImagetoString() {\n new AsyncTask<Void, Void, String>() {\n\n protected void onPreExecute() {\n\n };\n\n @Override\n protected String doInBackground(Void... params) {\n BitmapFactory.Options options = null;\n options = new BitmapFactory.Options();\n options.inSampleSize = 3;\n bitmap = BitmapFactory.decodeFile(imgPath,\n options);\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n prgDialog.setMessage(\"Calling Upload\");\n // Put converted Image string into Async Http Post param\n params.put(\"image\", encodedString);\n params.put(\"groupid\",gr_id[spinner.getSelectedItemPosition()]);\n params.put(\"userid\", 1);//userid will be the user who has logged in from the application\n // Trigger Image upload\n triggerImageUpload();\n }\n }.execute(null, null, null);\n }",
"public void createScaledImage(String location, int type, int orientation, int session, int database_id) {\n\n // find portrait or landscape image\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(location, options);\n final int imageHeight = options.outHeight; //find the width and height of the original image.\n final int imageWidth = options.outWidth;\n\n int outputHeight = 0;\n int outputWidth = 0;\n\n\n //set the output size depending on type of image\n switch (type) {\n case EdittingGridFragment.SIZE4R :\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 1800;\n outputHeight = 1200;\n } else if (orientation == EdittingGridFragment.PORTRAIT) {\n outputWidth = 1200;\n outputHeight = 1800;\n }\n break;\n case EdittingGridFragment.SIZEWALLET:\n if (orientation == EdittingGridFragment.LANDSCAPE) {\n outputWidth = 953;\n outputHeight = 578;\n } else if (orientation ==EdittingGridFragment.PORTRAIT ) {\n outputWidth = 578;\n outputHeight = 953;\n }\n\n break;\n case EdittingGridFragment.SIZESQUARE:\n outputWidth = 840;\n outputHeight = 840;\n break;\n }\n\n assert outputHeight != 0 && outputWidth != 0;\n\n\n //fit images\n //FitRectangles rectangles = new FitRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n //scaled images\n ScaledRectangles rectangles = new ScaledRectangles((int) outputWidth, (int) outputHeight, imageWidth, imageHeight);\n\n Rect canvasSize = rectangles.getCanvasSize();\n Rect canvasImageCoords = rectangles.getCanvasImageCoords();\n Rect imageCoords = rectangles.getImageCoords();\n\n\n\n /*\n //set the canvas size based on the type of image\n Rect canvasSize = new Rect(0, 0, (int) outputWidth, (int) outputHeight);\n Rect canvasImageCoords = new Rect();\n //Rect canvasImageCoords = new Rect (0, 0, outputWidth, outputHeight); //set to use the entire canvas\n Rect imageCoords = new Rect(0, 0, imageWidth, imageHeight);\n //Rect imageCoords = new Rect();\n\n\n // 3 cases, exactfit, canvas width larger, canvas height larger\n if ((float) outputHeight/outputWidth == (float) imageHeight/imageWidth) {\n canvasImageCoords.set(canvasSize);\n //imageCoords.set(0, 0, imageWidth, imageHeight); //map the entire image to the entire canvas\n Log.d(\"Async\", \"Proportionas Equal\");\n\n }\n\n\n\n else if ( (float) outputHeight/outputWidth > (float) imageHeight/imageWidth) {\n //blank space above and below image\n //find vdiff\n\n\n //code that fits the image without whitespace\n Log.d(\"Async\", \"blank space above and below\");\n\n float scaleFactor = (float)imageHeight / (float) outputHeight; //amount to scale the canvas by to match the height of the image.\n int scaledCanvasWidth = (int) (outputWidth * scaleFactor);\n int hDiff = (imageWidth - scaledCanvasWidth)/2;\n imageCoords.set (hDiff, 0 , imageWidth - hDiff, imageHeight);\n\n\n\n //code fits image with whitespace\n float scaleFactor = (float) outputWidth / (float) imageWidth;\n int scaledImageHeight = (int) (imageHeight * scaleFactor);\n assert scaledImageHeight < outputHeight;\n\n int vDiff = (outputHeight - scaledImageHeight)/2;\n canvasImageCoords.set(0, vDiff, outputWidth, outputHeight - vDiff);\n\n\n\n } else if ((float) outputHeight/outputWidth < (float) imageHeight/imageWidth) {\n //blank space to left and right of image\n\n\n //fits the image without whitespace\n float scaleFactor = (float) imageWidth / (float) outputWidth;\n int scaledCanvasHeight = (int) (outputHeight * scaleFactor);\n int vDiff = (imageHeight - scaledCanvasHeight)/2;\n imageCoords.set(0, vDiff, imageWidth, imageHeight - vDiff);\n\n //fits image with whitespace\n\n Log.d(\"Async\", \"blank space left and right\");\n float scaleFactor = (float) outputHeight / (float) imageHeight;\n int scaledImageWidth = (int) (imageWidth * scaleFactor);\n assert scaledImageWidth < outputWidth;\n\n int hDiff = (outputWidth - scaledImageWidth)/2;\n\n canvasImageCoords.set(hDiff, 0, outputWidth - hDiff, outputHeight);\n }\n\n */\n\n Log.d(\"Async\", \"Canvas Image Coords:\" + canvasImageCoords.toShortString());\n\n SaveImage imageSaver = new SaveImage(getApplicationContext(), database);\n ImageObject imageObject = new ImageObject(location);\n Bitmap imageBitmap = imageObject.getImageBitmap();\n int sampleSize = imageObject.getSampleSize();\n\n Rect sampledImageCoords = imageSaver.getSampledCoordinates(imageCoords, sampleSize);\n\n System.gc();\n BackgroundObject backgroundObject = new BackgroundObject(outputWidth, outputHeight);\n Bitmap background = backgroundObject.getBackground();\n\n\n background = imageSaver.drawOnBackground(background, imageBitmap,\n sampledImageCoords, canvasImageCoords);\n\n imageSaver.storeImage(background, database_id, session);\n background.recycle();\n\n }",
"public String getBase64EncodedPNG()\n\t{\n\t\tString base64Png = null;\n\t\tByteArrayOutputStream output = new ByteArrayOutputStream();\n\t\ttry\n\t\t{\n\t\t\tif (getBlackWhiteBitmap().compress(Bitmap.CompressFormat.PNG, 100, output))\n\t\t\t{\n\t\t\t\tbyte[] imgData = output.toByteArray();\n\t\t\t\tbase64Png = Base64.encodeToString(imgData, Base64.DEFAULT);\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn base64Png;\n\t}",
"public static String bitmapEncodeTobase64(Bitmap image) {\n Bitmap immage = image;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n immage.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n String imageEncoded = Base64.encodeToString(b, Base64.DEFAULT);\n return imageEncoded;\n }",
"public InputStream mo12944a(String str) {\n if (str.startsWith(\"data:image\")) {\n int indexOf = str.indexOf(44);\n if (indexOf == -1) {\n throw new IllegalArgumentException(\"Missing comma in data URL.\");\n } else if (str.substring(0, indexOf).endsWith(\";base64\")) {\n return new ByteArrayInputStream(Base64.decode(str.substring(indexOf + 1), 0));\n } else {\n throw new IllegalArgumentException(\"Not a base64 image data URL.\");\n }\n } else {\n throw new IllegalArgumentException(\"Not a valid image data URL.\");\n }\n }",
"@Override\n\t\t\tpublic void onDataCallBack(int code, Bitmap avatar) {\n\t\t\t\tiamgeView.setImageBitmap(avatar);\n\t\t\t}",
"public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n Bundle extras = data.getExtras();\n Bitmap bmp = (Bitmap) extras.get(\"data\");\n iv.setImageBitmap(bmp);\n }\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n encodedImage = Base64.encodeToString(data, Base64.DEFAULT);\n galleryId = \"Company\";\n showEnterLabelDialog();\n camera.startPreview();\n }",
"public static String encodeToBase64(Bitmap image) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n image.compress(Bitmap.CompressFormat.PNG, 100, baos);\n byte[] b = baos.toByteArray();\n return Base64.encodeToString(b, Base64.DEFAULT);\n }",
"@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ref.child(\"user\").child(fUser.getUid()).child(\"age\").setValue(age);\n ref.child(\"user\").child(fUser.getUid()).child(\"bio\").setValue(bio);\n //object to convert image to byte array for storage on firebase\n ByteArrayOutputStream imgConverted = new ByteArrayOutputStream();\n\n //save the image as a .jpg file\n img.compress(Bitmap.CompressFormat.JPEG, 100, imgConverted);\n\n String imageEncoded = Base64.encodeToString(imgConverted.toByteArray(), Base64.DEFAULT);\n ref.child(\"user\").child(fUser.getUid()).child(\"image\").setValue(imageEncoded);\n }",
"private void uploadImage(byte[] imageData) {\n\n }",
"public static String getStringBase64Bitmap(Bitmap bitmap){\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n byte[] bitmapBytes = bos.toByteArray();\n String encodedImage = Base64.encodeToString(bitmapBytes, Base64.DEFAULT);\n Log.i(\"getStringBase64Bitmap\",encodedImage);\n return encodedImage;\n }",
"public void setBase64Binary(javax.activation.DataHandler param) {\n this.localBase64Binary = param;\n }",
"public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"public static byte[] getResizedImageData(byte[] image, int width,\n\t\t\tint height, int widthLimit, int heightLimit, int byteLimit) {\n\t\tif (image == null) {\n\t\t\treturn null;\n\t\t}\n\t\t// int width = WIDTH;\n\t\t// int height = HEIGHT;\n\n\t\t// int widthLimit = WIDTH_LIMIT;\n\t\t// int heightLimit = HEIGHT_LIMIT;\n\n\t\t// int byteLimit = byteLimit;\n\n\t\tint outWidth = width;\n\t\tint outHeight = height;\n\n\t\tfloat scaleFactor = 1.F;\n\t\twhile ((outWidth * scaleFactor > widthLimit)\n\t\t\t\t|| (outHeight * scaleFactor > heightLimit)) {\n\t\t\tscaleFactor *= .75F;\n\t\t}\n\n\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t// Log.v(TAG, \"getResizedBitmap: wlimit=\" + widthLimit +\n\t\t// \", hlimit=\" + heightLimit + \", sizeLimit=\" + byteLimit +\n\t\t// \", width=\" + width + \", height=\" + height +\n\t\t// \", initialScaleFactor=\" + scaleFactor +\n\t\t// \", uri=\" + uri);\n\t\t// }\n\n\t\tInputStream input = null;\n\t\ttry {\n\t\t\tByteArrayOutputStream os = null;\n\t\t\tint attempts = 1;\n\t\t\tint sampleSize = 1;\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\t\tint quality = IMAGE_COMPRESSION_QUALITY;\n\t\t\tBitmap b = null;\n\n\t\t\t// In this loop, attempt to decode the stream with the best possible\n\t\t\t// subsampling (we\n\t\t\t// start with 1, which means no subsampling - get the original\n\t\t\t// content) without running\n\t\t\t// out of memory.\n\t\t\tdo {\n\t\t\t\tinput = new ByteArrayInputStream(image);\n\t\t\t\toptions.inSampleSize = sampleSize;\n\t\t\t\ttry {\n\t\t\t\t\tb = BitmapFactory.decodeStream(input, null, options);\n\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\treturn null; // Couldn't decode and it wasn't because of\n\t\t\t\t\t\t\t\t\t\t// an exception,\n\t\t\t\t\t\t\t\t\t\t// bail.\n\t\t\t\t\t}\n\t\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedBitmap: img too large to decode (OutOfMemoryError), \"\n\t\t\t\t\t// +\n\t\t\t\t\t// \"may try with larger sampleSize. Curr sampleSize=\" +\n\t\t\t\t\t// sampleSize);\n\t\t\t\t\tsampleSize *= 2; // works best as a power of two\n\t\t\t\t\tattempts++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} finally {\n\t\t\t\t\tif (input != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\n\t\t\tif (b == null) {\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)\n\t\t\t\t// && attempts >= NUMBER_OF_RESIZE_ATTEMPTS) {\n\t\t\t\t// Log.v(TAG,\n\t\t\t\t// \"getResizedImageData: gave up after too many attempts to resize\");\n\t\t\t\t// }\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tboolean resultTooBig = true;\n\t\t\tattempts = 1; // reset count for second loop\n\t\t\t// In this loop, we attempt to compress/resize the content to fit\n\t\t\t// the given dimension\n\t\t\t// and file-size limits.\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif (options.outWidth > widthLimit\n\t\t\t\t\t\t\t|| options.outHeight > heightLimit\n\t\t\t\t\t\t\t|| (os != null && os.size() > byteLimit)) {\n\t\t\t\t\t\t// The decoder does not support the inSampleSize option.\n\t\t\t\t\t\t// Scale the bitmap using Bitmap library.\n\t\t\t\t\t\tint scaledWidth = (int) (outWidth * scaleFactor);\n\t\t\t\t\t\tint scaledHeight = (int) (outHeight * scaleFactor);\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: retry scaling using \" +\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap: w=\" + scaledWidth +\n\t\t\t\t\t\t// \", h=\" + scaledHeight);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tb = Bitmap.createScaledBitmap(b, scaledWidth,\n\t\t\t\t\t\t\t\tscaledHeight, false);\n\t\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t\t// \"Bitmap.createScaledBitmap returned NULL!\");\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\n\t\t\t\t\t// Compress the image into a JPG. Start with\n\t\t\t\t\t// IMAGE_COMPRESSION_QUALITY.\n\t\t\t\t\t// In case that the image byte size is still too large\n\t\t\t\t\t// reduce the quality in\n\t\t\t\t\t// proportion to the desired byte size.\n\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\tint jpgFileSize = os.size();\n\t\t\t\t\tif (jpgFileSize > byteLimit) {\n\t\t\t\t\t\tquality = (quality * byteLimit) / jpgFileSize; // watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// int\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division!\n\t\t\t\t\t\tif (quality < MINIMUM_IMAGE_COMPRESSION_QUALITY) {\n\t\t\t\t\t\t\tquality = MINIMUM_IMAGE_COMPRESSION_QUALITY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: compress(2) w/ quality=\" +\n\t\t\t\t\t\t// quality);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\t}\n\t\t\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedImageData - image too big (OutOfMemoryError), will try \"\n\t\t\t\t\t// + \" with smaller scale factor, cur scale factor: \" +\n\t\t\t\t\t// scaleFactor);\n\t\t\t\t\t// fall through and keep trying with a smaller scale factor.\n\t\t\t\t}\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t// Log.v(TAG, \"attempt=\" + attempts\n\t\t\t\t// + \" size=\" + (os == null ? 0 : os.size())\n\t\t\t\t// + \" width=\" + outWidth * scaleFactor\n\t\t\t\t// + \" height=\" + outHeight * scaleFactor\n\t\t\t\t// + \" scaleFactor=\" + scaleFactor\n\t\t\t\t// + \" quality=\" + quality);\n\t\t\t\t// }\n\t\t\t\tscaleFactor *= .75F;\n\t\t\t\tattempts++;\n\t\t\t\tresultTooBig = os == null || os.size() > byteLimit;\n\t\t\t} while (resultTooBig && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\t\t\tb.recycle(); // done with the bitmap, release the memory\n\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE) && resultTooBig) {\n\t\t\t// Log.v(TAG,\n\t\t\t// \"getResizedImageData returning NULL because the result is too big: \"\n\t\t\t// +\n\t\t\t// \" requested max: \" + byteLimit + \" actual: \" + os.size());\n\t\t\t// }\n\n\t\t\treturn resultTooBig ? null : os.toByteArray();\n\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}",
"@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onPictureTaken(byte[] data, Camera camera) {\n Log.d(\"Hawk.CameraHandler\",\"onPictureCalled\");\n //\n bmp = BitmapFactory.decodeByteArray(data, 0, data.length); //Convert raw byte array to Bitmap format\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream); //Write the Bitmap to ByteArrayOutputStream\n byte[] byteArray = byteArrayOutputStream .toByteArray(); //Get byte array from ByteArrayOutputStream\n //\n encodedImage=Base64.getEncoder().encodeToString(byteArray); //Convert the byte array to Base64 encoded string\n camera.stopPreview(); //Stop the preview\n Log.d(\"EncodedImage\",\"starthere#\"+encodedImage+\"###ENDED\");\n picReady=true; //Indicates that encoded string is ready\n camera.release();\n }",
"public void run() {\n\t\tbyte data[] = getData();\n\t\tEncodedImage image = null;\n\t\tBitmapField bitmapField = null;\n\t\tif (data != null) {\n\t\t\ttry {\n\t\t\t\timage = EncodedImage.createEncodedImage(data, 0, -1,\"image/png\");\n\t\t\t\tbitmapField = new BitmapField();\n\t\t\t\t// The dimensions for a image to display well 170 width x 90 height\n\t\t\t\tbitmapField.setImage(image);\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t}\n\t\t}\n\t\tthis.bitmapField = bitmapField;\n\t}",
"public String saveImage(String name, String base64) {\n\t\tString pathFile = pathFileBase + name;\n\t\ttry {\n\t\t\tFileOutputStream imageOutFile = new FileOutputStream(pathFile);\n\t\t\tbyte[] imageByteArray = Base64.getDecoder().decode(base64);\n\t\t\timageOutFile.write(imageByteArray);\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image not found\" + e);\n\t\t\treturn null;\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"Exception while writing the Image \" + ioe);\n\t\t\treturn null;\n\t\t}\n\t\treturn pathFile;\n\t}",
"public void decodeImage(String completeImageData, ImageView imageView) {\n if (completeImageData == null) { return; }\n\n // Incase you're storing into aws or other places where we have extension stored in the starting.\n String imageDataBytes = completeImageData.substring(completeImageData.indexOf(\",\")+1);\n InputStream stream = new ByteArrayInputStream(Base64.decode(imageDataBytes.getBytes(), Base64.DEFAULT));\n Bitmap bitmap = BitmapFactory.decodeStream(stream);\n imageView.setImageBitmap(bitmap);\n }",
"private Bitmap decodeBitmapBase64 (String encodedString)\t{\n\t\ttry {\n\n\t\t\tbyte[] decodedString = Base64.decode(encodedString.getBytes(\"UTF-8\"), Base64.DEFAULT);\n\t\t\tBitmap decodedImage = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\n\n\t\t\treturn decodedImage;\n\n\t\t} catch (Exception e) {\n\n\t\t\tToast.makeText(getBaseContext(), \"Catch # 12:19\", Toast.LENGTH_LONG).show();\n\t\t\treturn null;\n\n\t\t}\n\n\t}",
"public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n alreadyExisting = false;\n\n try {\n Uri uri = data.getData();\n if (isImageSizeLegal(uri)) {\n imageUri = uri;\n setImageFromUrl(imageUri);\n }\n } catch (Exception e) {\n FirebaseReporter.reportException(e, \"Couldn't read user's photo data\");\n e.printStackTrace();\n }\n }",
"public static Bitmap decodeBase64(String input){\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedByte,0,decodedByte.length);\n }",
"private void putProfPic(Blob gbPhoto) throws SQLException, FileNotFoundException, IOException {\n if(gbPhoto == null){\n ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();\n File file = new File(externalContext.getRealPath(\"\")+\"\\\\resources\\\\images\\\\user_default.png\");\n imagePic = new OracleSerialBlob(FileUtils.getBytes(file));\n Long size = imagePic.length();\n photo_profile = new ByteArrayContent(imagePic.getBytes(1, size.intValue()));\n }else{\n imagePic = gbPhoto;\n Long size = gbPhoto.length();\n photo_profile = new ByteArrayContent(gbPhoto.getBytes(1, size.intValue()));\n }\n }",
"public String getEncodedImage() {\n String base64String = Base64.getEncoder().encodeToString(profilePictureBytes);\n return base64String;\n }",
"public static byte[] getResizedImageData(int width, int height,\n\t\t\tint widthLimit, int heightLimit, int byteLimit, Uri uri,\n\t\t\tContext context) {\n\t\tint outWidth = width;\n\t\tint outHeight = height;\n\n\t\tfloat scaleFactor = 1.F;\n\t\twhile ((outWidth * scaleFactor > widthLimit)\n\t\t\t\t|| (outHeight * scaleFactor > heightLimit)) {\n\t\t\tscaleFactor *= .75F;\n\t\t}\n\n\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t// Log.v(TAG, \"getResizedBitmap: wlimit=\" + widthLimit +\n\t\t// \", hlimit=\" + heightLimit + \", sizeLimit=\" + byteLimit +\n\t\t// \", width=\" + width + \", height=\" + height +\n\t\t// \", initialScaleFactor=\" + scaleFactor +\n\t\t// \", uri=\" + uri);\n\t\t// }\n\n\t\tInputStream input = null;\n\t\ttry {\n\t\t\tByteArrayOutputStream os = null;\n\t\t\tint attempts = 1;\n\t\t\tint sampleSize = 1;\n\t\t\tBitmapFactory.Options options = new BitmapFactory.Options();\n\t\t\tint quality = IMAGE_COMPRESSION_QUALITY;\n\t\t\tBitmap b = null;\n\n\t\t\t// In this loop, attempt to decode the stream with the best possible\n\t\t\t// subsampling (we\n\t\t\t// start with 1, which means no subsampling - get the original\n\t\t\t// content) without running\n\t\t\t// out of memory.\n\t\t\tdo {\n\t\t\t\tinput = context.getContentResolver().openInputStream(uri);\n\t\t\t\toptions.inSampleSize = sampleSize;\n\t\t\t\ttry {\n\t\t\t\t\tb = BitmapFactory.decodeStream(input, null, options);\n\t\t\t\t\tif (b == null) {\n\t\t\t\t\t\treturn null; // Couldn't decode and it wasn't because of\n\t\t\t\t\t\t\t\t\t\t// an exception,\n\t\t\t\t\t\t\t\t\t\t// bail.\n\t\t\t\t\t}\n\t\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedBitmap: img too large to decode (OutOfMemoryError), \"\n\t\t\t\t\t// +\n\t\t\t\t\t// \"may try with larger sampleSize. Curr sampleSize=\" +\n\t\t\t\t\t// sampleSize);\n\t\t\t\t\tsampleSize *= 2; // works best as a power of two\n\t\t\t\t\tattempts++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} finally {\n\t\t\t\t\tif (input != null) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tinput.close();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} while (b == null && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\n\t\t\tif (b == null) {\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)\n\t\t\t\t// && attempts >= NUMBER_OF_RESIZE_ATTEMPTS) {\n\t\t\t\t// Log.v(TAG,\n\t\t\t\t// \"getResizedImageData: gave up after too many attempts to resize\");\n\t\t\t\t// }\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tboolean resultTooBig = true;\n\t\t\tattempts = 1; // reset count for second loop\n\t\t\t// In this loop, we attempt to compress/resize the content to fit\n\t\t\t// the given dimension\n\t\t\t// and file-size limits.\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tif (options.outWidth > widthLimit\n\t\t\t\t\t\t\t|| options.outHeight > heightLimit\n\t\t\t\t\t\t\t|| (os != null && os.size() > byteLimit)) {\n\t\t\t\t\t\t// The decoder does not support the inSampleSize option.\n\t\t\t\t\t\t// Scale the bitmap using Bitmap library.\n\t\t\t\t\t\tint scaledWidth = (int) (outWidth * scaleFactor);\n\t\t\t\t\t\tint scaledHeight = (int) (outHeight * scaleFactor);\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: retry scaling using \" +\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap: w=\" + scaledWidth +\n\t\t\t\t\t\t// \", h=\" + scaledHeight);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tb = Bitmap.createScaledBitmap(b, scaledWidth,\n\t\t\t\t\t\t\t\tscaledHeight, false);\n\t\t\t\t\t\t// if (b == null) {\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"Bitmap.createScaledBitmap returned NULL!\");\n\t\t\t\t\t\t// }\n\t\t\t\t\t\t// return null;\n\t\t\t\t\t\t// }\n\t\t\t\t\t}\n\n\t\t\t\t\t// Compress the image into a JPG. Start with\n\t\t\t\t\t// IMAGE_COMPRESSION_QUALITY.\n\t\t\t\t\t// In case that the image byte size is still too large\n\t\t\t\t\t// reduce the quality in\n\t\t\t\t\t// proportion to the desired byte size.\n\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\tint jpgFileSize = os.size();\n\t\t\t\t\tif (jpgFileSize > byteLimit) {\n\t\t\t\t\t\tquality = (quality * byteLimit) / jpgFileSize; // watch\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// int\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// division!\n\t\t\t\t\t\tif (quality < MINIMUM_IMAGE_COMPRESSION_QUALITY) {\n\t\t\t\t\t\t\tquality = MINIMUM_IMAGE_COMPRESSION_QUALITY;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t\t\t// Log.v(TAG,\n\t\t\t\t\t\t// \"getResizedImageData: compress(2) w/ quality=\" +\n\t\t\t\t\t\t// quality);\n\t\t\t\t\t\t// }\n\n\t\t\t\t\t\tos = new ByteArrayOutputStream();\n\t\t\t\t\t\tb.compress(CompressFormat.JPEG, quality, os);\n\t\t\t\t\t}\n\t\t\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t\t\t// Log.w(TAG,\n\t\t\t\t\t// \"getResizedImageData - image too big (OutOfMemoryError), will try \"\n\t\t\t\t\t// + \" with smaller scale factor, cur scale factor: \" +\n\t\t\t\t\t// scaleFactor);\n\t\t\t\t\t// fall through and keep trying with a smaller scale factor.\n\t\t\t\t}\n\t\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE)) {\n\t\t\t\t// Log.v(TAG, \"attempt=\" + attempts\n\t\t\t\t// + \" size=\" + (os == null ? 0 : os.size())\n\t\t\t\t// + \" width=\" + outWidth * scaleFactor\n\t\t\t\t// + \" height=\" + outHeight * scaleFactor\n\t\t\t\t// + \" scaleFactor=\" + scaleFactor\n\t\t\t\t// + \" quality=\" + quality);\n\t\t\t\t// }\n\t\t\t\tscaleFactor *= .75F;\n\t\t\t\tattempts++;\n\t\t\t\tresultTooBig = os == null || os.size() > byteLimit;\n\t\t\t} while (resultTooBig && attempts < NUMBER_OF_RESIZE_ATTEMPTS);\n\t\t\tb.recycle(); // done with the bitmap, release the memory\n\t\t\t// if (Log.isLoggable(LogTag.APP, Log.VERBOSE) && resultTooBig) {\n\t\t\t// Log.v(TAG,\n\t\t\t// \"getResizedImageData returning NULL because the result is too big: \"\n\t\t\t// +\n\t\t\t// \" requested max: \" + byteLimit + \" actual: \" + os.size());\n\t\t\t// }\n\n\t\t\treturn resultTooBig ? null : os.toByteArray();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t} catch (java.lang.OutOfMemoryError e) {\n\t\t\t// Log.e(TAG, e.getMessage(), e);\n\t\t\treturn null;\n\t\t}\n\t}",
"private void setUpImage(byte[] bytes) {\n\n ImageView imageview = (ImageView)findViewById(R.id.imgEmpPhoto);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n imageview.setImageBitmap(bitmap);\n }",
"@Schema(example = \"iVBORw0KGgoAAAANSUhEUgAAACIAAAAoCAYAAACb3CikAAAABGdBTUEAALGPC\", description = \"Binary image content, base64 encoded.\")\n public String getImage() {\n return image;\n }",
"private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }",
"@Override\n protected String doInBackground(Void... params) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n return \"\";\n }",
"private static String descifrarBase64(String arg) {\n Base64.Decoder decoder = Base64.getDecoder();\n byte[] decodedByteArray = decoder.decode(arg);\n\n return new String(decodedByteArray);\n }",
"@Override\n\tpublic String getImagePath64X64() {\n\t\treturn null;\n\t}",
"byte[] getProfileImage();",
"private void setPic() {\n int targetW = imageView.getMaxWidth();\n int targetH = imageView.getMaxHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n bitmap = Bitmap.createScaledBitmap(bitmap, 1280, 960,false);\n Log.d(\"demo\", \"setPic: \"+ bitmap.getWidth()+\" \"+bitmap.getHeight());\n Log.d(\"demo\", \"setPic: \"+ bitmap.getByteCount()/1000);\n imageView.setImageBitmap(bitmap);\n }",
"public String emitAsImageBase64(int width,int height) {\n BufferedImage img = emitAsBufferedImage(width,height);\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }",
"public static byte[] decode(String encoded) {\n \n if (encoded == null)\n return null;\n \n char[] base64Data = encoded.toCharArray();\n // remove white spaces\n int len = removeWhiteSpace(base64Data);\n \n if (len%FOURBYTE != 0) {\n return null;//should be divisible by four\n }\n \n int numberQuadruple = (len/FOURBYTE );\n \n if (numberQuadruple == 0)\n return new byte[0];\n \n byte decodedData[] = null;\n byte b1=0,b2=0,b3=0, b4=0, marker0=0, marker1=0;\n char d1=0,d2=0,d3=0,d4=0;\n \n int i = 0;\n int encodedIndex = 0;\n int dataIndex = 0;\n decodedData = new byte[ (numberQuadruple)*3];\n \n for (; i<numberQuadruple-1; i++) {\n \n if (!isData( (d1 = base64Data[dataIndex++]) )||\n !isData( (d2 = base64Data[dataIndex++]) )||\n !isData( (d3 = base64Data[dataIndex++]) )||\n !isData( (d4 = base64Data[dataIndex++]) ))\n return null;//if found \"no data\" just return null\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n b3 = base64Alphabet[d3];\n b4 = base64Alphabet[d4];\n \n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n }\n \n if (!isData( (d1 = base64Data[dataIndex++]) ) ||\n !isData( (d2 = base64Data[dataIndex++]) )) {\n return null;//if found \"no data\" just return null\n }\n \n b1 = base64Alphabet[d1];\n b2 = base64Alphabet[d2];\n \n d3 = base64Data[dataIndex++];\n d4 = base64Data[dataIndex++];\n if (!isData( (d3 ) ) ||\n !isData( (d4 ) )) {//Check if they are PAD characters\n if (isPad( d3 ) && isPad( d4)) { //Two PAD e.g. 3c[Pad][Pad]\n if ((b2 & 0xf) != 0)//last 4 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 1 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex] = (byte)( b1 <<2 | b2>>4 ) ;\n return tmp;\n } else if (!isPad( d3) && isPad(d4)) { //One PAD e.g. 3cQ[Pad]\n b3 = base64Alphabet[ d3 ];\n if ((b3 & 0x3 ) != 0)//last 2 bits should be zero\n return null;\n byte[] tmp = new byte[ i*3 + 2 ];\n System.arraycopy( decodedData, 0, tmp, 0, i*3 );\n tmp[encodedIndex++] = (byte)( b1 <<2 | b2>>4 );\n tmp[encodedIndex] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n return tmp;\n } else {\n return null;//an error like \"3c[Pad]r\", \"3cdX\", \"3cXd\", \"3cXX\" where X is non data\n }\n } else { //No PAD e.g 3cQl\n b3 = base64Alphabet[ d3 ];\n b4 = base64Alphabet[ d4 ];\n decodedData[encodedIndex++] = (byte)( b1 <<2 | b2>>4 ) ;\n decodedData[encodedIndex++] = (byte)(((b2 & 0xf)<<4 ) |( (b3>>2) & 0xf) );\n decodedData[encodedIndex++] = (byte)( b3<<6 | b4 );\n \n }\n \n return decodedData;\n }",
"@SuppressLint(\"StaticFieldLeak\")\n public void encodeImagetoString() {\n new AsyncTask<String, Void, String>() {\n\n protected void onPreExecute() {\n\n };\n\n @Override\n protected String doInBackground(String... params) {\n int compressVal = 100;\n\n// BitmapFactory.Options options = null;\n// options = new BitmapFactory.Options();\n// options.inSampleSize = 3;\n\n log(imgPath);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(imgPath, options);\n options.inJustDecodeBounds = false;\n options.inSampleSize = ScalingUtilities.calculateSampleSize(options.outWidth, options.outHeight, 1920,\n 1080, ScalingUtilities.ScalingLogic.FIT);\n bitmap = BitmapFactory.decodeFile(imgPath,options);\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n // Must compress the Image to reduce image size to make upload easy\n\n try {\n bitmap.compress(Bitmap.CompressFormat.JPEG, 75, stream);\n } catch (Exception e) {\n\n e.printStackTrace();\n }\n\n// int size = 10000000;\n// while ( size > 150 * 1024) {\n// if(compressVal <= 5)\n// {\n// break;\n// }\n// stream.reset();\n// bitmap.compress(Bitmap.CompressFormat.JPEG, compressVal, stream);\n// byte[] temp_byte_arr = stream.toByteArray();\n// size = temp_byte_arr.length;\n// Log.d(TAG,size+\"\");\n// compressVal-=5;\n// }\n byte[] byte_arr = stream.toByteArray();\n // Encode Image to String\n encodedString = Base64.encodeToString(byte_arr, 0);\n log(\"success\");\n return \"\";\n }\n\n @Override\n protected void onPostExecute(String msg) {\n //added by Tonny @23-Mar-2018\n Picasso.get()\n .load(new File(imgPath))\n .resize(200, 200)\n .centerCrop()\n .into(ivPreview);\n //remarked by Tonny @23-Mar-2018 older version\n// Picasso.with(con)\n// .load(new File(imgPath))\n// .resize(200, 200)\n// .centerCrop()\n// .into(ivPreview);\n //data_flag = ChatMsgContainer.message_data_type_picture;\n setupAttachedFile(ChatMsgContainer.message_data_type_picture);\n }\n }.execute(null, null, null);\n }",
"public static String convertImageToBase64(String path) {\n\n Bitmap btmp = BitmapFactory.decodeFile(path);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n btmp.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] byteArrayImage = baos.toByteArray();\n\n return Base64.encodeToString(byteArrayImage, Base64.DEFAULT);\n }",
"@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }",
"public static Bitmap decodeBase64(String input)\n {\n byte[] decodedBytes = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n \tsuper.onActivityResult(requestCode, resultCode, data);\n \t\n \tif(requestCode == RESPONSE_TAKE_PHOTO && resultCode == Activity.RESULT_OK){\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t options.inSampleSize = 4;\n\n \t Bitmap thumbnail = (Bitmap) data.getExtras().get(\"data\"); \n \t mImage.setImageBitmap(thumbnail);\n\n \t}\n }",
"private void setPic() {\n int targetW =200;\n int targetH = 300;\n\n\n\t\t/* Get the size of the image */\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n\t\t/* Figure out which way needs to be reduced less */\n int scaleFactor = 1;\n if ((targetW > 0) || (targetH > 0)) {\n scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n }\n\n\t\t/* Set bitmap options to scale the image decode target */\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n bmOptions.inPurgeable = true;\n\n\t\t/* Decode the JPEG file into a Bitmap */\n bitmap1 = BitmapFactory.decodeFile(mCurrentPhotoPath, bmOptions);\n\n Log.e(\"bitmap\", \"\" + bitmap1);\n mAdapter = new MyAdapter(Goonlineactivity2.this,TITLES,ICONS,NAME,EMAIL,PROFILE); // Creating the Adapter of MyAdapter class(which we are going to see in a bit)\n // And passing the titles,icons,header view name, header view email,\n // and header view profile picture\n\n mRecyclerView.setAdapter(mAdapter);\n //profile11.setImageBitmap(bitmap1);\n\n \t\t/* Associate the Bitmap to the ImageView */\n\n }",
"@Override\r\n\tpublic void setData(String data) {\r\n\t\tsuper.setData(data);\r\n\t\tString src = data;\r\n\t\tif (data == null) {\r\n\t\t\tsrc = \"\";\r\n\t\t}\r\n\r\n\t\tthis.image.setAttribute(\"src\", src);\r\n\t}",
"private void setPic()\n {\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n int scaleFactor = Math.min(photoW/384, photoH/512);\n\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(currentPhotoPath, bmOptions);\n imageCapture.setImageBitmap(bitmap);\n }",
"private void setPicToView(Intent picdata) {\n Bundle extras = picdata.getExtras();\n if (extras != null) {\n Bitmap photo = extras.getParcelable(\"data\");\n Drawable drawable = new BitmapDrawable(getResources(), photo);\n groupSetAvatar.setImageDrawable(drawable);\n // uploadUserAvatar(Bitmap2Bytes(photo));\n saveBitmapFile(picdata);\n\n }\n\n }",
"public void setImage(byte[] image) {\n this.image = image;\n }",
"public void setImage(byte[] image) {\n this.image = image;\n }",
"public String fromImageToString(BitmapDrawable personPhoto){\n Bitmap photoBitmap = personPhoto.getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n photoBitmap.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] photoByteFormat = stream.toByteArray();\n String encodedImage = Base64.encodeToString(photoByteFormat, Base64.NO_WRAP);\n return encodedImage;\n }",
"public static Bitmap decodeBase64(String input) {\r\n byte[] decodedBytes = Base64.decode(input, 0);\r\n return BitmapFactory.decodeByteArray(decodedBytes, 0, decodedBytes.length);\r\n }",
"public void getresponse(){\n\r\n BitmapDrawable drawable = (BitmapDrawable) pic.getDrawable();\r\n Bitmap bitmap = drawable.getBitmap();\r\n bitmap = Bitmap.createScaledBitmap(bitmap, 70, 70, true);\r\n pic.setImageBitmap(bitmap);\r\n base64=encodeTobase64(bitmap);\r\n\r\n JSONObject obj = new JSONObject();\r\n try {\r\n obj.put(\"name\", username.getText().toString());\r\n obj.put(\"designation\",designation.getText().toString() );\r\n obj.put(\"company\", company.getText().toString());\r\n obj.put(\"location\", location.getText().toString());\r\n obj.put(\"base64Image\",encodeTobase64(bitmap));\r\n obj.put(\"picture\", \"\");\r\n obj.put(\"phone\",cell.getText().toString() );\r\n obj.put(\"chat\", chat.getText().toString());\r\n obj.put(\"email\", email.getText().toString());\r\n obj.put(\"website\", link.getText().toString());\r\n obj.put(\"facebook\",fb .getText().toString());\r\n obj.put(\"linkedin\", linkedin.getText().toString());\r\n obj.put(\"whatsapp\", wno.getText().toString());\r\n obj.put(\"skype\", skype.getText().toString());\r\n obj.put(\"google\",gid.getText().toString());\r\n obj.put(\"notes\", notes.getText().toString());\r\n\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n Log.d(\"TAG\",obj.toString());\r\n\r\n\r\n final ProgressDialog pDialog = new ProgressDialog(this);\r\n pDialog.setMessage(\"Loading...\");\r\n pDialog.show();\r\n\r\n JsonObjectRequest jsonObjReq = new JsonObjectRequest(Request.Method.POST,\r\n url, obj,\r\n new Response.Listener<JSONObject>() {\r\n\r\n @Override\r\n public void onResponse(JSONObject response) {\r\n Log.d(\"TAG\", response.toString());\r\n pDialog.hide();\r\n SharedPreferences sharedPreferences = getSharedPreferences(\"mydata\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sharedPreferences.edit();\r\n String profileId = null;\r\n String profileLink = null;\r\n try {\r\n profileId = response.getString(\"profileId\");\r\n profileLink = response.getString(\"profileLink\");\r\n } catch (JSONException e) {\r\n e.printStackTrace();\r\n }\r\n editor.putString(\"profileId\", profileId );\r\n editor.putString(\"profileLink\", profileLink);\r\n editor.commit();\r\n }\r\n }, new Response.ErrorListener() {\r\n\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n VolleyLog.d(\"TAG\", \"Error: \" + error.getMessage());\r\n // hide the progress dialog\r\n pDialog.hide();\r\n }\r\n });\r\n\r\n// Adding request to request queue\r\n AppController.getInstance().addToRequestQueue(jsonObjReq, tag_json_obj);\r\n\r\n }",
"public String save(){\n this.setDrawingCacheEnabled(true);\n this.buildDrawingCache();\n //mBitmap = Bitmap.createBitmap(this.getWidth(),this.getHeight(),Bitmap.Config.ARGB_8888);\n Bitmap bmp = Bitmap.createBitmap(this.getDrawingCache());\n this.setDrawingCacheEnabled(false);\n\n ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG,100,byteArrayOutputStream);\n byte[] imgBytes=byteArrayOutputStream.toByteArray();\n\n return Base64.encodeToString(imgBytes,Base64.DEFAULT);\n\n }",
"public BufferedImage getImage() {\n\t\tString base64ImageString = getData();\n\t\tByteArrayInputStream byteStream = new ByteArrayInputStream(Base64\n\t\t\t\t.decodeBase64(base64ImageString.getBytes()));\n\t\ttry {\n\t\t\treturn ImageIO.read(byteStream);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public void setImageData(byte[] imageBytes) {\n this.profilePictureBytes = imageBytes;\n }",
"@Override\r\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\r\n Bitmap b=(Bitmap)data.getExtras().get(\"data\");\r\n i1.setImageBitmap(b);\r\n\r\n }",
"public void uploadImage(View v) {\n // When Image is selected from Gallery\n if (imgPath != null && !imgPath.isEmpty()) {\n prgDialog.setMessage(\"Converting Image to Binary Data\");\n prgDialog.show();\n // Convert image to String using Base64\n encodeImagetoString();\n // When Image is not selected from Gallery\n } else {\n Toast.makeText(\n getApplicationContext(),\n \"You must select image from gallery before you try to upload\",\n Toast.LENGTH_LONG).show();\n }\n }",
"public void setContentBlob(Blob imageBlob) {\n this.content = this.toByteArray(imageBlob);\n }",
"public String convertImage(ImageView itemImage){\n Bitmap bmp = ((BitmapDrawable)itemImage.getDrawable()).getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n String imageFile = Base64.encodeToString(byteArray, Base64.DEFAULT);\n return imageFile;\n }",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (resultCode == RESULT_OK) {\n\t\t\tswitch (requestCode) {\n\t\t\tcase REQUEST_IMAGE_CAPTURE1:\n\t\t\t\tBundle extras = data.getExtras();\n\t\t\t\tBitmap imageBitmap = (Bitmap) extras.get(\"data\");\n\n\t\t\t\timView.setImageBitmap(imageBitmap);\n\t\t\t\tBitmapDrawable drawable = (BitmapDrawable) imView.getDrawable();\n\t\t\t\tBitmap bitmap = drawable.getBitmap();\n\t\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, baos);\n\t\t\t\tbyte[] datas = baos.toByteArray();\n\t\t\t\tstrBase64 = Base64.encodeToString(datas, Base64.DEFAULT);\n\n\t\t\t\tbreak;\n\t\t\tcase REQUEST_IMAGE_CAPTURE2:\n\n\t\t\t\tBundle extras1 = data.getExtras();\n\t\t\t\tBitmap imageBitmap1 = (Bitmap) extras1.get(\"data\");\n\t\t\t\timView2.setImageBitmap(imageBitmap1);\n\t\t\t\tBitmapDrawable drawable2 = (BitmapDrawable) imView2\n\t\t\t\t\t\t.getDrawable();\n\t\t\t\tBitmap bitmap2 = drawable2.getBitmap();\n\n\t\t\t\tByteArrayOutputStream baos2 = new ByteArrayOutputStream();\n\t\t\t\tbitmap2.compress(Bitmap.CompressFormat.PNG, 100, baos2);\n\t\t\t\tbyte[] datas2 = baos2.toByteArray();\n\n\t\t\t\tstrBase642 = Base64.encodeToString(datas2, Base64.DEFAULT);\n\n\t\t\t}\n\t\t}\n\n\t}",
"private void callbitmapmethod() {\n\t\ttry {\n\t\t\tencode.clear();\n\t\t\tfor (int i = 0; i < queueItemforApproval.size(); i++) {\n\t\t\t\t/**/\n\t\t\t\tQueueString en = new QueueString();\n\t\t\t\tif (queueItemforApproval.get(i).bitmap != null) {\n\t\t\t\t\tSystem.out.println(\"bitmap is:\"\n\t\t\t\t\t\t\t+ queueItemforApproval.get(i).bitmap);\n\t\t\t\t\ten.path = convertintobase64(queueItemforApproval.get(i).bitmap);\n\t\t\t\t\tSystem.out.println(\"path is :\" + en.path);\n\t\t\t\t\t// Bitmap bitmap = decodeBase64(en.path, i);\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"bitmap is null\");\n\t\t\t\t}\n\t\t\t\tencode.add(en);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"private List<MusicVideo> setPosterImageForMusicVideos(List<MusicVideo> listOfMusicVideos){\n \n //for each music video, set the base64 of the poster image\n for(MusicVideo musicVideo : listOfMusicVideos){\n\n try{\n\n //generate the Base64 string of each music video's poster image and set it to the\n //posterImage field of each music video object\n String posterImage = musicVideo.getPosterImage() ;\n if(posterImage != null){\n\n File file = new File(posterImage) ;\n String base64 = Base64Util.convertFileToBase64(file) ;\n musicVideo.setPosterImage(base64) ;\n\n }\n\n }\n catch(IOException ex){\n\n LOGGER.log(Level.SEVERE, \"An IO exception occured when converting the image file \"\n + \"to base64\") ;\n }\n }\n \n return listOfMusicVideos ;\n }",
"public static String CreateMD5(File file) {\n String base64Image = \"\";\n try (FileInputStream imageInFile = new FileInputStream(file)) {\n // Reading a Image file from file system\n byte imageData[] = new byte[(int) file.length()];\n imageInFile.read(imageData);\n base64Image = Base64.getEncoder().encodeToString(imageData);\n } catch (FileNotFoundException e) {\n DialogWindow.ShowErrorPane(\"Image could not be found.\", \"Error Image Missing\");\n// System.out.println(\"Image not found\" + e);\n } catch (IOException ioe) {\n DialogWindow.ShowErrorPane(\"Error while the image was being converted.\", \"Error Converting Image\");\n// System.out.println(\"Exception while reading the Image \" + ioe);\n }\n return base64Image;\n }",
"private void resizeBuffer(int size) {\n if (size > m_maxImgBufferSize) {\n if (size > MAX_IMG_SIZE_BYTES) {\n size = MAX_IMG_SIZE_BYTES;\n }\n\n m_maxImgBufferSize = size + 100;\n m_imgBuffer = new byte[m_maxImgBufferSize];\n m_baistream = new ByteArrayInputStream(m_imgBuffer);\n }\n }",
"@Override\n protected void onActivityResult (int requestCode, int resultCode, Intent data)\n {\n\t\tif(requestCode == CAMERA_REQUEST_CODE)\n\t\t{\n\t\t\t// if user keeps the photo\n\t\t\tif(resultCode == RESULT_OK)\n\t\t\t{\n\t\t\t\tif(data!=null){\n\t\t\t\t\t DBAdapter db = new DBAdapter(this); \n\n\t\t\t\t db.open();\n\t\t\t\t ByteArrayOutputStream baos = new ByteArrayOutputStream(); \n\t\t\t\t \n\t\t\t\t\tBitmap bitmap = data.getParcelableExtra(\"data\");\n\n\t\t\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, baos); \n\t\t\t byte[] photo = baos.toByteArray(); \n\t\t\t Log.d (\"CHECKTHIS\", \"\" +photo.length);\n\t\t\t db.insertUserDetails(\"tuan\",\"one\", \"pass\", photo,\"visibility\");\n\t\t\t\t\timageView.setImageBitmap(bitmap);\n\t\t\t db.close();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n }",
"private static ArrayImg< UnsignedByteType, ByteArray > createLargeRectangularImage() {\n\t\tArrayImg< UnsignedByteType, ByteArray > img = ArrayImgs.unsignedBytes( 1024, 512 );\n\t\tfor ( int i = 0; i < 3; i++ ) {\n\t\t\tlong[] xmin = new long[] { 199 + i * 200, 0 };\n\t\t\tlong[] xmax = new long[] { 299 + i * 200, 511 };\n\t\t\tIntervalView< UnsignedByteType > iview = Views.interval( img, xmin, xmax );\n\t\t\tiview.forEach( pixel -> pixel.set( ( byte ) 255 ) );\n\t\t}\n\t\treturn img;\n\t}",
"private void resizePhoto() {\n if (photoPath.length() == 0) {\n return;\n }\n Log.d(LOG_TAG, \"Path dell' immagine: \" + photoPath);\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(photoPath, options);\n\n options = new BitmapFactory.Options();\n\n options.inJustDecodeBounds = true;\n photoBM = BitmapFactory.decodeFile(photoPath, options);\n Log.d(LOG_TAG, \"Width:\" + bitmapWidth + \" height:\" + bitmapHeight);\n\n options.inSampleSize = calculateInSampleSize(options, bitmapWidth, bitmapHeight);\n\n options.inJustDecodeBounds = false;\n //halfHorizontal = bitmapWidth / 2;\n photoBM = BitmapFactory.decodeFile(photoPath, options);\n\n }",
"public static Bitmap decodeBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory\n .decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"public static String getBase64FromImage(ImageView imageView) {\n\n\n imageView.buildDrawingCache();\n Bitmap bitmap = imageView.getDrawingCache();\n //Bitmap bitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();\n return getBase64FromBitmap(bitmap);\n }",
"@Override\r\nprotected void onActivityResult(int requestCode, int resultCode, Intent vgt) {\n\t\tsuper.onActivityResult(requestCode, resultCode, vgt);\r\n\t\tBitmap bm=(Bitmap) vgt.getExtras().get(\"data\"); //Use only data\r\n\t\tiv.setImageBitmap(bm); \r\n\t}",
"public static Bitmap decodeToBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"public static Bitmap bitmapDecodeBase64(String input) {\n byte[] decodedByte = Base64.decode(input, 0);\n return BitmapFactory\n .decodeByteArray(decodedByte, 0, decodedByte.length);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == CHOOSE_IMAGE && resultCode == RESULT_OK && data != null &&\n data.getData() != null) {\n uriProfileImage = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), uriProfileImage);\n profilePic.setImageBitmap(bitmap);\n\n uploadImageToFirebaseStorage();\n Bimage = true;\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"void setSignatureImage(byte[] signatureImage);",
"String convertImageToBase64String(final BufferedImage img) {\n final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", byteArrayOutputStream);\n return Base64.getEncoder().encodeToString(byteArrayOutputStream.toByteArray());\n } catch (IOException e) {\n logger.error(\"cannot convert image to base 64\", e);\n }\n return null;\n }",
"public void setImage(BufferedImage newImage) {\n if (newImage == null) {\n throw new NullArgumentException(\"Image must not be null\");\n }\n\n ByteArrayOutputStream byteOut = new ByteArrayOutputStream();\n\n try {\n ImageIO.write(newImage, \"png\", byteOut);\n this.setImageBase64(Base64.encodeBase64String(byteOut.toByteArray()));\n }\n catch (IOException e) {\n if (this.logger != null) {\n this.logger.warning(\"Error when encoding base64 server icon\");\n }\n setImageBase64(\"\");\n }\n }",
"private static String encodeToBase64(byte[] data) {\n return Base64.encodeToString(data, BASE64_EFLAGS);\n }"
] | [
"0.5896255",
"0.5782731",
"0.5725617",
"0.56245655",
"0.5449979",
"0.54313886",
"0.53874594",
"0.5297543",
"0.52704036",
"0.5259776",
"0.5258585",
"0.5218032",
"0.51789135",
"0.51531583",
"0.5108698",
"0.5099",
"0.50737786",
"0.5071619",
"0.5062212",
"0.50589544",
"0.503983",
"0.50393254",
"0.50215864",
"0.5012394",
"0.49882954",
"0.4984747",
"0.4984328",
"0.49837396",
"0.49828425",
"0.49784604",
"0.49690127",
"0.4965233",
"0.49608988",
"0.49519852",
"0.4941794",
"0.4924772",
"0.49219647",
"0.49129462",
"0.49103218",
"0.48987103",
"0.4894928",
"0.48899683",
"0.48851702",
"0.48829016",
"0.48761398",
"0.48682004",
"0.48657322",
"0.484554",
"0.48345047",
"0.48266858",
"0.480111",
"0.47975576",
"0.47901478",
"0.47879624",
"0.47850546",
"0.47798654",
"0.4779666",
"0.47766483",
"0.4769559",
"0.4763899",
"0.47637022",
"0.4762598",
"0.47598103",
"0.47448915",
"0.47419366",
"0.47287524",
"0.472722",
"0.47272074",
"0.47251904",
"0.47236568",
"0.4719414",
"0.47166404",
"0.47166404",
"0.47151393",
"0.47113436",
"0.471123",
"0.47082907",
"0.4707505",
"0.47036815",
"0.4695074",
"0.4694789",
"0.4693495",
"0.46906632",
"0.4689151",
"0.4685202",
"0.4684076",
"0.46812487",
"0.46724078",
"0.46723476",
"0.46712628",
"0.4664358",
"0.4659738",
"0.46579733",
"0.4653849",
"0.46494693",
"0.46409807",
"0.46407068",
"0.46400794",
"0.4632142",
"0.46300036",
"0.46202847"
] | 0.0 | -1 |
Get Image URL. The image cannot exceed 5 MB in size after being Base64encoded. The long side cannot exceed 4,000 px for images in .jpg format or 2,000 px for images in other formats. Either `Url` or `Image` must be provided; if both are provided, only `Url` will be used. The recommended image aspect ratio is 3:4 (generally, the aspect ratio of images taken by mobile phones). The face must be greater than 100100 px in size. We recommend you store the image in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability. The download speed and stability of nonTencent Cloud URLs may be low. Supported image formats are PNG, JPG, JPEG, and BMP. GIF is currently not supported. | public String getUrl() {
return this.Url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static Image forUrl(String imageType, String url) {\n\t\treturn () -> {\n\t\t\ttry {\n\t\t\t\tURLConnection urlConnection = new URL(url).openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\");\n\t\t\t\tInputStream stream = urlConnection.getInputStream();\n\t\t\t\treturn forStream(imageType, stream).getData();\n\t\t\t} catch (IOException e) {\n\t\t\t\tDiscord4J.LOGGER.error(LogMarkers.UTIL, \"Discord4J Internal Exception\", e);\n\t\t\t}\n\t\t\treturn defaultAvatar().getData();\n\t\t};\n\t}",
"public String getImageUrl();",
"Bitmap ObtenerImagen(URL imageUrl){\n HttpURLConnection conn = null;\n Bitmap imagen=null;\n try {\n conn = (HttpURLConnection) imageUrl.openConnection();\n conn.connect();\n imagen = BitmapFactory.decodeStream(conn.getInputStream());\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n return imagen;\n }",
"java.lang.String getPictureUri();",
"abstract public String imageUrl ();",
"static String getImageUrl(final FlickrImage flickrImage) {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"farm\" + flickrImage.getFarm() + \".static.flickr.com\")\n .appendPath(flickrImage.getServer())\n .appendPath(flickrImage.getFlickrId() + \"_\" + flickrImage.getSecret() + \".jpg\");\n\n return builder.build().toString();\n }",
"public String formatImageURL(String imageUrl){\n final String BASE_URL = \"http://image.tmdb.org/t/p/\";\n final String IMG_SIZE = \"w500\";\n return BASE_URL+IMG_SIZE+imageUrl;\n }",
"public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}",
"public Bitmap getBitmapfromUrl(String imageUrl) {\r\n try {\r\n URL url = new URL(imageUrl);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setDoInput(true);\r\n connection.connect();\r\n InputStream input = connection.getInputStream();\r\n Bitmap bitmap = BitmapFactory.decodeStream(input);\r\n return bitmap;\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }",
"public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}",
"public static Bitmap getBitmapFromUrl(String imageUrl) {\n\n try {\n\n URL url = new URL(imageUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n return BitmapFactory.decodeStream(input);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }",
"public Image getImage(URL paramURL, String paramString) {\n/* */ try {\n/* 298 */ return getImage(new URL(paramURL, paramString));\n/* 299 */ } catch (MalformedURLException malformedURLException) {\n/* 300 */ return null;\n/* */ } \n/* */ }",
"public static Bitmap downloadImageBitmap(String imageUrl) {\n Bitmap bitmap = null;\n try {\n InputStream in = new java.net.URL(imageUrl).openStream();\n bitmap = BitmapFactory.decodeStream(in);\n } catch (OutOfMemoryError e) {\n Log.e(TAG, \"Out of Memory Error in image bitmap download\");\n e.printStackTrace();\n } catch (Exception e) {\n Log.e(TAG, \"General exception in image bitmap download\");\n e.printStackTrace();\n }\n return bitmap;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"protected Bitmap getImage(URL url) {\n\n HttpURLConnection iconConn = null;\n try {\n iconConn = (HttpURLConnection) url.openConnection();\n iconConn.connect();\n int response = iconConn.getResponseCode();\n //if the reponse 200 the successfull\n if (response == 200) {\n return BitmapFactory.decodeStream(iconConn.getInputStream());\n } else {\n return null;\n }\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n } finally {\n if (iconConn != null) {\n iconConn.disconnect();\n }\n }\n }",
"SafeUri getDefaultImageUri();",
"public String getImageURL()\n\t{\n\t\treturn imageURL;\n\t}",
"public String getPictureUrl()\n\t{\n\t\treturn \"http://cdn-0.nflximg.com/us/headshots/\" + id + \".jpg\";\n\t}",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return mImageUrl;\n }",
"@ApiMethod(name = \"imageDownload\")\n public SerializedProto imageDownload(User user, EncodedImageRef ref)\n throws InvalidProtocolBufferException {\n ImageRef imageRef = ImageRef.newBuilder()\n .mergeFrom(BaseEncoding.base64().decode(ref.getRefEncoded()))\n .build();\n Logger.getGlobal().info(\"Getting downloadUrl for: \" + imageRef.toString());\n\n try {\n ImageDownloadRef downloadRef = ImageDownloadRef.newBuilder()\n .setImage(imageRef)\n .setUrl(ImageStore.getDownloadUrl(imageRef))\n .build();\n return SerializedProto.fromProto(downloadRef);\n } catch (Exception ex) {\n Logger.getGlobal().log(Level.WARNING, \"Unhandled exception:\", ex);\n throw ex;\n }\n }",
"Builder addImage(URL value);",
"public String getPlaceImage(String imageId) {\n Call<String> call = this.mPlaceCall.getPlaceImage(imageId);\n return call.request().url().toString();\n }",
"private static Bitmap readImageUrl(String urlString) {\n\n // Create an empty bitmap image\n Bitmap image = null;\n\n try {\n // Create and open an inputStream on the urlString\n InputStream in = new java.net.URL(urlString).openStream();\n\n // Decode the inputStream and set that to the bitmap image\n image = BitmapFactory.decodeStream(in);\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error reading image url: \" + e);\n }\n\n // Return the image\n return image;\n }",
"public String getImageUrl() {\n\t\treturn imageUrl;\n\t}",
"@Nullable\n public String getImageUrl() {\n return imageUrl;\n }",
"public Uri getImageLink(String type){\r\n return Uri.parse(\"https://graph.facebook.com\" + getImage() + \"?type=\" + type);\r\n }",
"public String getSize(int width, int height) {\n try {\n String url;\n\n url = cloudinary.url().format(\"jpg\")\n .transformation(new Transformation().width(width).height(height)).generate(public_id);\n\n return url;\n }catch (NullPointerException e){\n Logger.debug(\"Failed to receive image url.\", e.getMessage());\n return \"null\";\n }\n }",
"com.google.protobuf.ByteString\n getProductImageUrlBytes();",
"public byte[] getImage(String imageUrl) {\n\t\treturn restTemplate.getForObject(imageUrl, byte[].class);\n\t}",
"Uri getAvatarUrl();",
"private Bitmap downloadImage(String url)\n \t {\n \n \t Bitmap bitmap = null;\n \t InputStream stream = null;\n \t BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n \t bmOptions.inSampleSize = 1;\n \n \t try\n \t {\n \t stream = getHttpConnection(url);\n \t bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n \t stream.close();\n \n \t return bitmap;\n \t }\n \t catch (IOException e1)\n \t {\n \t e1.printStackTrace();\n \t }\n \t return bitmap;\n \t }",
"java.lang.String getProductImageUrl();",
"java.lang.String getImage();",
"private Bitmap LoadImage(String URL, BitmapFactory.Options options) {\r\n Bitmap bitmap = null;\r\n InputStream in = null;\r\n try {\r\n in = OpenHttpConnection(URL);\r\n bitmap = BitmapFactory.decodeStream(in, null, options);\r\n in.close();\r\n } catch (IOException e1) {\r\n }\r\n return bitmap;\r\n }",
"public String getThumbnailUrl();",
"public String getImgUrl() {\r\n return imgUrl;\r\n }",
"public String getPhotoUrl() {\n try {\n ParseFile pic = fetchIfNeeded().getParseFile(\"pic\");\n return pic.getUrl();\n }\n catch (ParseException e) {\n Log.d(TAG, \"Error in getting photo from Parse: \" + e);\n return null;\n }\n }",
"private Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }",
"private static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n InputStream stream = null;\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inSampleSize = 1;\n\n try {\n stream = getHttpConnection(url);\n bitmap = BitmapFactory.\n decodeStream(stream, null, bmOptions);\n stream.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return bitmap;\n }",
"@GET\n @Path(\"{factoryId}/image\")\n @Produces(\"image/*\")\n public Response getImage(@PathParam(\"factoryId\") String factoryId, @DefaultValue(\"\") @QueryParam(\"imgId\") String imageId)\n throws FactoryUrlException {\n Set<FactoryImage> factoryImages = factoryStore.getFactoryImages(factoryId, null);\n if (factoryImages == null) {\n LOG.warn(\"Factory URL with id {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Factory URL with id \" + factoryId + \" is not found.\");\n }\n if (imageId.isEmpty()) {\n if (factoryImages.size() > 0) {\n FactoryImage image = factoryImages.iterator().next();\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n } else {\n LOG.warn(\"Default image for factory {} is not found.\", factoryId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(),\n \"Default image for factory \" + factoryId + \" is not found.\");\n }\n } else {\n for (FactoryImage image : factoryImages) {\n if (image.getName().equals(imageId)) {\n return Response.ok(image.getImageData(), image.getMediaType()).build();\n }\n }\n }\n LOG.warn(\"Image with id {} is not found.\", imageId);\n throw new FactoryUrlException(Status.NOT_FOUND.getStatusCode(), \"Image with id \" + imageId + \" is not found.\");\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public Image getImage() {\n ByteArrayInputStream byteIn = new ByteArrayInputStream(Base64.decodeBase64(this.getImageBase64()));\n\n BufferedImage image;\n\n try {\n image = ImageIO.read(byteIn);\n }\n catch (IOException e) {\n if (this.logger != null) {\n this.logger.warning(\"Error when decoding base64 server icon\");\n }\n\n image = null;\n }\n\n if (image == null) {\n return new BufferedImage(64, 64, BufferedImage.TYPE_INT_ARGB);\n }\n else {\n return image;\n }\n }",
"public String getImgUrl() {\n\t\treturn imgUrl;\n\t}",
"@Override\n\tprotected String getImageUrl() {\n\t\treturn user.getUserInfo().getImageUrl();\n\t}",
"public Bitmap downloadImage(String theUrl){ \n\t \t//Log.i(\"ZZ\", \"AppDelegate downloadImage: \" + theUrl); \n\t \tdownloadInProgress = 1;\n\t InputStream in = null; \n\t \tBitmap bitmap = null;\n\t try{\n\t \tin = Obj_Downloader.OpenHttpConnection(theUrl);\n\t\t bitmap = BitmapFactory.decodeStream(in);\n\t }catch (Exception e) {\n \tLog.i(\"ZZ\", \"AppDelegate:downloadImage: ERROR: \" + e.getMessage()); \n\t //return null;\n\t }\n\t downloadInProgress = 0;\n\t return bitmap; \n\t }",
"public static Drawable LoadImageFromWebOperations(String url, File cacheDir) {\n\t\ttry {\n\t\t\tDrawable d = null;\n\t\t\tString[] urlDir = url.split(\"/\");\n\t\t\tint sizeMax=600;\n\t\t\ttry {\n\t\t\t\t// File cacheDir = new File(ruta+File.separator+ urlDir[8]);\n\t\t\t\tif (!cacheDir.exists()) {\n\t\t\t\t\tcacheDir.mkdirs();\n\n\t\t\t\t}\n\t\t\t\tFile cacheDirName = new File(cacheDir + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\n\t\t\t\tif (!cacheDirName.exists() || cacheDirName.length() == 0) {\n\t\t\t\t\tcacheDirName.createNewFile();\n\t\t\t\t\tInputStream is = (InputStream) new URL(url).getContent();\n\t\t\t\t\tBitmap bit = BitmapFactory.decodeStream(is);\n\t\t\t\t\t//Alto\n\t\t\t\t\tBitmap bit2=null;\n\t\t\t\t\tFileOutputStream fo = new FileOutputStream(cacheDirName);\n\t\t\t\t\t// Drawable d = Drawable.createFromStream(is, \"src name\");\n\t\t\t\t\tif(bit.getHeight()>sizeMax){\n\t\t\t\t\t\tbit2=Bitmap.createScaledBitmap(bit,(sizeMax*bit.getWidth()/bit.getHeight()), sizeMax, false);\n\t\t\t\t\t\tbit2.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}else if(bit.getWidth()>sizeMax){\n\t\t\t\t\t\tbit2=Bitmap.createScaledBitmap(bit,sizeMax, (sizeMax* bit.getHeight()/bit.getWidth()), false);\n\t\t\t\t\t\tbit2.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tbit.compress(CompressFormat.JPEG, 95, fo);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Url: \"+cacheDir + File.separator\n\t\t\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Ancho y alto: \"+(bit.getWidth()+\" \"+bit.getHeight()));\n\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Size1: \"+(bit.getRowBytes()*bit.getHeight()));\n\t\t\t\t\tbit.recycle();\n\t\t\t\t\tif(bit2!=null){\n\t\t\t\t\t\tif(Constants.DEBUG) Log.v(Constants.TAG,\"Size2: \"+(bit2.getRowBytes()*bit2.getHeight()));\n\t\t\t\t\t\tbit2.recycle();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSystem.gc();\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t\td = Drawable.createFromPath(cacheDirName.getPath());\n\t\t\t} catch (OutOfMemoryError e) {\n\t\t\t\tSystem.gc();\n\t\t\t\tRuntime.getRuntime().gc();\n\t\t\t}\n\t\t\t//\n\n\t\t\treturn d;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public TailoredImage getImageUrl(String url) throws IOException {\n\t\treturn doProcess(ImageIO.read(new URL(url)));\n\t}",
"@Schema(example = \"iVBORw0KGgoAAAANSUhEUgAAACIAAAAoCAYAAACb3CikAAAABGdBTUEAALGPC\", description = \"Binary image content, base64 encoded.\")\n public String getImage() {\n return image;\n }",
"public BufferedImage getImage() {\n\t\tString base64ImageString = getData();\n\t\tByteArrayInputStream byteStream = new ByteArrayInputStream(Base64\n\t\t\t\t.decodeBase64(base64ImageString.getBytes()));\n\t\ttry {\n\t\t\treturn ImageIO.read(byteStream);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"private Image getImage(String url) {\r\n\t\ttry {\r\n\t\t\treturn ImageIO.read(new URL(url));\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"private void downloadingImage(Intent intent) {\n Bitmap bitmap = null;\n InputStream in = null;\n int responseCode = -1;\n\n String urlPath = intent.getStringExtra(URL);\n\n String fileName = intent.getStringExtra(FILENAME);\n\n /*7.2 mb on web and 15.85 mb on mobile image file*/\n String s = \"https://upload.wikimedia.org/wikipedia/commons/0/05/Sambro_Island_Lighthouse_%282%29.jpg\";\n\n try {\n\n URL url = new URL(urlPath);//params[0]\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.connect();\n responseCode = httpURLConnection.getResponseCode();\n if (responseCode == HttpURLConnection.HTTP_OK) {\n in = httpURLConnection.getInputStream();\n bitmap = BitmapFactory.decodeStream(in);\n in.close();\n\n if (bitmap != null) {\n // successfully finished\n result = Activity.RESULT_OK;\n saveImage(bitmap, fileName);\n } else {\n publishResults(fileName, result);\n }\n }\n\n } catch (MalformedURLException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n e.printStackTrace();\n } catch (Exception e) {\n publishResults(fileName, Activity.RESULT_CANCELED);\n Log.v(TAG, \"Exception : \" + e.getMessage());\n }\n }",
"private Image getImage(String url) {\n\t\ttry {\n\t\t\treturn ImageIO.read(new URL(url));\n\t\t} catch(IOException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}",
"public void setImageUrl(String imageUrl) {\n this.imageUrl = imageUrl;\n }",
"public Bitmap getBitmapFromURL(String strURL) {\n try {\n URL url = new URL(strURL);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public Single<Uri> image(@NonNull FragmentActivity activity) {\n return requestImage(\n activity,\n false,\n MimeType.IMAGE)\n .map(uris -> uris.get(0));\n }",
"public static void getImageFromUrl(String url, final ImageView imageView,\r\n\t\t\tContext contexte) {\r\n\r\n\t\tVolleySingleton volleyInstance = VolleySingleton.getInstance(contexte);\r\n\t\tImageLoader imageLoader = volleyInstance.getImageLoader();\r\n\t\t\r\n\t\timageLoader.get(url, new ImageListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorResponse(VolleyError error) {\r\n\t\t\t\timageView.setImageResource(R.drawable.ic_launcher);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(ImageContainer response, boolean arg1) {\r\n\r\n\t\t\t\tLog.i(\"Api\",\r\n\t\t\t\t\t\t\"Get image url reponse :\" + response.getRequestUrl());\r\n\t\t\t\tif (response.getBitmap() != null) {\r\n\t\t\t\t\timageView.setImageBitmap(response.getBitmap());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public Optional<URL> avatarUrl() {\n this.use();\n\n try {\n if(avatar != null)\n return Optional.of(new URL(avatar));\n else\n return Optional.empty();\n\n } catch (MalformedURLException e) {\n throw new RuntimeException(\"Since URLs are sent by the server, they shouldn't be malformed...\", e);\n }\n }",
"public String getLargeCoverUrl() {\n /*\n By appending ?default=false to the URL, the API will return a 404 message if the book cover\n is not found. This actually works to our benefit because we will be supplying our own image\n in place of missing book covers.\n */\n return \"http://covers.openlibrary.org/b/olid/\" + openLibraryId + \"-L.jpg?default=false\";\n }",
"public void setImageUrl(String imageUrl) {\n this.imageUrl = imageUrl;\n }",
"public static String getImageURL(Bundle data) {\n // Extract the path to the image file from the Bundle, which\n // should be stored using the IMAGE_URL key.\n return data.getString(IMAGE_URL);\n }",
"public void setImgUrl(String imgUrl) {\r\n this.imgUrl = imgUrl;\r\n }",
"public void getImage(final String url, final GetImageListener listener) {\n String localFileName = getLocalImageFileName(url);\n final Bitmap image = loadImageFromFile(localFileName);\n if (image == null) { //if image not found - try downloading it from parse\n firebaseModel.getImage(url, new GetImageListener() {\n @Override\n public void onComplete(String url) {\n //2. save the image localy\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n saveImageToFile(image,localFileName);\n //3. return the image using the listener\n listener.onComplete(image.toString());\n }\n\n @Override\n public void fail() {\n listener.fail();\n }\n });\n }else {\n //Log.d(\"TAG\",\"OK reading cache image: \" + localFileName);\n listener.onComplete(image.toString());\n }}",
"String getAvatarUrl();",
"public static Image imageFromURL(final URL url)\tthrows IOException,\r\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\tNotImageException\r\n\t{\r\n\t\turl.openStream().close(); // throws IOException if url bad\r\n\t\tfinal Image image = TOOLKIT.getImage(url);\r\n\t\tensureImage(image);\r\n\t\treturn image;\r\n\t}",
"public java.lang.String getImage() {\n java.lang.Object ref = image_;\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 image_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n public String getImageLink() {\n return imageLink;\n }",
"public ImageModel(final String url, final String width, final String height) {\n if (url != null) {\n this.url = url;\n }\n this.height = height;\n this.width = width;\n }",
"private Image establishConnection(String url) throws IOException {\n\n String imgUrl = url;\n URLConnection connection = new URL(imgUrl).openConnection();\n connection.addRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0\");\n Image image = new Image(connection.getInputStream());\n return image;\n }",
"@Override\n public String toString() {\n return \"GifImage{\" + \"url='\" + url + '\\'' + \", width=\" + width + \", height=\" + height + '}';\n }",
"java.lang.String getPackageImageURL();",
"public Bitmap getBitmapFromURL(String src) {\n try {\n Log.i(TAG,\"GetbitmapfromURL src \" + src);\n URL url = new URL(src);\n URLConnection connection = (URLConnection) url.openConnection();\n connection.connect();\n Log.i(TAG,\"bitmap returned\");\n return BitmapFactory.decodeStream(new BufferedInputStream(connection.getInputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n Log.e(TAG,\"exception thrown getting bitmap url\");\n return null;\n }\n }",
"public Image getImage(URL paramURL) {\n/* 276 */ return getAppletContext().getImage(paramURL);\n/* */ }",
"public java.lang.String getImage() {\n java.lang.Object ref = image_;\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 image_ = s;\n return s;\n }\n }",
"public Bitmap getBitmapFromURL(String src){\n try{\n URL url = new URL(src);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap bitmap = BitmapFactory.decodeStream(input);\n return bitmap;\n }catch(IOException e){\n e.printStackTrace();\n return null;\n }\n }",
"@Override\n public Bitmap getImage(String url) {\n try {\n if (!taskForUrlAlreadyRunning(url)) {\n imageDownloadTaskMap.put(url, startDownload(url));\n }\n } catch (MalformedURLException e) {\n Log.i(\"ImageDownloadManager\", \"Malformed url\" + url);\n }\n return null;\n }",
"com.google.protobuf.ByteString\n getPictureUriBytes();",
"public String getImgurl() {\n return imgurl;\n }",
"public static Image loadImage(URL imagePath)\n {\n Image image = new ImageIcon(imagePath).getImage();\n\n if (image == null)\n System.out.println(\"URL Image not loaded! \" + imagePath);\n\n return image;\n }",
"public java.lang.String getPictureUri() {\n java.lang.Object ref = pictureUri_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n pictureUri_ = s;\n }\n return s;\n }\n }",
"private static Bitmap getBitmap(String imageURL){\n\t\tBitmap bmp = null;\n\n\t\ttry {\n\t\t\tbmp = BitmapFactory.decodeStream((InputStream) new URL(imageURL).getContent());\n\t\t} catch (MalformedURLException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\treturn bmp;\n\t}",
"private Bitmap loadImageFromNetwork(String url) {\n Bitmap bm = null;\n try {\n URL urln = new URL(url);\n Log.i(\"load\", url);\n Log.i(\"load\", \"loading Image...\");\n bm = BitmapFactory.decodeStream(urln.openConnection().getInputStream());\n Log.i(\"load\", \"done\");\n } catch (IOException e) {\n Log.e(\"HUE\",\"Error downloading the image from server : \" + e.getMessage().toString());\n } \n return bm;\n }",
"public String getUrlImagen(){\n\t\treturn urlImagen;\n\t}",
"public static String getRandomImageUrl() {\n int index = RandomNumberGenerator.getRandomInt(0, images.length / 2 - 1);\n return images[index * 2 + 1];\n }",
"String getImage();",
"public Bitmap getBitmapFromURL(String src) {\n try {\n\n java.net.URL url = new java.net.URL(src);\n HttpURLConnection connection = (HttpURLConnection) url\n .openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n Bitmap myBitmap = BitmapFactory.decodeStream(input);\n\n return myBitmap;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public String getLargeCoverUrl() {\n return \"http://covers.openlibrary.org/b/olid/\" + openLibraryId + \"-L.jpg?default=false\";\n }",
"public static Bitmap downloadImage(String url) {\n Bitmap bitmap = null;\n\n InputStream stream = getHttpConnection(url);\n if(stream!=null) {\n bitmap = BitmapFactory.decodeStream(stream);\n try {\n stream.close();\n }catch (IOException e1) {\n Log.d(\"MyDebugMsg\", \"IOException in downloadImage()\");\n e1.printStackTrace();\n }\n }\n\n return bitmap;\n }",
"public java.lang.String getPictureUri() {\n java.lang.Object ref = pictureUri_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n pictureUri_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }",
"@Override\n\tpublic String getImageURL() {\n\t\treturn \"\";\n\t}",
"public void setImageURL(String imageURL) {\n\t\tthis.imageURL = imageURL;\n\t}"
] | [
"0.6385264",
"0.6170195",
"0.60968006",
"0.6045762",
"0.6042788",
"0.60380673",
"0.6005985",
"0.5990873",
"0.5980749",
"0.5972062",
"0.5964316",
"0.5961644",
"0.58792746",
"0.5820215",
"0.5767912",
"0.5767767",
"0.57553387",
"0.5747524",
"0.5737744",
"0.5737744",
"0.5737744",
"0.5737744",
"0.5737744",
"0.5721916",
"0.5710057",
"0.5699029",
"0.56924945",
"0.5673539",
"0.56639194",
"0.56470627",
"0.55912954",
"0.5566686",
"0.55519617",
"0.5528293",
"0.55084795",
"0.54853594",
"0.54849494",
"0.5480905",
"0.54758304",
"0.54611456",
"0.54445106",
"0.5432309",
"0.54258627",
"0.5416924",
"0.54034144",
"0.5383421",
"0.5383421",
"0.5383421",
"0.5383421",
"0.5383421",
"0.537835",
"0.5378164",
"0.53728426",
"0.53724134",
"0.536984",
"0.5362513",
"0.53613037",
"0.53428197",
"0.53368044",
"0.53114676",
"0.5295023",
"0.5277383",
"0.5275572",
"0.52589583",
"0.52558553",
"0.5254133",
"0.5248396",
"0.52389747",
"0.5237257",
"0.5234796",
"0.5230025",
"0.5226143",
"0.521449",
"0.5205276",
"0.5197021",
"0.51802754",
"0.5180001",
"0.5177859",
"0.5176123",
"0.5170003",
"0.5169462",
"0.5163258",
"0.516111",
"0.5159158",
"0.5158488",
"0.5155241",
"0.5155138",
"0.5154599",
"0.513732",
"0.5136909",
"0.51338625",
"0.51330495",
"0.51271796",
"0.5103948",
"0.51015466",
"0.50981456",
"0.5082581",
"0.5074965",
"0.5066092",
"0.5064854",
"0.50574994"
] | 0.0 | -1 |
Set Image URL. The image cannot exceed 5 MB in size after being Base64encoded. The long side cannot exceed 4,000 px for images in .jpg format or 2,000 px for images in other formats. Either `Url` or `Image` must be provided; if both are provided, only `Url` will be used. The recommended image aspect ratio is 3:4 (generally, the aspect ratio of images taken by mobile phones). The face must be greater than 100100 px in size. We recommend you store the image in Tencent Cloud, as a Tencent Cloud URL can guarantee higher download speed and stability. The download speed and stability of nonTencent Cloud URLs may be low. Supported image formats are PNG, JPG, JPEG, and BMP. GIF is currently not supported. | public void setUrl(String Url) {
this.Url = Url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setImageFromURL(String imageURL);",
"Builder addImage(URL value);",
"public void setImageUrl(String imageUrl) {\n this.imageUrl = imageUrl;\n }",
"public void setImageUrl(String imageUrl) {\n this.imageUrl = imageUrl;\n }",
"public void setImageURL(String imageURL) \r\n\t{\r\n\t\t\r\n\t\tthis.imageURL = imageURL;\r\n\t\t\r\n\t}",
"public void setImgUrl(String imgUrl) {\r\n this.imgUrl = imgUrl;\r\n }",
"public void setImageURL(String imageURL) {\n\t\tthis.imageURL = imageURL;\n\t}",
"public void setImageUrl(String imageUrl) {\n this.imageUrl = imageUrl == null ? null : imageUrl.trim();\n }",
"public void setImageUrl(String url){\n\n Glide.with(getContext()).load(url)\n .diskCacheStrategy(DiskCacheStrategy.ALL)\n .into(ivImg);\n }",
"public void setImgUrl(String imgUrl) {\n this.imgUrl = imgUrl == null ? null : imgUrl.trim();\n }",
"public void setImgUrl(String imgUrl) {\n this.imgUrl = imgUrl == null ? null : imgUrl.trim();\n }",
"public void setImgUrl(String imgUrl) {\n this.imgUrl = imgUrl == null ? null : imgUrl.trim();\n }",
"public void setImgUrl(String imgUrl) {\n this.imgUrl = imgUrl == null ? null : imgUrl.trim();\n }",
"public void setImageUrl(String url) {\n\t\tthis.url = url;\n\t}",
"Builder addThumbnailUrl(URL value);",
"private static void setPicasso(@NonNull Context context, RemoteViews views, int viewId, @NonNull String imageUrl) {\n\n try {\n //java.lang.IllegalArgumentException: Path must not be empty\n if (imageUrl.length() > 0) {\n Bitmap logoBitmap = Picasso.with(context).load(Utils.builtURI(imageUrl)).get();\n views.setImageViewBitmap(viewId, logoBitmap);\n } else {\n views.setImageViewResource(viewId, R.drawable.ic_launcher);\n }\n\n } catch (IOException | IllegalArgumentException e) {\n views.setImageViewResource(viewId, R.drawable.ic_launcher);\n e.printStackTrace();\n }\n\n }",
"public ImageModel(final String url, final String width, final String height) {\n if (url != null) {\n this.url = url;\n }\n this.height = height;\n this.width = width;\n }",
"public maestro.payloads.FlyerFeaturedItem.Builder setItemImageUrl(CharSequence value) {\n validate(fields()[8], value);\n this.item_image_url = value;\n fieldSetFlags()[8] = true;\n return this;\n }",
"public void setProductImageUrl(final String productImageUrl);",
"void setImageLocation(URL imageLocation) throws IOException;",
"public static void setThumbnailImage(final Context context, String url, ImageView imageView){\n\n Picasso.with(context).load(url).placeholder(R.drawable.placeholder_thumbnail).fit().into(imageView);\n\n }",
"@BindingAdapter(\"bind:imageUrl\")\n public static void setImageUrl(ImageView imageView, String url) {\n Context context = imageView.getContext();\n Glide.with( context ).load( url ).into( imageView );\n }",
"public String formatImageURL(String imageUrl){\n final String BASE_URL = \"http://image.tmdb.org/t/p/\";\n final String IMG_SIZE = \"w500\";\n return BASE_URL+IMG_SIZE+imageUrl;\n }",
"Builder addThumbnailUrl(String value);",
"@Override\r\n public void setImageURI(Uri uri)\r\n {\r\n internalSetImageURI(uri, true);\r\n }",
"public void setImgurl(String imgurl) {\n this.imgurl = imgurl;\n }",
"public void setImagesUrl(String imagesUrl) {\n\t\tthis.imagesUrl = imagesUrl;\n\t}",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl();",
"public String getImageUrl() {\n return mImageUrl;\n }",
"private void displayImage(String url, ImageView image){\n Ion.with(image)\n .placeholder(R.drawable.fgclogo)\n .error(R.drawable.fgclogo)\n .load(url);\n }",
"static Image forUrl(String imageType, String url) {\n\t\treturn () -> {\n\t\t\ttry {\n\t\t\t\tURLConnection urlConnection = new URL(url).openConnection();\n\t\t\t\turlConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36\");\n\t\t\t\tInputStream stream = urlConnection.getInputStream();\n\t\t\t\treturn forStream(imageType, stream).getData();\n\t\t\t} catch (IOException e) {\n\t\t\t\tDiscord4J.LOGGER.error(LogMarkers.UTIL, \"Discord4J Internal Exception\", e);\n\t\t\t}\n\t\t\treturn defaultAvatar().getData();\n\t\t};\n\t}",
"public Builder setImage(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n image_ = value;\n onChanged();\n return this;\n }",
"public void setImage(String Image) {\n this.Image = Image;\n }",
"@Override\n public void setImageLink(String imageLink) {\n this.imageLink = imageLink;\n }",
"public void setImagesUrl(List<String> imagesUrl) {\n\t\tthis.imagesUrl = imagesUrl;\n\t}",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public String getImageUrl() {\n return imageUrl;\n }",
"public void setImageURI(Uri mImageURI) {\n this.mImageURI = mImageURI;\n }",
"void setAvatarUrl(String avatarUrl);",
"@Override\n\t\tpublic AddNonMandatory imageUrl(String image_url) {\n\t\t\tif (elements != null && !elements.isEmpty()) {\n\t\t\t\telements.get(elements.size()-1).setImageUrl(image_url);\n\t\t\t}\n\t\t\treturn this;\n\t\t}",
"public void setImage(String imageName)\n {\n if (imageName == null)\n {\n setImage((Image) null);\n }\n else\n {\n setImage(new Image(imageName));\n }\n }",
"public String getImageUrl() {\n\t\treturn imageUrl;\n\t}",
"SafeUri getDefaultImageUri();",
"Builder addImage(ImageObject value);",
"public void setImage(Context ctx, String image)\n {\n }",
"private void setImage(String downloaderUri, String thubo) {\n blogImageView = mView.findViewById(R.id.postView_image_post);\n\n //request optional to assign temporary image appear before while loading the image from db.\n RequestOptions requestOptions = new RequestOptions();\n requestOptions.placeholder(R.drawable.postlist);\n\n //Glide.with(context).applyDefaultRequestOptions(requestOptions).load(thubo).into(blogImageView);\n Glide.with(context).applyDefaultRequestOptions(requestOptions).load(downloaderUri).thumbnail(\n Glide.with(context).load(thubo)\n ).into(blogImageView);\n\n }",
"public void setImage(Image img) {\r\n this.img = img;\r\n }",
"public Builder setPictureUri(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n pictureUri_ = value;\n onChanged();\n return this;\n }",
"abstract public String imageUrl ();",
"public String getImageURL() \r\n\t{\r\n\t\t\r\n\t\treturn imageURL;\r\n\t\t\r\n\t}",
"@Nullable\n public String getImageUrl() {\n return imageUrl;\n }",
"public Thumbnail(URL imagePath)\n {\n this.imagePath = imagePath.getPath();\n imageRaw = loadImage(imagePath);\n imageThumb = resizeImageThumb(imageRaw);\n }",
"Builder addImage(String value);",
"public void setImageAdUrl(String imageAdUrl) {\r\n this.imageAdUrl = imageAdUrl;\r\n }",
"public static void setPreviewImage(final AppCompatActivity context, String url, ImageView imageView, final ProgressView progressView){\n\n //Show loading view.\n progressView.show(context.getSupportFragmentManager(), \"\");\n\n Picasso.with(context).load(url).resize(1600,1200).centerCrop().into(imageView, new Callback() {\n @Override\n public void onSuccess() {\n progressView.dismiss();\n }\n\n @Override\n public void onError() {\n\n }\n });\n\n }",
"public void setProfilepic(String string) {\n StorageReference storageReference = FirebaseStorage.getInstance().getReference().child(\"images/\"+string);\n storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri){\n //load img using glide\n Glide.with(getActivity()).load(uri.toString()).placeholder(R.drawable.round_account_circle_24).dontAnimate().into(profilepic);\n }\n });\n\n }",
"public void setImage(BufferedImage newImage) {\n if (newImage == null) {\n throw new NullArgumentException(\"Image must not be null\");\n }\n\n ByteArrayOutputStream byteOut = new ByteArrayOutputStream();\n\n try {\n ImageIO.write(newImage, \"png\", byteOut);\n this.setImageBase64(Base64.encodeBase64String(byteOut.toByteArray()));\n }\n catch (IOException e) {\n if (this.logger != null) {\n this.logger.warning(\"Error when encoding base64 server icon\");\n }\n setImageBase64(\"\");\n }\n }",
"Bitmap ObtenerImagen(URL imageUrl){\n HttpURLConnection conn = null;\n Bitmap imagen=null;\n try {\n conn = (HttpURLConnection) imageUrl.openConnection();\n conn.connect();\n imagen = BitmapFactory.decodeStream(conn.getInputStream());\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n }\n return imagen;\n }",
"public static Bitmap getBitmapFromUrl(String imageUrl) {\n\n try {\n\n URL url = new URL(imageUrl);\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);\n connection.connect();\n InputStream input = connection.getInputStream();\n return BitmapFactory.decodeStream(input);\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }",
"public ImageSearchParams(String imageUrl) {\n super(imageUrl);\n }",
"@Generated\n @Selector(\"setImage:\")\n public native void setImage(@Nullable UIImage value);",
"public Bitmap getBitmapfromUrl(String imageUrl) {\r\n try {\r\n URL url = new URL(imageUrl);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setDoInput(true);\r\n connection.connect();\r\n InputStream input = connection.getInputStream();\r\n Bitmap bitmap = BitmapFactory.decodeStream(input);\r\n return bitmap;\r\n } catch (Exception e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }",
"private void setImage(String image) {\n Bitmap bitmap;\n try {\n byte[] encodeByte = Base64.decode(image, Base64.DEFAULT);\n bitmap = BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length);\n } catch (Exception e) {\n e.getMessage();\n Log.d(\"No valid image\", \"setImage: Failed\");\n return;\n }\n\n ImageView imgView = (ImageView) findViewById(R.id.cameraView);\n if (imgView != null && image != null) {\n imgView.setImageBitmap(bitmap);\n }\n }",
"public static Bitmap downloadImageBitmap(String imageUrl) {\n Bitmap bitmap = null;\n try {\n InputStream in = new java.net.URL(imageUrl).openStream();\n bitmap = BitmapFactory.decodeStream(in);\n } catch (OutOfMemoryError e) {\n Log.e(TAG, \"Out of Memory Error in image bitmap download\");\n e.printStackTrace();\n } catch (Exception e) {\n Log.e(TAG, \"General exception in image bitmap download\");\n e.printStackTrace();\n }\n return bitmap;\n }",
"private void loadImage(Context context,\n String imageUrl,\n ImageView imageView,\n @Nullable Drawable placeholder) {\n if (imageUrl.equals(imageView.getTag())) {\n // We already have the image, no need to load it again.\n return;\n }\n //If we don't clear the tag, Glide will crash as Glide do not want us to have tag on image view\n // Clear the current tag and load the new image, The new tag will be set on success.\n imageView.setTag(null);\n Glide.with(context)\n .load(imageUrl)\n .centerCrop()\n .thumbnail(GlideConfigModule.SIZE_MULTIPLIER)\n .placeholder(placeholder)\n .dontAnimate()\n .listener(new RequestListener<String, GlideDrawable>() {\n @Override\n public boolean onException(Exception e,\n String model,\n Target<GlideDrawable> target,\n boolean isFirstResource) {\n return false;\n }\n\n @Override\n public boolean onResourceReady(GlideDrawable resource,\n String model,\n Target<GlideDrawable> target,\n boolean isFromMemoryCache,\n boolean isFirstResource) {\n // Set the image URL as a tag so we know that the image with this URL has\n // successfully loaded\n imageView.setTag(imageUrl);\n return false;\n }\n })\n .into(imageView);\n }",
"private void putImageInStorage() {\n final StorageReference ref = storageReference.child(\"images/\" + java.util.UUID.randomUUID().toString());\n ref.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n if (taskSnapshot.getMetadata() != null) {\n if (taskSnapshot.getMetadata().getReference() != null) {\n Task<Uri> result = taskSnapshot.getStorage().getDownloadUrl();\n result.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n imageUrl = uri.toString();\n ChatMessage Message = new\n ChatMessage(null,\n mUsername,\n imageUrl, dateAndTime);\n mFirebaseDatabaseReference.child(CHATS_PATH + chatCode)\n .push().setValue(Message);\n }\n });\n }\n }\n }\n });\n }",
"public void setPicUrl(String picUrl) {\n this.picUrl = picUrl;\n }",
"@SuppressWarnings(\"unused\")\n \t\tfinal public void uploadImage(final Map<String,String> options) {\n \t\t\tif(null != cachedImage) {\n\t\t\t\t\tString apiUrl = \"/xp/users/\"+ OpenFeintInternal.getInstance().getCurrentUser().resourceID() +\"/profile_picture\";\n\t\t\t ByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t cachedImage.compress(Bitmap.CompressFormat.PNG, 100, out);\n\t\t\t\t\tupload(apiUrl, out);\n \t\t\t}\n \t\t}",
"public String getPictureUrl()\n\t{\n\t\treturn \"http://cdn-0.nflximg.com/us/headshots/\" + id + \".jpg\";\n\t}",
"void setImage(String image);",
"@BindingAdapter({ \"productimageurl\" })\n public static void loadImage(ImageView imageView, String imageURL) {\n Glide.with(imageView.getContext())\n .load(imageURL)\n .placeholder(R.drawable.bisleri_bottle_img)\n .into(imageView);\n }",
"public Builder setImageByHandler(com.yahoo.xpathproto.TransformTestProtos.ContentImage value) {\n if (imageByHandlerBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n imageByHandler_ = value;\n onChanged();\n } else {\n imageByHandlerBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00004000;\n return this;\n }",
"public void setUploadUrl( String url_ ) {\n\t\tif (url_ != null) {\n\t\t\tphotoUrl = url_;\n\t\t} else {\n\t\t\tphotoUrl = \"http://199.58.116.35:8081/fotaflo-test/pictures/upload\";\n\t\t}\n\t\tlog( \"photoUrl \" + photoUrl, Log.Level.Information );\n\t}",
"private void setCategoryImage(ImageView imageView, String url, TextView tV_category, String categoryName, int color) {\n // set image\n /* if (url!=null && !url.isEmpty())\n Picasso.with(mActivity)\n .load(url)\n .placeholder(R.drawable.default_circle_img)\n .error(R.drawable.default_circle_img)\n .into(imageView);*/\n\n if (url != null && !url.isEmpty())\n Glide.with(mActivity)\n .load(url)\n //.placeholder(R.drawable.default_circle_img)\n .error(R.drawable.default_circle_img)\n .into(imageView);\n\n // set category name\n if (categoryName != null) {\n // make first character of character is uppercase\n categoryName = categoryName.substring(0, 1).toUpperCase() + categoryName.substring(1).toLowerCase();\n tV_category.setText(categoryName);\n tV_category.setTextColor(color);\n }\n }",
"public static void loadImage(Context context, String url, int defImageId, ImageView imageView, Callback callback) {\n if (isNullOrEmpty(url)) {\n if (defImageId != 0) {\n imageView.setImageResource(defImageId);\n }\n } else {\n RequestCreator requestCreator = Picasso.with(context).load(url);\n if (defImageId != 0) {\n requestCreator = requestCreator.placeholder(defImageId).error(defImageId);\n }\n requestCreator.into(imageView, callback);\n }\n }",
"public void setItemImageUrl(CharSequence value) {\n this.item_image_url = value;\n }",
"public String getURL() {\n\t\treturn RequestConstants.BASE_IMAGE_URL+_url;\n\t}",
"public String getImgUrl() {\r\n return imgUrl;\r\n }",
"public BufferedImage create(URL source, Dimension maxSize) {\n\t\treturn create(new URLImageSource(source), maxSize);\n\t}",
"public static void getImageFromUrl(String url, final ImageView imageView,\r\n\t\t\tContext contexte) {\r\n\r\n\t\tVolleySingleton volleyInstance = VolleySingleton.getInstance(contexte);\r\n\t\tImageLoader imageLoader = volleyInstance.getImageLoader();\r\n\t\t\r\n\t\timageLoader.get(url, new ImageListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorResponse(VolleyError error) {\r\n\t\t\t\timageView.setImageResource(R.drawable.ic_launcher);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(ImageContainer response, boolean arg1) {\r\n\r\n\t\t\t\tLog.i(\"Api\",\r\n\t\t\t\t\t\t\"Get image url reponse :\" + response.getRequestUrl());\r\n\t\t\t\tif (response.getBitmap() != null) {\r\n\t\t\t\t\timageView.setImageBitmap(response.getBitmap());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"public Builder setUrl(String url, String pictureName) {\n this.urlBuilder = url;\n this.pictureNameBuilder = pictureName;\n return this;\n }",
"protected void setImageUrl(UiAction uiAction, ResultSet rs, int rowNumber) throws SQLException{\n\t\t\n\t\tString imageUrl = rs.getString(UiActionTable.COLUMN_IMAGE_URL);\n\t\t\n\t\tif(imageUrl == null){\n\t\t\t//do nothing when nothing found in database\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tuiAction.setImageUrl(imageUrl);\n\t}",
"private Bitmap LoadImage(String URL, BitmapFactory.Options options) {\r\n Bitmap bitmap = null;\r\n InputStream in = null;\r\n try {\r\n in = OpenHttpConnection(URL);\r\n bitmap = BitmapFactory.decodeStream(in, null, options);\r\n in.close();\r\n } catch (IOException e1) {\r\n }\r\n return bitmap;\r\n }",
"private void setProfileImage() {\n if(mCurrentUser!= null && mCurrentUser.getProfileImageUrl() != null) {\n //Glide.with(getContext()).load(mCurrentUser.getProfileImageUrl())\n // .placeholder(R.drawable.ic_photo)\n // .error(R.drawable.ic_camera)\n // .fitCenter()\n // .into(mIvComposeUserProfilePicture);\n\n Picasso.with(getContext()).load(mCurrentUser.getProfileImageUrl())\n .transform(new RoundedCornersTransformation(2,2))\n .placeholder(R.drawable.ic_photo)\n .error(R.drawable.ic_camera)\n .into(mIvComposeUserProfilePicture);\n }\n }",
"Builder addUrl(URL value);",
"void lSetImage(Image img);",
"private static Bitmap readImageUrl(String urlString) {\n\n // Create an empty bitmap image\n Bitmap image = null;\n\n try {\n // Create and open an inputStream on the urlString\n InputStream in = new java.net.URL(urlString).openStream();\n\n // Decode the inputStream and set that to the bitmap image\n image = BitmapFactory.decodeStream(in);\n\n } catch (IOException e) {\n e.printStackTrace();\n Log.v(LOG_TAG, \"Error reading image url: \" + e);\n }\n\n // Return the image\n return image;\n }",
"static String getImageUrl(final FlickrImage flickrImage) {\n Uri.Builder builder = new Uri.Builder();\n builder.scheme(\"https\")\n .authority(\"farm\" + flickrImage.getFarm() + \".static.flickr.com\")\n .appendPath(flickrImage.getServer())\n .appendPath(flickrImage.getFlickrId() + \"_\" + flickrImage.getSecret() + \".jpg\");\n\n return builder.build().toString();\n }",
"public String getImageURL()\n\t{\n\t\treturn imageURL;\n\t}",
"@BindingAdapter(\"thumbnailImageUrl\")\n public static void setImages(ImageView imageView, String thumbnailImageUrl) {\n Context context = imageView.getContext();\n\n Glide.with(context).load(thumbnailImageUrl).error(R.drawable.default_user).into(imageView);\n }",
"public Builder setPackageImageURL(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n packageImageURL_ = value;\n onChanged();\n return this;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }",
"public String getImgUrl() {\n return imgUrl;\n }"
] | [
"0.7119289",
"0.68104315",
"0.67754817",
"0.67040414",
"0.6667532",
"0.655975",
"0.6471512",
"0.6342867",
"0.6292597",
"0.6190155",
"0.6190155",
"0.6190155",
"0.6190155",
"0.6107634",
"0.61031824",
"0.60913646",
"0.60306287",
"0.5965249",
"0.5938256",
"0.5852456",
"0.58225536",
"0.5815963",
"0.5802689",
"0.57991713",
"0.5759138",
"0.5722213",
"0.5721573",
"0.5668604",
"0.5613481",
"0.56107223",
"0.5608647",
"0.5589288",
"0.55852723",
"0.5572693",
"0.55726206",
"0.556603",
"0.5561528",
"0.5561528",
"0.5561528",
"0.5561528",
"0.5561528",
"0.5556891",
"0.5527313",
"0.5523749",
"0.5518646",
"0.55007625",
"0.5494295",
"0.54933983",
"0.5489447",
"0.5478244",
"0.54409075",
"0.54312974",
"0.5423008",
"0.54067075",
"0.5400154",
"0.53991395",
"0.53983057",
"0.53973705",
"0.53928417",
"0.5378668",
"0.5371008",
"0.53691924",
"0.5358783",
"0.53461194",
"0.5343375",
"0.5343031",
"0.53412896",
"0.53405696",
"0.5336837",
"0.5329831",
"0.53265285",
"0.5323138",
"0.5321749",
"0.5320767",
"0.5313927",
"0.5313802",
"0.5310203",
"0.5286182",
"0.52730775",
"0.5257313",
"0.5252054",
"0.52455455",
"0.5245455",
"0.5236497",
"0.52363116",
"0.5234369",
"0.5232804",
"0.52286214",
"0.52106744",
"0.52018756",
"0.51897097",
"0.5174398",
"0.51729774",
"0.51716363",
"0.5168838",
"0.51654136",
"0.51654136",
"0.51654136",
"0.51654136",
"0.51654136"
] | 0.5292077 | 77 |
Get Algorithm model version used for face recognition. Valid value: `3.0`. | public String getFaceModelVersion() {
return this.FaceModelVersion;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getGvlSpecificationVersion();",
"public float getVersion();",
"public String getGLVersion()\n\t{\n\t\treturn glGetString(GL_VERSION);\n\t}",
"public static String getModelerFileVersion() {\r\n Class _class = JPAFileActionListener.class;\r\n Annotation[] annotations = _class.getAnnotations();\r\n\r\n for (Annotation annotation : annotations) {\r\n if (annotation instanceof DiagramModel) {\r\n DiagramModel diagramModel = (DiagramModel) annotation;\r\n return diagramModel.version();\r\n }\r\n }\r\n return \"0.0\";\r\n }",
"public String getEngineVersion() {\n return this.EngineVersion;\n }",
"public int getLibVersionNumber();",
"public int getGlVersion() {\n return mGlVersion;\n }",
"public String getEngineVersion() {\n return this.engineVersion;\n }",
"@Nullable\n public String getVersion() {\n return gav.getVersion();\n }",
"public void setFaceModelVersion(String FaceModelVersion) {\n this.FaceModelVersion = FaceModelVersion;\n }",
"public Float getVersion() { return version; }",
"public int getLastVersion() {\n return emlVersion - 1;\n }",
"@objid (\"1fac425c-de46-4e1e-b4d3-45a97af65df0\")\n @Override\n public Version getVersion() {\n return ModelioVersion.VERSION;\n }",
"@Override\n\tpublic java.lang.String getVersion() {\n\t\treturn _scienceApp.getVersion();\n\t}",
"int getCurrentVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"public int getMaxVersion ()\n {\n return max_version;\n }",
"public String getModel() {\n\t\treturn \"0.11.2\";\n\t}",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}",
"public java.lang.String getMATERIAL_VERSION() {\r\n return MATERIAL_VERSION;\r\n }",
"public int getEmlVersion() {\n return emlVersion;\n }",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"@ApiModelProperty(example = \"36867\", required = true, value = \"The entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. \")\n public Integer getVersion() {\n return version;\n }",
"public static String getVersion() {\n if (version != null) {\n return version;\n }\n\n Package p = MCBouncer.class.getPackage();\n\n if (p == null) {\n p = Package.getPackage(\"com.mcbouncer\");\n }\n\n if (p == null) {\n version = \"(unknown)\";\n } else {\n version = p.getImplementationVersion();\n\n if (version == null) {\n version = \"(unknown)\";\n }\n }\n\n return version;\n }",
"public String getVersion()\n {\n //\n // Send EFFECT_CMD_GET_PARAM\n //\n int verLen = 32;\n byte[] version = new byte[verLen];\n getParameter(EFFECT_PARAM_VERSION, version);\n String strFull = new String(version);\n // find the '\\0' in c/c++ format\n int endPos = strFull.indexOf(0);\n String strVer = new String(version, 0, endPos);\n return strVer;\n }",
"org.chromium.components.paint_preview.common.proto.PaintPreview.ChromeVersionProto getChromeVersion();",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"Version getVersion();",
"public Float getVersionNumber() {\n return versionNumber;\n }",
"public int getVersion() {\n return (buffer.get(0) & 0xC0) >> 6;\n }",
"public int getVersion()\n {\n return info.getVersion().intValueExact();\n }",
"public String getProductVersion();",
"public String getIgmlVersion()\n {\n return igmlVersion;\n }",
"public Version getVersion();",
"long getVersion();",
"long getVersion();",
"long getVersion();",
"long getVersion();",
"public float version() { return 0.9f; }",
"String version();",
"Integer getVersion();",
"public String getVersion () {\r\n return version;\r\n }",
"public native int get_majorversion();",
"public String getVersionNum();",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public int getVersion() {\n return version;\n }",
"public CimString getVersion() {\n return version;\n }",
"public String getVersionConstraint() {\n return version;\n }",
"public final int getVersion() {\n return version;\n }",
"public java.lang.String getVersion() {\r\n return version;\r\n }",
"public String getVersion() {\r\n return version;\r\n }",
"public String getVersion()\n {\n return ver;\n }",
"public String getVersion()\n {\n return version;\n }",
"public String getVersion()\n {\n return version;\n }",
"public String getFoundVersion() {\r\n\t\treturn this.fnd;\r\n\t}",
"public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}",
"public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}",
"public abstract String getOntologyEditorVersion();",
"public native static String getLameVersion();",
"public native static String getLameVersion();",
"public String getVersion() {\r\n\t\treturn version;\r\n\t}",
"public String getVersion()\n {\n return version;\n }",
"public Number getVersion() {\n return (Number) getAttributeInternal(VERSION);\n }",
"public static String getVersion() {\n\t\treturn version;\r\n\t}",
"public String getVersion() {\n\t\treturn version;\n\t}",
"public abstract int getVersion();",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }"
] | [
"0.6467114",
"0.6215917",
"0.61819285",
"0.6128033",
"0.59740776",
"0.59567326",
"0.59493524",
"0.5942843",
"0.5906263",
"0.5889911",
"0.5874993",
"0.58507025",
"0.5831113",
"0.58213747",
"0.58119386",
"0.5756879",
"0.5756879",
"0.5756879",
"0.5756879",
"0.5756879",
"0.5756879",
"0.5756879",
"0.5756879",
"0.5746014",
"0.5735196",
"0.5734606",
"0.5734606",
"0.5734606",
"0.5734606",
"0.572609",
"0.5724457",
"0.5706983",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.5700687",
"0.56848365",
"0.5679999",
"0.5653241",
"0.56495225",
"0.5649441",
"0.5649441",
"0.5649441",
"0.5649441",
"0.5638054",
"0.5636946",
"0.56350666",
"0.5634258",
"0.5631534",
"0.5631114",
"0.5618422",
"0.5618422",
"0.5618422",
"0.5618422",
"0.5615285",
"0.5586969",
"0.5582659",
"0.5560402",
"0.55507004",
"0.55405855",
"0.5538605",
"0.5538605",
"0.5538605",
"0.5538605",
"0.5538605",
"0.5533922",
"0.5518171",
"0.5511357",
"0.5506594",
"0.5503618",
"0.55018127",
"0.5499916",
"0.5499916",
"0.5496095",
"0.549363",
"0.549363",
"0.54889375",
"0.5479742",
"0.5479742",
"0.5470343",
"0.5469986",
"0.54663086",
"0.546191",
"0.54557115",
"0.5452864",
"0.5451336",
"0.5451336",
"0.5451336",
"0.5451336",
"0.5451336",
"0.5451336",
"0.5451336",
"0.5451336"
] | 0.7638832 | 0 |
Set Algorithm model version used for face recognition. Valid value: `3.0`. | public void setFaceModelVersion(String FaceModelVersion) {
this.FaceModelVersion = FaceModelVersion;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getFaceModelVersion() {\n return this.FaceModelVersion;\n }",
"@Override\n\tpublic void setMethodVersion() {\n\t\tthis.version=\"app3.5\";\n\t}",
"int getGvlSpecificationVersion();",
"@Override\n public int getVersion() {\n return 3;\n }",
"@Override\r\n\tpublic void setVersion(int version) {\n\r\n\t}",
"public void setVersion(String version);",
"void setVersion(long version);",
"public float getVersion();",
"public void setVersion(String version) {\n\t\t\r\n\t}",
"void setVersion(String version);",
"void setVersion(String version);",
"@Override\n\tpublic void setVersion(java.lang.String version) {\n\t\t_scienceApp.setVersion(version);\n\t}",
"public float version() { return 0.9f; }",
"@objid (\"1fac425c-de46-4e1e-b4d3-45a97af65df0\")\n @Override\n public Version getVersion() {\n return ModelioVersion.VERSION;\n }",
"@Override\n\tpublic java.lang.String getVersion() {\n\t\treturn _scienceApp.getVersion();\n\t}",
"public void setVersion(String version){\r\n this.version = version;\r\n }",
"public void setVersion(int version) {\n this.version = version;\n }",
"public void setVersion(int version) {\n this.version = version;\n }",
"public void setVersion(int value) {\n this.version = value;\n }",
"@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}",
"public Float getVersion() { return version; }",
"public static void setModel(ClassifierModel model) {\n\t\tif(model.isIJUsed()) {\r\n\t\t\tpreprocess.setIJModel(model.getPreprocessModel());\r\n\t\t\tsvm.setIJModel(model.getSvmmodel());\r\n\t\t}\r\n\t\telse {\r\n\t\t\tpreprocess.setJFModel(model.getPreprocessModel());\r\n\t\t\tsvm.setJFModel(model.getSvmmodel());\r\n\t\t}\r\n\t}",
"public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }",
"public String getModel() {\n\t\treturn \"0.11.2\";\n\t}",
"public void setVersion(Integer version) {\r\n this.version = version;\r\n }",
"void setKarafVersion(String version);",
"public void resetLowerface() {\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setSmile(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setClench(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setSmirkLeft(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setSmirkRight(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setLaugh(0);\n\t}",
"public void setVersion(long version) {\n this.version = version;\n }",
"public int getGlVersion() {\n return mGlVersion;\n }",
"@ApiModelProperty(example = \"36867\", required = true, value = \"The entity version. The higher byte represents the network identifier: * 0x68 (MAIN_NET) - Public main network. * 0x98 (TEST_NET) - Public test network. * 0x60 (MIJIN) - Private network. * 0x90 (MIJIN_TEST) - Private test network. \")\n public Integer getVersion() {\n return version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(long param){\n \n // setting primitive attribute tracker to true\n \n if (param==java.lang.Long.MIN_VALUE) {\n localVersionTracker = false;\n \n } else {\n localVersionTracker = true;\n }\n \n this.localVersion=param;\n \n\n }",
"@ApiModelProperty(example = \"null\", value = \"Use this version in conjuction with the classifier name for referring to this classifier in a configuration provided with the media for processing\")\n public String getClassifierVersion() {\n return classifierVersion;\n }",
"public void setVersion( Integer version ) {\n this.version = version;\n }",
"public int getMaxVersion ()\n {\n return max_version;\n }",
"private void setVersionNumber(int version) {\n versionNumber = version;\n }",
"private void setChromeVersion(org.chromium.components.paint_preview.common.proto.PaintPreview.ChromeVersionProto value) {\n value.getClass();\n chromeVersion_ = value;\n bitField0_ |= 0x00000004;\n }",
"public String getEngineVersion() {\n return this.EngineVersion;\n }",
"public abstract String getOntologyEditorVersion();",
"public void setVersion(String version)\n {\n this.ver = version;\n }",
"public void setVersion(String version)\n {\n this.version = version;\n }",
"public void setDataModelCatalogueVersion(java.lang.String value) {\n this.dataModelCatalogueVersion = value;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}",
"public String getEngineVersion() {\n return this.engineVersion;\n }",
"org.chromium.components.paint_preview.common.proto.PaintPreview.ChromeVersionProto getChromeVersion();",
"public int getEmlVersion() {\n return emlVersion;\n }",
"public static String getModelerFileVersion() {\r\n Class _class = JPAFileActionListener.class;\r\n Annotation[] annotations = _class.getAnnotations();\r\n\r\n for (Annotation annotation : annotations) {\r\n if (annotation instanceof DiagramModel) {\r\n DiagramModel diagramModel = (DiagramModel) annotation;\r\n return diagramModel.version();\r\n }\r\n }\r\n return \"0.0\";\r\n }",
"public String getIgmlVersion()\n {\n return igmlVersion;\n }",
"public int getVersion() { return 1; }",
"public void setEngineVersion(String engineVersion) {\n this.engineVersion = engineVersion;\n }",
"public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}",
"public void initialize(Model model){\r\n\t\tArrayList<String> elements = new ArrayList<String>();\r\n\t\tfor(int i = 0; i < model.getElements().size(); i++){\r\n\t\t\telements.add(model.getElements().get(i).getId());\r\n\t\t}\r\n\t\t\r\n\t\tFeature base = new Feature(\"base\", \"mandatory\", \"root\", elements);\r\n\t\tthis.mandatoryFeatures.add(base);\r\n\t\tFeatureGroup variants = new FeatureGroup(\"variants\", \"alternative\", \"root\");\r\n\t\tthis.alternativeFeatureGroup.add(variants);\r\n\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newVariant = new Feature(model.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t}",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setIgmlVersion(String igmlVersion)\n {\n this.igmlVersion = igmlVersion;\n }",
"public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}",
"public static void setProtocol(int protocolVersion) {\n\t\t\n\t}",
"public void setEngineVersion(String EngineVersion) {\n this.EngineVersion = EngineVersion;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"@Override\n public int getVersion() {\n return 0;\n }",
"private void setVersion(long value) {\n bitField0_ |= 0x00000002;\n version_ = value;\n }",
"public Gel_BioInf_Models.VirtualPanel.Builder setDataModelCatalogueVersion(java.lang.String value) {\n validate(fields()[3], value);\n this.dataModelCatalogueVersion = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"public int getNextVersion() {\n return emlVersion + 1;\n }",
"public int getLastVersion() {\n return emlVersion - 1;\n }",
"@Override\r\n \tpublic void onModelConfigFromCache(OpenGLModelConfiguration model) {\n \t\tboolean hasNewer = getCurrentTarget().getLatestModelVersion() > \r\n \t\t\t\t\t\t model.getOpenGLModel().getModelVersion();\r\n \t\tthis.fireOnModelDataEvent(model, hasNewer);\r\n \t}",
"public void setVersion(String version) {\n\t\tthis.version = version;\n\t}",
"public int getLibVersionNumber();",
"public void setVersion(java.lang.String version) {\r\n this.version = version;\r\n }",
"@Override\n public int getImplVersion() {\n return EVOLVABLE_VERSION;\n }",
"@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}",
"public void setVersion(final Long version);",
"@Override\n public int getVersion() {\n return 4;\n }",
"public void setEnsemblVersion(java.lang.String value) {\n this.ensemblVersion = value;\n }",
"int getCurrentVersion();",
"public BoofCVMeta() {\n\n addDependency(\"org.boofcv\", \"boofcv-all\", \"0.40.1\");\n addDescription(\"BoofCV computer vision service\");\n addCategory(\"vision\");\n }",
"public void setVersion(int version)\n {\n encryptionDictionary.setInt( \"V\", version );\n }",
"@DOMSupport(DomLevel.THREE)\r\n\t@BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@Property String getXmlVersion();",
"public void setAlgorithm(Algorithm alg) {\n this.algorithm=alg;\n }",
"@Override\n public double getVersion() {\n return 0;\n }",
"public abstract int getVersion();",
"@SuppressWarnings(\"unused\")\n private void setVersion(Long version) {\n this.version = version;\n }",
"public java.lang.String getMATERIAL_VERSION() {\r\n return MATERIAL_VERSION;\r\n }",
"private void setDeviceModel() {\n addToMobileContext(Parameters.DEVICE_MODEL, android.os.Build.MODEL);\n }",
"public EngineSwitch() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = EnginePackage.eINSTANCE;\n\t\t}\n\t}",
"public void setAlg(AlgoDiffusion alg) {\n\t\tthis.alg = alg;\n\t}",
"@SuppressWarnings(\"unused\")\n private void setVersion(final Integer version) {\n this.version = version;\n }",
"@SuppressWarnings(\"unused\")\n private void setVersion(final Integer version) {\n this.version = version;\n }",
"public final void setVersion(String version) {\n this.version = version;\n }",
"@Override\n public String getAlgorithm()\n {\n return algorithm;\n }",
"public String getGLVersion()\n\t{\n\t\treturn glGetString(GL_VERSION);\n\t}",
"public Gel_BioInf_Models.VirtualPanel.Builder setEnsemblVersion(java.lang.String value) {\n validate(fields()[2], value);\n this.ensemblVersion = value;\n fieldSetFlags()[2] = true;\n return this; \n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Deprecated, use the appropriate `pipeline` version. Specify a specific verison of PrinceXML to use.\")\n @JsonProperty(JSON_PROPERTY_VERSION)\n @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)\n\n public String getVersion() {\n return version;\n }"
] | [
"0.6865857",
"0.55861133",
"0.5533117",
"0.5491211",
"0.54804105",
"0.5479785",
"0.5343397",
"0.5288071",
"0.528739",
"0.5279888",
"0.5279888",
"0.52758527",
"0.52748376",
"0.5220967",
"0.51889586",
"0.5182538",
"0.51756066",
"0.51756066",
"0.5173237",
"0.5149837",
"0.5133352",
"0.5129996",
"0.5111987",
"0.50917625",
"0.50801945",
"0.50731784",
"0.5072316",
"0.5072023",
"0.50709087",
"0.50678426",
"0.5035768",
"0.5035768",
"0.50339866",
"0.5033093",
"0.50322604",
"0.50299096",
"0.50256586",
"0.5022143",
"0.501999",
"0.5016951",
"0.5013675",
"0.50106597",
"0.5007065",
"0.50041825",
"0.50041825",
"0.50041825",
"0.50041825",
"0.50041825",
"0.50041825",
"0.5000011",
"0.4990993",
"0.49862182",
"0.49848253",
"0.49810225",
"0.497783",
"0.4975274",
"0.49532658",
"0.49496794",
"0.49369797",
"0.49365154",
"0.49329722",
"0.49286464",
"0.49234056",
"0.4922435",
"0.49195835",
"0.49195835",
"0.49195835",
"0.4915638",
"0.4913842",
"0.49084806",
"0.49012232",
"0.48996758",
"0.48982537",
"0.4891492",
"0.48890743",
"0.48828724",
"0.4882704",
"0.48806816",
"0.4873695",
"0.48716965",
"0.48629594",
"0.48477373",
"0.48466292",
"0.4830249",
"0.48240218",
"0.48172587",
"0.48163432",
"0.48149276",
"0.48085153",
"0.48079103",
"0.48063472",
"0.4805648",
"0.48042572",
"0.479962",
"0.479962",
"0.4799592",
"0.4792384",
"0.47915947",
"0.4790413",
"0.4785433"
] | 0.69930357 | 0 |
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. | public DetectLiveFaceAccurateRequest(DetectLiveFaceAccurateRequest source) {
if (source.Image != null) {
this.Image = new String(source.Image);
}
if (source.Url != null) {
this.Url = new String(source.Url);
}
if (source.FaceModelVersion != null) {
this.FaceModelVersion = new String(source.FaceModelVersion);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void set(String key, Object value);",
"void set(K key, V value);",
"public setKeyValue_args(setKeyValue_args other) {\n if (other.isSetKey()) {\n this.key = other.key;\n }\n if (other.isSetValue()) {\n this.value = other.value;\n }\n }",
"public abstract void set(String key, T data);",
"Object put(Object key, Object value);",
"public native Map<K, V> set(K key, V value);",
"@Test\n public void testSet() {\n Assert.assertTrue(map.set(\"key-1\", \"value-1\", 10));\n Assert.assertTrue(map.set(\"key-1\", \"value-2\", 10));\n Assert.assertTrue(map.set(\"key-2\", \"value-1\", 10));\n }",
"private void setKeySet(OwnSet<K> st){\n this.keySet = st; \n }",
"void set(K k, V v) throws OverflowException;",
"public Value put(Key key, Value thing) ;",
"@Test\n\tpublic void testPutAccessReodersElement() {\n\t\tmap.put(\"key1\", \"value1\");\n\n\t\tSet<String> keySet = map.keySet();\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key1\",\n\t\t\tkeySet.iterator().next());\n\n\t\t// move 2 to the top/front\n\t\tmap.put(\"key2\", \"value2\");\n\t\tassertEquals(\"Calling get on an element did not move it to the front\", \"key2\",\n\t\t\tkeySet.iterator().next());\n\t}",
"public void set(String key, Object value) {\n set(key, value, 0);\n }",
"final <T> void set(String key, T value) {\n set(key, value, false);\n }",
"public void setObject(final String key, final Object value)\r\n {\r\n if (key == null)\r\n {\r\n throw new NullPointerException();\r\n }\r\n if (value == null)\r\n {\r\n helperObjects.remove(key);\r\n }\r\n else\r\n {\r\n helperObjects.put(key, value);\r\n }\r\n }",
"@Override\n public void put(K key, V value) {\n // Note that the putHelper method considers the case when key is already\n // contained in the set which will effectively do nothing.\n root = putHelper(root, key, value);\n size += 1;\n }",
"@Override\n public V put(K key, V value) {\n if (!containsKey(key)) {\n keys.add(key);\n }\n\n return super.put(key, value);\n }",
"@Test\n public void keySetTest()\n {\n map.putAll(getAMap());\n assertNotNull(map.keySet());\n }",
"public void set(String newKey)\n\t{\n\t\tthis.Key = newKey;\n\t}",
"public void setValue(K key, V value);",
"public Value set(Value key, Value value) {\n\t\tif (get(key) != null)\n\t\t\tput(key, value);\n\t\telse if (parent != null)\n\t\t\tparent.put(key, value);\n\t\telse\n\t\t\tput(key, value);\n\t\treturn value;\n\t}",
"final void set(String key, String value) {\n set(key, value, false);\n }",
"void put(String key, Object obj);",
"public void set(Object key, Object value) {\n if(attributes == null)\n attributes = new HashMap<>();\n attributes.put(key, value);\n }",
"private void put(K key, V value) {\n\t\t\tif (key == null || value == null)\n\t\t\t\treturn;\n\t\t\telse if (keySet.contains(key)) {\n\t\t\t\tvalueSet.set(keySet.indexOf(key), value);\n\t\t\t} else {\n\t\t\t\tkeySet.add(key);\n\t\t\t\tvalueSet.add(keySet.indexOf(key), value);\n\t\t\t\tsize++;\n\t\t\t}\n\t\t}",
"void put(String key, Object value);",
"Object put(Object key, Object value) throws NullPointerException;",
"public void testNormalKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }",
"@Override\n public synchronized Object put(Object key, Object value) {\n if (value instanceof String) {\n value = ((String) value).trim();\n }\n String strkey = key.toString();\n if (this.ignoreCase) {\n this.keyMap.put(strkey.toLowerCase(), strkey);\n }\n return super.put(strkey, value);\n }",
"@Override\n public V put(K key, V value) {\n reverseMap.put(value, key);\n return super.put(key, value);\n }",
"public void testSet(){\n stringRedisTemplate.opsForSet().add(\"set-key\",\"a\",\"b\",\"c\");\n //srem set-key c d\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n stringRedisTemplate.opsForSet().remove(\"set-key\",\"c\",\"d\");\n //scard set-key\n stringRedisTemplate.opsForSet().size(\"set-key\");\n //smembers set-key\n stringRedisTemplate.opsForSet().members(\"set-key\");\n //smove set-key set-key2 a\n stringRedisTemplate.opsForSet().move(\"set-key\",\"a\",\"set-key2\");\n stringRedisTemplate.opsForSet().move(\"set-key\",\"c\",\"set-key2\");\n\n //sadd skey1 a b c d\n stringRedisTemplate.opsForSet().add(\"skey1\",\"a\",\"b\",\"c\",\"d\");\n //sadd skey2 c d e f\n stringRedisTemplate.opsForSet().add(\"skey2\",\"c\",\"d\",\"e\",\"f\");\n //sdiff skey1 skey2 //存在与skey1中不存在与skey2中, a b\n stringRedisTemplate.opsForSet().difference(\"skey1\",\"skey2\");\n //sinter skey1 skey2 // c d\n stringRedisTemplate.opsForSet().intersect(\"skey1\",\"skey2\");\n //sunion skey1 skey2 // a b c d e f\n stringRedisTemplate.opsForSet().union(\"skey1\",\"skey2\");\n }",
"protected abstract void put(K key, V value);",
"protected abstract void _set(String key, Object obj, Date expires);",
"Set getLocalKeySet();",
"void setObjectKey(String objectKey);",
"String set(K key, V value, SetOption setOption, long expirationTime, TimeUnit timeUnit);",
"public Object putTransient(Object key, Object value);",
"public JbootVoModel set(String key, Object value) {\n super.put(key, value);\n return this;\n }",
"public abstract void Put(WriteOptions options, Slice key, Slice value) throws IOException, BadFormatException, DecodeFailedException;",
"public void set(String key, Object value) {\r\n\t\tthis.context.setValue(key, value);\r\n\t}",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"@Override\r\n\tpublic void putObject(Object key, Object value) {\n\t\t\r\n\t}",
"public MapVS(SetVS<T> keys, Map<K, V> entries) {\n this.keys = keys;\n this.entries = entries;\n this.concreteHash = computeConcreteHash();\n }",
"void put(Object indexedKey, Object key);",
"public abstract V put(K key, V value);",
"void setKey(K key);",
"@Override\n\tpublic void put(S key, T val) {\n\t\t\n\t}",
"public void set(String key, Object value)\n {\n if (value == null) remove(key);\n else if (value instanceof Map)\n {\n DataSection section = createSection(key);\n Map map = (Map) value;\n for (Object k : map.keySet())\n {\n section.set(k.toString(), map.get(k));\n }\n }\n else\n {\n data.put(key, value);\n if (!keys.contains(key)) keys.add(key);\n }\n }",
"@Override\n public void put(K key, V value) {\n root = put(root, key, value);\n }",
"public void attach(Object key, Object value);",
"public static interface SetFilter extends KeyValueFilter {\r\n\t\tObject put(String name, Object value);\r\n\t}",
"void put(K key, V value);",
"void put(K key, V value);",
"public void set(K key, V value)\n {\n // If there are too many entries, expand the table.\n if (this.size > (this.buckets.length * LOAD_FACTOR))\n {\n expand();\n } // if there are too many entries\n // Find out where the key belongs.\n int index = this.find(key);\n // Create a new association list, if necessary.\n if (buckets[index] == null)\n {\n this.buckets[index] = new AssociationList<K, V>();\n } // if (buckets[index] == null)\n // Add the entry.\n AssociationList<K, V> bucket = this.get(index);\n int oldsize = bucket.size;\n bucket.set(key, value);\n // Update the size\n this.size += bucket.size - oldsize;\n }",
"@Override\n public void put(K key, V value) {\n root = putHelper(key,value,root);\n }",
"public void testCache() {\n MethodKey m = new MethodKey(\"aclass\", \"amethod\", new Object[]{1, \"fads\", new Object()});\n String mValue = \"my fancy value\";\n MethodKey m1 = new MethodKey(\"aclass\", \"amethod1\", new Object[]{1, \"fads\", new Object()});\n String mValue1 = \"my fancy value1\";\n MethodKey m2 = new MethodKey(\"aclass\", \"amethod2\", new Object[]{1, \"fads\", new Object()});\n String mValue2 = \"my fancy value2\";\n\n GenericCache.setValue(m, mValue);\n GenericCache.setValue(m1, mValue1);\n GenericCache.setValue(m2, mValue2);\n\n assertEquals(GenericCache.getValue(m), mValue);\n assertEquals(GenericCache.getValue(m1), mValue1);\n assertEquals(GenericCache.getValue(m2), mValue2);\n }",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"@Override\n\tpublic void set(K key, List<V> value) {\n\t\t\n\t}",
"public OwnMap() {\n super();\n keySet = new OwnSet();\n }",
"public void setKey (K k) {\n key = k;\n }",
"public void setItemCollection(HashMap<String, Item> copy ){\n \titemCollection.putAll(copy);\r\n }",
"public void put(Key key, Value val);",
"public void setValue(String key, Object value)\n {\n if (value != null)\n {\n if (otherDetails == null)\n {\n otherDetails = new Hashtable();\n }\n\n otherDetails.put(key, value);\n }\n }",
"ISObject put(String key, ISObject stuff) throws UnexpectedIOException;",
"public void put(Comparable key, Stroke stroke) {\n/* 120 */ ParamChecks.nullNotPermitted(key, \"key\");\n/* 121 */ this.store.put(key, stroke);\n/* */ }",
"public void set(R key, List<S> value){\n map.remove(key);\n map.put(key, value);\n }",
"public V put(K key, V value) throws InvalidKeyException;",
"@SuppressWarnings(\"resource\")\n @Test\n public void testClone() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127625049L), 88,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"18fa817e-9d24-4344-a79a-ab19db23016c\", -15,\n \"7b9ca8ca-2f09-4496-b67e-f3a146e5c741\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127627362L));\n ApiKey apikey2 = apikey1.clone();\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }",
"public final void set(final String key, final Object value) {\n try {\n synchronized (jo) {\n if (value == null) {\n jo.remove(key);\n } else {\n jo.put(key, value);\n }\n }\n } catch (JSONException e) {\n }\n }",
"public T set(T obj);",
"V put(K key, V value);",
"@Test\n public void testPutAll_Existing() {\n Map<String, String> toAdd = fillMap(1, 10, \"\", \"Old \");\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10, \"\", \"New \");\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n for (String k : toAdd.keySet()) {\n String old = toAdd.get(k);\n String upd = toUpdate.get(k);\n\n verify(helper).fireReplace(entry(k, old), entry(k, upd));\n }\n verifyNoMoreInteractions(helper);\n }",
"public boolean put(String key, String value);",
"void put(String key, String value) throws StorageException, ValidationException, KeyValueStoreException;",
"public void set(R key, Collection<S> value){\n map.remove(key);\n map.put(key, Collections.synchronizedList(Sugar.listFromCollections(value)));\n }",
"@Before\r\n public void test_change(){\r\n HashTable<String,String> table = new HashTable<>(1);\r\n MySet<String> s = (MySet<String>) table.keySet();\r\n table.put(\"AA\",\"BB\");\r\n table.put(\"AA\",\"CC\");\r\n assertTrue(s.contains(\"AA\"));\r\n table.remove(\"AA\");\r\n assertFalse(s.contains(\"AA\"));\r\n }",
"public void put(String key, Object value)\n\t{\n\t\tverifyParseState();\n\t\tvalues.put(key, ValueUtil.createValue(value));\n\t}",
"public boolean put( KEY key, OBJECT object );",
"boolean setValue(String type, String key, String value);",
"public Set<V> put(K key, Collection<V> set) {\n // Remove any possibly existing prior association with the key\n Set<V> result = remove(key);\n\n // Note: The second argument is effectless, as we cannot encounter item type errors here\n NavigableSet<V> navSet = createNavigableSet(set, true);\n Iterator<V> it = navSet.iterator();\n\n SetTrieNode currentNode = superRootNode;\n while(it.hasNext()) {\n V v = it.next();\n\n SetTrieNode nextNode = currentNode.nextValueToChild == null ? null : currentNode.nextValueToChild.get(v);\n if(nextNode == null) {\n nextNode = new SetTrieNode(nextId++, currentNode, v);\n if(currentNode.nextValueToChild == null) {\n currentNode.nextValueToChild = new TreeMap<>(comparator);\n }\n currentNode.nextValueToChild.put(v, nextNode);\n }\n currentNode = nextNode;\n }\n\n if(currentNode.keyToSet == null) {\n currentNode.keyToSet = new HashMap<>();\n }\n\n currentNode.keyToSet.put(key, navSet);\n\n keyToNode.put(key, currentNode);\n\n return result;\n }",
"public K setKey(K key);",
"@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() {\n\t\tLongOpenHashSet c;\n\t\ttry {\n\t\t\tc = (LongOpenHashSet) super.clone();\n\t\t} catch (CloneNotSupportedException cantHappen) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t\tc.key = key.clone();\n\t\tc.state = state.clone();\n\t\treturn c;\n\t}",
"Set keySet(final TCServerMap map) throws AbortedOperationException;",
"public IDataKey clone() {\n return new IDataKey(this);\n }",
"boolean canSet(String key);",
"@Test\n public void testBackdoorModificationSameKey()\n {\n testBackdoorModificationSameKey(this);\n }",
"public abstract void copyFrom(KeyedString src);",
"@Override\n public V put(K key, V value) {\n if ((key == null) || (value == null)) {\n logger.warn(\"NULL key or value key = \" + key + \". value = \" + value);\n System.out.println(StringUtils.join(Thread.currentThread().getStackTrace(), \"\\n\"));\n return null;\n }\n\n // If this map is supposed to be case insensitive, uppercase the key before putting it\n // in the map\n if (caseInsensitive && key instanceof String) {\n return super.put(((K) key.toString().toUpperCase()), value);\n } else {\n return super.put(key, value);\n }\n }",
"public void set(String key, String value){\n\t\tif(first == null){\n\t\t\tfirst = new ListMapEntry(key, value);\n\t\t}\n\t\tListMapEntry temp = first;\n\t\tListMapEntry prev = null;\n\t\twhile(temp!=null && !temp.getKey().equals(key)){\n\t\t\tprev = temp;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\tif(temp==null){\n\t\t\tprev.setNext(new ListMapEntry(key, value));\n\t\t}\n\t\telse{\n\t\t\ttemp.setValue(value);\n\t\t}\n\t}",
"V put(final K key, final V value);",
"public void set(String key, Object obj) {\n options.put(key, obj);\n }",
"boolean put(K key, V value);",
"@Override\n\tpublic void put(Object key, Object val) {\n\t\tif(st[hash(key)].size()>=k)\n\t\t\tst[hash(key)].clear();\n\t\tst[hash(key)].put(key, st[hash(key)].size());\n\t}",
"protected abstract boolean _setIfAbsent(String key, Object value, Date expires);",
"@Override\n public void putValue(String key, Object value) {\n\n }",
"public DelegateAbstractHashMap(AbstractHashSet set) {\n\t\t\tsuper();\n\t\t\tthis.set = set;\n\t\t}",
"public void changeKey(String key, Object newValue){\n try {\n myJSON.put(key, newValue);\n writeToFile();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n public V put(K key, V value){\r\n \r\n // Declare a temporay node and instantiate it with the key and\r\n // previous value of that key\r\n TreeNode<K, V> tempNode = new TreeNode<>(key, get(key));\r\n \r\n // Call overloaded put function to either place a new node\r\n // in the tree or update the exisiting value for the key\r\n root = put(root, key, value);\r\n \r\n // Return the previous value of the key through the temporary node\r\n return tempNode.getValue();\r\n }",
"public void put(String key, T value);",
"String setKey(String newKey);",
"@Test\n public void testPutAll_ExistingNoChange() {\n Map<String, String> toAdd = fillMap(1, 10);\n\n map.putAll(toAdd);\n\n Map<String, String> toUpdate = fillMap(1, 10);\n\n configureAnswer();\n testObject.putAll(toUpdate);\n\n verifyZeroInteractions(helper);\n }",
"public void set(String key, String value) {\n if (key.indexOf('=') != -1 || key.indexOf(';') != -1) {\n Log.e(TAG, \"Key \\\"\" + key + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n if (value.indexOf('=') != -1 || value.indexOf(';') != -1) {\n Log.e(TAG, \"Value \\\"\" + value + \"\\\" contains invalid character (= or ;)\");\n return;\n }\n\n mMap.put(key, value);\n }"
] | [
"0.6439152",
"0.6414709",
"0.61446995",
"0.6115921",
"0.60933155",
"0.6080855",
"0.6040002",
"0.5989796",
"0.5973415",
"0.5954667",
"0.5837202",
"0.5826559",
"0.5789158",
"0.5703707",
"0.5702792",
"0.5686423",
"0.5686197",
"0.56760824",
"0.5608089",
"0.5589672",
"0.55803746",
"0.55691224",
"0.5558996",
"0.5552324",
"0.55481434",
"0.5532153",
"0.5526579",
"0.55099195",
"0.54965144",
"0.5490644",
"0.54819924",
"0.5465857",
"0.5432234",
"0.5425267",
"0.54214215",
"0.54130936",
"0.54105455",
"0.53788185",
"0.537602",
"0.5373302",
"0.5373021",
"0.53566146",
"0.5349408",
"0.5339951",
"0.53288627",
"0.53197664",
"0.52928215",
"0.528518",
"0.5282911",
"0.52647614",
"0.5257397",
"0.5257397",
"0.5256513",
"0.525583",
"0.5255459",
"0.52410936",
"0.52367216",
"0.5233837",
"0.522777",
"0.5225811",
"0.5224972",
"0.52162015",
"0.5215161",
"0.5200167",
"0.5194268",
"0.51889104",
"0.51818025",
"0.5181208",
"0.51764554",
"0.51757354",
"0.517504",
"0.51741177",
"0.5172815",
"0.516964",
"0.5134351",
"0.5131155",
"0.51286465",
"0.5127461",
"0.5125156",
"0.51214117",
"0.5120912",
"0.5120752",
"0.5103162",
"0.51026803",
"0.5100949",
"0.509825",
"0.5097157",
"0.5090395",
"0.50742656",
"0.5069592",
"0.5064839",
"0.506299",
"0.5049511",
"0.5026467",
"0.50238734",
"0.50204384",
"0.50195664",
"0.50194883",
"0.5014579",
"0.50128937",
"0.50127393"
] | 0.0 | -1 |
Internal implementation, normal users should not use it. | public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "Image", this.Image);
this.setParamSimple(map, prefix + "Url", this.Url);
this.setParamSimple(map, prefix + "FaceModelVersion", this.FaceModelVersion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public int retroceder() {\n return 0;\n }",
"protected Doodler() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\r\n\tpublic void init() {}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void apply() {\n }",
"private TestsResultQueueEntry() {\n\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"private final void i() {\n }",
"protected void h() {}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private Util() { }",
"@Override\n public void init() {}",
"@Override public int describeContents() { return 0; }",
"public void method_4270() {}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"@Override\n public void init() {\n\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"protected void init() {\n // to override and use this method\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private TedCorrigendumHandler() {\n throw new AssertionError();\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"protected boolean func_70041_e_() { return false; }",
"@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 preprocess() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"protected void additionalProcessing() {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\n\tpublic void selfValidate() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"private void assignment() {\n\n\t\t\t}"
] | [
"0.62574834",
"0.6217662",
"0.6024768",
"0.5982239",
"0.5965723",
"0.59330684",
"0.5920059",
"0.58351564",
"0.5781645",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57737285",
"0.57054734",
"0.5701363",
"0.56510806",
"0.56491816",
"0.56491816",
"0.5641364",
"0.5636646",
"0.5636101",
"0.5617263",
"0.56129867",
"0.56071395",
"0.56071395",
"0.5604147",
"0.5597464",
"0.5557192",
"0.5547823",
"0.5538959",
"0.5529547",
"0.5527831",
"0.55252886",
"0.5524415",
"0.55170584",
"0.55161196",
"0.55161196",
"0.5508306",
"0.55039597",
"0.5501735",
"0.5498203",
"0.5492665",
"0.54857016",
"0.54857016",
"0.5484164",
"0.5484164",
"0.54709655",
"0.54671437",
"0.5466405",
"0.54586643",
"0.54480445",
"0.5444829",
"0.544423",
"0.5431154",
"0.54291874",
"0.5428321",
"0.5426861",
"0.5424348",
"0.54216623",
"0.54197234",
"0.54126096",
"0.54122156",
"0.5410503",
"0.5408548",
"0.54017633",
"0.5393527",
"0.5393527",
"0.5393108",
"0.53811836",
"0.53811836",
"0.53765255",
"0.53727305",
"0.5371025",
"0.5368476",
"0.53672004",
"0.5362031",
"0.535984",
"0.53585947",
"0.535824",
"0.53558195",
"0.53554994",
"0.53553045",
"0.53553045",
"0.53553045",
"0.5353958",
"0.53527707",
"0.53524756",
"0.5351759",
"0.535174",
"0.53509206",
"0.53348345",
"0.5334606",
"0.533233",
"0.5331985",
"0.5331269",
"0.5331116",
"0.53306353",
"0.5328405"
] | 0.0 | -1 |
Displays the student information: student mVectorName, id, section, etc. You must fill this information inside the box. | public static void display() {
System.out.println("************************************************************");
System.out.println("* Omar Oraby *");
System.out.println("* 900133379 *");
System.out.println("* Salma Talaat *");
System.out.println("* 900161560 *");
System.out.println("* Ahmed Elshafey *");
System.out.println("* 900131045 *");
System.out.println("* Programming in Java *");
System.out.println("* (2018 Fall) *");
System.out.println("************************************************************");
System.out.println();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void display()\n\t {\n\t\t System.out.println(\"Student ID: \"+id);\n\t\t System.out.println(\"Student Name: \"+name);\n\t\t System.out.println();\n\t }",
"public void printStudentInfo(){\r\n System.out.println(\"Name: \" + getName());\r\n System.out.println(\"Student Id: \" + getId());\r\n printMarks();\r\n System.out.println(\"\\nAverage \" + getAverage() + \"%\");\r\n printNumberOfCoursesInEachLetterGradeCategory();\r\n }",
"public void display() {\n\tSystem.out.println(\"student id is \"+studentid+\"\\t\"+\"student name is \"+studentName+\"\\t\"+\"marks is \"+marks);\r\n}",
"@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }",
"public static void printStudentInfo() {\n\t\tfor (Student student : StudentList)\n\t\t\tSystem.out.println(\"Name: \" + student.getName() + \" Matric Number: \" + student.getMatricNo() + \" Degree:\"\n\t\t\t\t\t+ student.getDegree());\n\t}",
"public ShowStudentInfo() throws SQLException {\n initComponents();\n ShowDetails();\n }",
"public static void display_student() {\n\t\t\n\n \n\t\n\ttry {\n\t\t//jdbc code\n\t\tConnection connection=Connection_Provider.creatC();\t\t\n\n\t\tString q=\"select * from students\";\n\t\t// Create Statement\n\t\tStatement stmt=connection.createStatement();\n\t\tResultSet result=stmt.executeQuery(q);\n\t\twhile (result.next()) {\n\t\t\tSystem.out.println(\"Student id \"+result.getInt(1));\n\t\t\tSystem.out.println(\"Student Name \"+result.getString(2));\n\t\t\tSystem.out.println(\"Student Phone No \"+result.getInt(3));\n\t\t\tSystem.out.println(\"Student City \"+result.getString(4));\n\t\t\tSystem.out.println(\"=========================================\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\t\n\t}",
"private void viewStudent() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the student to be viewed: \");\n long ID = sc.nextLong();\n\n Student s = ctrl.getStudent(ID);\n if (s != null)\n System.out.println(s.toString()); //wir zeigen die Student\n else\n System.out.println(\"Student with this ID doesn't exist!\");\n }",
"public static void show(Student[] student){\n for(int i=0;i<student.length;i++){\n System.out.printf(\"First Name: %s Last Name: %s Gender: %s Student ID: %d GPA: %,.2f Department: %s Midterm Grade: %d Final Grade: %d %n\",student[i].getFirstName(),student[i].getLastName(),student[i].getGender(),student[i].getStudentID(),student[i].getGPA(),student[i].getDepartment(),student[i].getExamGrade().getMidtermExamGrade(),student[i].getExamGrade().getFinalExamGrade());\n }\n }",
"private void fillInCurrentStudentInfo() {\n // Extract info from Student object\n String name = WordUtils.capitalizeFully(mCurrentStudent.getName());\n int sex = mCurrentStudent.getSex();\n mStudentBirthdate = mCurrentStudent.getBirthdate();\n int grade = mCurrentStudent.getGrade();\n mChosenClassesList = (ArrayList<String>) mCurrentStudent.getClasses();\n String classes = TextUtils.join(\", \", mChosenClassesList);\n String photoUrl = mCurrentStudent.getPhotoUrl();\n\n // Populate views with the current student's information\n mStudentNameEditText.setText(name);\n mStudentBirthdateTextView.setText(DateUtils.convertDateLongToString(mStudentBirthdate));\n mStudentGradeEditText.setText(String.valueOf(grade));\n mStudentClassesTextView.setText(classes);\n mStudentClassesTextView.setVisibility(View.VISIBLE);\n\n // Set student photo (if it exists)\n if (!TextUtils.isEmpty(photoUrl)) {\n Glide.with(mAddPhotoView.getContext())\n .load(photoUrl)\n .into(mAddPhotoView);\n studentHasPhoto = true;\n }\n\n // Set student sex spinner\n switch (sex) {\n case SEX_MALE_INT:\n mStudentSexSpinner.setSelection(SEX_MALE_INT);\n break;\n case SEX_FEMALE_INT:\n mStudentSexSpinner.setSelection(SEX_FEMALE_INT);\n break;\n default:\n throw new IllegalArgumentException(\"Invalid sex\");\n }\n }",
"public void showstudents(){\n for (int i=0; i<slist.size(); i++){\n System.out.println(slist.get(i).getStudent());\n }\n }",
"public void populateDetails() {\n\n txtpn_NameHeading.setText(selStudent.getfName() + \" \" + selStudent.getlName());\n\n txtpn_RacesComplete.setText(String.valueOf(dataCur.countNumberRaces(selStudent.getId())));\n txtpn_DaysAbsent.setText(String.valueOf(selStudent.getAttend()));\n txtpn_AgeGroup.setText(String.valueOf(selStudent.getAge()));\n\n }",
"public static void studentExtended(){\n\t\tSystem.out.println(\"Enter 'EXIT' to exit to the Main Menu\");\n\t\tSystem.out.println(\"Enter 'ADD' followed by: studentID, studentName, major, class, and GPA to add a student record\");\n\t\tSystem.out.println(\"Enter 'REMOVE' followed by a studentID to remove a student\");\n\t\tSystem.out.println(\"Enter 'FIND' followed by a studentID or studentName to pull up student's information\");\n\t\tSystem.out.println(\"Enter 'ENROLL' followed by a studentID, deptID and course_Number to enroll a student\");\n\t\tSystem.out.println(\"Enter 'WITHDRAW' followed by a studentID, deptID and course_Number to withdraw a student in a course\");\n\t\tSystem.out.println(\"Enter 'SCHEDULE' followed by a studentID or studentName to list all courses student is enrolled in.\");\n\t}",
"void display(){\n\t \t\r\n\t \t\r\n\t \tSystem.out.println(\"Student id :\" +id);\r\n\t \t //system : system is a class in java language.lang package\r\n\t\t \t//out : out is the static member of system class.It's type PrintStream\r\n\t\t \t//println: which is used to print the output.\r\n\t \tSystem.out.println(\"Student name: \" +name);\r\n\t \t //system : system is a class in java language.lang package\r\n\t\t \t//out : out is the static member of system class.It's type PrintStream\r\n\t\t \t//println: which is used to print the output.\r\n\t \tSystem.out.println(\"Student marks: \" +marks);\r\n\t \t //system : system is a class in java language.lang package\r\n\t\t \t//out : out is the static member of system class.It's type PrintStream\r\n\t\t \t//println: which is used to print the output.\r\n\t \t\r\n\t \t}",
"public String studentInfo()\n\t{\n\t\tString strStudentInfo;\n\t\tDecimalFormat percent = new DecimalFormat(\"0.0%\");\n\t\tdouble dRoundedCourseAverage;\n\t\tdouble dCourseAverage;\n\t\tdCourseAverage= courseAverage();\n\t\t\t\n\t\tdRoundedCourseAverage= Math.round(dCourseAverage);\n\t\tstrStudentInfo =\n\t\t(\"\\nName: \" + name +\n\t\t\"\\nCourse: \" + courseDesc +\n\t\t\"\\nNumber: \" + courseNum +\n\t\t\"\\nInstructor:\" + instructor +\n\t\t\"\\nGrades:\" +\n\t\t\"\\nTest: \\tAverage: \"+ average('t') +\"\\tPercent: \" + pctT +\n\t\t\"\\nQuizzes: \\tAverage: \"+ average('q') +\"\\tPercent: \" + pctQ +\n\t\t\"\\nProject: \\tAverage: \"+ average('p') +\"\\tPercent: \" + pctP +\n\t\t\"\\nCourse Average: \" + dCourseAverage + \"(or \"+\n\t\t\tpercent.format(dRoundedCourseAverage/100) + \")\");\n\t\treturn strStudentInfo;\n\t}",
"@Override\n\tpublic void printStudent() {\n\t\tSystem.out.print(\"학번\\t국어\\t영어\\t수학\\n\");\n\t\tSystem.out.println(\"=\".repeat(60));\n\t\tint nSize = scoreList.size();\n\t\tfor(int i = 0 ; i < nSize ; i++) {\n\t\t\tScoreVO vo = new ScoreVO();\n\t\t\tSystem.out.print(vo.getNum() + \"\\t\");\n\t\t\tSystem.out.print(vo.getKor() + \"\\t\");\n\t\t\tSystem.out.print(vo.getEng() + \"\\t\");\n\t\t\tSystem.out.print(vo.getMath() + \"\\n\");\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public void setStudentName() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t// setter method initialized\r\n System.out.println(\"Name Of The Student : \"+studentName);}",
"public void display () {\n System.out.println(rollNo + \" \" + name + \" \" + college );\n }",
"void show() {\r\n System.out.println(\"regno:\"+regno + \"\\n name\"+ name + \"\\n marks :\" + m1+\",\"+m2+\",\"+m3);\r\n }",
"public String toString() {\n\t\treturn \" Student: \" + getName() + \"\\t ID: \" + getIDnumber();\t\n\t}",
"public void displayStudentInfo(JTextField studentId, JTextField firstname, JTextField lastName, \n JTextField address, JTextField phoneNum, JTextField email, JTextField birthday){\n \n try {\n Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/Student\", \n \"menaagina\", \"Polynomial5%\");\n Statement st = con.createStatement();\n ResultSet rs = st.executeQuery(\"select * from students where Student_id = \"+id);\n rs.next();\n studentId.setText(rs.getString(1));\n firstname.setText(rs.getString(2));\n lastName.setText(rs.getString(3));\n address.setText(rs.getString(4));\n phoneNum.setText(rs.getString(5));\n email.setText(rs.getString(6));\n birthday.setText(rs.getString(7)); \n } catch (SQLException ex) {\n //an exception will never be thrown\n }\n \n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"student ID --> \"+this.studentID+\", Name --> \"+this.studentName;\n\t}",
"public void viewStudents(List<Student> studentList) {\n\t\tfor (Student student : studentList) {\n\t\t\tSystem.out.format(\"%5d | \", student.getId());\n\t\t\tSystem.out.format(\"%20s | \", student.getName());\n\t\t\tSystem.out.format(\"%5d | \", student.getAge());\n\t\t\tSystem.out.format(\"%20s | \", student.getAddress());\n\t\t\tSystem.out.format(\"%10.1f%n\", student.getGpa());\n\t\t}\n\t}",
"public void printStudentList()\n {\n for(int i = 0; i < students.size(); i++)\n System.out.println( (i + 1) + \". \" + students.get(i).getName());\n }",
"public void printModuleStudentInfo() {\t\r\n\tfor(int i =0; i<(StudentList.size()); i++) {\r\n\t\tStudent temp =StudentList.get(i);\r\n\t\tSystem.out.println(temp.getUserName());\r\n\t}\t\r\n}",
"void printData()\n {\n System.out.println(\"Studentname=\" +name);\n System.out.println(\"Student city =\"+city);\n System.out.println(\"Student age = \"+age);\n }",
"private static void showStudentDB () {\n for (Student s : studentDB) {\n System.out.println(\"ID: \" + s.getID() + \"\\n\" + \"Student: \" + s.getName());\n }\n }",
"public ManageStudentForm() {\n initComponents();\n \n initTable();\n \n fillTable();\n \n initMajor();\n setLocationRelativeTo(null);\n \n \n }",
"public studentsPanel() {\n initComponents();\n String no = String.valueOf(sNum.studentID);\n String name = String.valueOf(sNum.studentName);\n lblStudentID.setText(name);\n delivery();\n lblTakeBookLimit.setText(new texts().bookLimit() + takeBookLimit + \" )\");\n List();\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \" \" + getStudentId() + \":\" + getStudentName();\n\t}",
"private void loardSid() throws IOException{\n StudentController studentController = new StudentController();\n \n List<StudentDTO>list;\n \n try {\n list = studentController.getAllStudent();\n for (StudentDTO studentDTO : list) {\n cmbStudentID.addItem(studentDTO.getId());\n }\n } catch (Exception ex) {\n Logger.getLogger(Registation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public static void displayStudentRecords() {\n\t\tSystem.out.println(\"Student records in the database are:\");\n\t\tSelectStudentRecords records = new SelectStudentRecords();\n\t\ttry {\n\t\t\tList<Student> studentList = records.selectStudentRecords();\n\t\t\tstudentList.forEach(System.out::println);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"public StudentInfo() {\n initComponents();\n\n loadData();\n loadComboBox();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n studentPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n IDTextField = new javax.swing.JTextField();\n lastNameTextField = new javax.swing.JTextField();\n firstNameTextField = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n addStudentBtn = new javax.swing.JButton();\n deleteStudentBtn = new javax.swing.JButton();\n updateStudentBtn = new javax.swing.JButton();\n jLabel6 = new javax.swing.JLabel();\n studentInfoCourseComboBox1 = new javax.swing.JComboBox();\n studentInfoSectionComboBox1 = new javax.swing.JComboBox();\n jSeparator2 = new javax.swing.JSeparator();\n jSeparator3 = new javax.swing.JSeparator();\n jSeparator4 = new javax.swing.JSeparator();\n studentSearchjButton1 = new javax.swing.JButton();\n Back = new javax.swing.JLabel();\n stduentPanel2 = new javax.swing.JPanel();\n Exit = new javax.swing.JLabel();\n jPanel3 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n stdInfoTable = new javax.swing.JTable();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n studentPanel1.setBackground(new java.awt.Color(51, 51, 51));\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setText(\"First Name:\");\n\n jLabel2.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Last Name:\");\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 255, 255));\n jLabel3.setText(\"Section:\");\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(255, 255, 255));\n jLabel4.setText(\"ID:\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Course:\");\n\n IDTextField.setBackground(studentPanel1.getBackground());\n IDTextField.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n IDTextField.setForeground(new java.awt.Color(255, 255, 255));\n IDTextField.setBorder(null);\n IDTextField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n IDTextFieldActionPerformed(evt);\n }\n });\n\n lastNameTextField.setBackground(studentPanel1.getBackground());\n lastNameTextField.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n lastNameTextField.setForeground(new java.awt.Color(255, 255, 255));\n lastNameTextField.setBorder(null);\n\n firstNameTextField.setBackground(studentPanel1.getBackground());\n firstNameTextField.setFont(new java.awt.Font(\"Arial\", 0, 18)); // NOI18N\n firstNameTextField.setForeground(new java.awt.Color(255, 255, 255));\n firstNameTextField.setBorder(null);\n\n addStudentBtn.setBackground(studentPanel1.getBackground());\n addStudentBtn.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n addStudentBtn.setForeground(new java.awt.Color(255, 255, 255));\n addStudentBtn.setText(\"Add\");\n addStudentBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addStudentBtnActionPerformed(evt);\n }\n });\n\n deleteStudentBtn.setBackground(studentPanel1.getBackground());\n deleteStudentBtn.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n deleteStudentBtn.setForeground(new java.awt.Color(255, 255, 255));\n deleteStudentBtn.setText(\"Delete\");\n deleteStudentBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteStudentBtnActionPerformed(evt);\n }\n });\n\n updateStudentBtn.setBackground(studentPanel1.getBackground());\n updateStudentBtn.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n updateStudentBtn.setForeground(new java.awt.Color(255, 255, 255));\n updateStudentBtn.setText(\"Update\");\n updateStudentBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n updateStudentBtnActionPerformed(evt);\n }\n });\n\n jLabel6.setFont(new java.awt.Font(\"Cambria\", 0, 28)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel6.setText(\"Student Infomration\");\n jLabel6.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, java.awt.Color.black, java.awt.Color.white, null, null));\n\n studentInfoCourseComboBox1.setFont(new java.awt.Font(\"Arial\", 1, 14)); // NOI18N\n studentInfoCourseComboBox1.setBorder(studentInfoSectionComboBox1.getBorder());\n studentInfoCourseComboBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n studentInfoCourseComboBox1ActionPerformed(evt);\n }\n });\n\n studentInfoSectionComboBox1.setFont(new java.awt.Font(\"Arial\", 0, 14)); // NOI18N\n\n studentSearchjButton1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n studentSearchjButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ToggleIcons/Search_25px.png\"))); // NOI18N\n studentSearchjButton1.setText(\"Search\");\n studentSearchjButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n studentSearchjButton1ActionPerformed(evt);\n }\n });\n\n Back.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ToggleIcons/Go Back_35px.png\"))); // NOI18N\n Back.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n BackMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout studentPanel1Layout = new javax.swing.GroupLayout(studentPanel1);\n studentPanel1.setLayout(studentPanel1Layout);\n studentPanel1Layout.setHorizontalGroup(\n studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(147, 147, 147)\n .addComponent(addStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(74, 74, 74)\n .addComponent(updateStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(75, 75, 75)\n .addComponent(deleteStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(198, Short.MAX_VALUE))\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 307, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(16, 16, 16)\n .addComponent(Back))\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(266, 266, 266)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel5)\n .addComponent(jLabel3))\n .addGap(33, 33, 33)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(studentInfoSectionComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(studentInfoCourseComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addGap(51, 51, 51)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, studentPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))\n .addGap(18, 18, 18)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(IDTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)\n .addComponent(jSeparator2)\n .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(lastNameTextField, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(firstNameTextField)\n .addComponent(jSeparator3))\n .addGap(18, 18, 18)\n .addComponent(studentSearchjButton1)\n .addGap(110, 110, 110))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, studentPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(283, 283, 283))\n );\n studentPanel1Layout.setVerticalGroup(\n studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(12, 12, 12)\n .addComponent(Back)\n .addGap(36, 36, 36)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(76, 76, 76)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(72, 72, 72)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addComponent(IDTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel4)))\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(studentSearchjButton1)))\n .addGap(55, 55, 55)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(firstNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(68, 68, 68)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(studentPanel1Layout.createSequentialGroup()\n .addComponent(lastNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(jLabel2))\n .addGap(60, 60, 60)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel5)\n .addComponent(studentInfoCourseComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(52, 52, 52)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(studentInfoSectionComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 222, Short.MAX_VALUE)\n .addGroup(studentPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(updateStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(deleteStudentBtn, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(120, 120, 120))\n );\n\n stduentPanel2.setBackground(new java.awt.Color(51, 51, 51));\n\n Exit.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ToggleIcons/Delete_35px.png\"))); // NOI18N\n Exit.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n ExitMouseClicked(evt);\n }\n });\n\n javax.swing.GroupLayout stduentPanel2Layout = new javax.swing.GroupLayout(stduentPanel2);\n stduentPanel2.setLayout(stduentPanel2Layout);\n stduentPanel2Layout.setHorizontalGroup(\n stduentPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, stduentPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(Exit)\n .addContainerGap())\n );\n stduentPanel2Layout.setVerticalGroup(\n stduentPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(stduentPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(Exit)\n .addContainerGap(155, Short.MAX_VALUE))\n );\n\n jPanel3.setBackground(new java.awt.Color(255, 255, 255));\n\n stdInfoTable.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n stdInfoTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID\", \"Last Name\", \"First Name\", \"Course\", \"Section\"\n }\n ));\n stdInfoTable.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n stdInfoTableMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(stdInfoTable);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 1040, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 852, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 20, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(studentPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(stduentPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 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 .addComponent(stduentPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addComponent(studentPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\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 .addGap(0, 1913, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 1079, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE)))\n );\n\n pack();\n }",
"public String DisplayStudents()\n\t{\t\n\t\tString studentList= \"\";\n\t\tint i=1; //the leading number that is interated for each student\n\t\tfor(Student b : classRoll)\n\t\t{\n\t\t\tstudentList += i + \". \" + b.getStrNameFirst ( ) + \" \" + b.getStrNameLast () +\"\\n\";\n\t\t\ti++;\n\t\t}\n\t\treturn studentList= getCourseName() +\"\\n\" + getCourseNumber()+\"\\n\" + getInstructor()+ \"\\n\" + studentList;\n\t}",
"public void showSquareDetails(){\r\n view.printSquareDetails(model.getSideLength(), model.getColor());\r\n }",
"private void createStudyStudent() {\n\t\t\n\t\t//Initiate Window\n\t\tsAssignStudyWindow = new JFrame(\"Assign Study Material\");\n\t\tsAssignStudyWindow.setSize(assignStudyWidth, assignStudyHeight);\n\t\tsAssignStudyWindow.setLocationRelativeTo(null);\n\t\tsAssignStudyWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tArrayList<Class> sClasses = student.getClasses();\n\t\t\n\t\tsAddStudyModel = new DefaultListModel<>();\n\t JList classList = new JList<>(sAddStudyModel);\n\t classList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n\t classList.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));\n\t\tclassList.addMouseListener(this);\n\t \n\t\t//Add classes\n\t for (Class c: sClasses) {\n\t \t\tsAddStudyModel.addElement(c.getName());\n\t }\n\t \n\t //Main JPanel\n\t JPanel panel = new JPanel();\n\t panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\n\t \n\t //Left JPanel\n\t JPanel leftPanel = new JPanel();\n\t leftPanel.setLayout(new BorderLayout());\n\t leftPanel.setBorder(BorderFactory.createEmptyBorder(20, 20, 20, 20));\n\t leftPanel.add(new JScrollPane(classList));\n\t \n\t //Right JPanel\n\t JPanel rightPanel = new JPanel();\n\t rightPanel.setLayout(new GridLayout(2,1,1,1));\n\t rightPanel.setBorder(BorderFactory.createEmptyBorder(75, 10, 75, 20));\n\n\t //Student: \"Assign\" JButton\n\t JButton assignB = new JButton(\"Assign\");\n\t assignB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent event) {\n\t ListSelectionModel selmodel = classList.getSelectionModel();\n\t int index = selmodel.getMinSelectionIndex();\n\t if (index >= 0) {\n\t \t \tClass selectedClass = sClasses.get(index);\n\t \t \tselectedClass.addFlashCard(newFlashCard);\n\t }\n\t }\n\t });\n\t rightPanel.add(assignB);\n\t\t\n\t //Student: \"Exit\" JButton\n\t JButton exitB = new JButton(\"Exit\");\n\t exitB.addActionListener(new ActionListener() {\n\t public void actionPerformed(ActionEvent e) {\n\t sAssignStudyWindow.dispose();\n\t \tsPortalWindow.dispose();\n\t \tstudentPortalScreen();\n\t }\n\t \t});\n\t rightPanel.add(exitB);\n\n\t panel.add(leftPanel);\n\t panel.add(rightPanel);\n\n\t sAssignStudyWindow.add(panel);\n\t sAssignStudyWindow.setVisible(true);\n\t\t\n\t}",
"private void viewGradeCard(int studentId)\n\t{\n\t\t\n\t\t\n\t\tList<StudentGrade> grade_card=null;\n\t\ttry \n\t\t{\n\t\t\tgrade_card = registrationInterface.viewGradeCard(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t\t\n\t\tlogger.info(String.format(\"%-20s %-20s %-20s\",\"COURSE CODE\", \"COURSE NAME\", \"GRADE\"));\n\t\t\n\t\tif(grade_card.isEmpty())\n\t\t{\n\t\t\tlogger.info(\"You haven't registered for any course\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(StudentGrade obj : grade_card)\n\t\t{\n\t\t\tlogger.info(String.format(\"%-20s %-20s %-20s\",obj.getCourseCode(), obj.getCourseName(),obj.getGrade()));\n\t\t}\n\t}",
"public String toString(Student s){\r\n\r\n\r\n\t\treturn \"******************************************************\\n*\"+ \r\n\r\n\t\t\t\t\t\" Name #\"+\" \"+s.getName()+\"\\n*\"+\r\n\t\t\t\t\t\" id number # \"+s.getId()+ \"\\n*\"+\r\n\t\t\t\t\t\" Grades # \"+s.getGrade(0)+\" |\"+ s.getGrade(1)+\" |\"+s.getGrade(2)+\"\\n*\"+\r\n\t\t\t\t\t\" Grade Average# \"+ s.getAverage()+\"\\n*\"+\r\n\t\t\t\t\t\" Letter Grade # \"+ s.getLetterGrade(s.getAverage())+\r\n\t\t\t\t\t\"\\n******************************************************\\n\";\r\n\r\n\r\n\t}",
"public void setStudentsBox(List<Student> students) {\n for (Student student : students)\n studentsBox.addItem(student.getName());\n }",
"private void printStudListByCourse() throws Exception {\n String courseID = null;\n ArrayList<Student> studentList = new ArrayList<Student>();\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"\\nPlease enter course ID\");\n courseID = sc.nextLine();\n while(!courseID.matches(\"^[a-zA-Z]{2}[0-9]{4}$\")){\n System.out.println(\"Invalid input! Please enter a valid index number!\");\n courseID = sc.nextLine();\n }\n\n studentList= this.adminManager.getStudentByCourse(courseID);\n if(studentList == null){\n System.out.println(\"\\nThere is no such a course index\\n\\n\");\n System.exit(1);\n }\n if (studentList.isEmpty()){\n System.out.println(\"\\nThere is no student registered for this course ID\\n\\n\");\n return;\n }\n else{\n System.out.println(\"Hang on a moment while we load database.\\n\\n\");\n System.out.println(\"------------------------------------------------------\");\n System.out.println(\" STUDENT NAME GENDER NATIONALITY\");\n System.out.println(\"------------------------------------------------------\");\n //\n for(Student student:studentList){\n System.out.println(String.format(\"%20s %6s %s\",student.getName(),student.getGender(),student.getNationality()));\n }\n\n System.out.println(\"------------------------------------------------------\\n\");\n }\n }",
"public void printCourseDetails()\n {\n // put your code here\n System.out.println(\"Course \" + codeNo + \" - \" + title);\n }",
"@Override\r\n\tpublic void showlist() {\n int studentid = 0;\r\n System.out.println(\"请输入学生学号:\");\r\n studentid = input.nextInt();\r\n StudentDAO dao = new StudentDAOimpl();\r\n List<Course> list = dao.showlist(studentid);\r\n System.out.println(\"课程编号\\t课程名称\\t教师编号\\t课程课时\");\r\n for(Course c : list) {\r\n System.out.println(c.getCourseid()+\"\\t\"+c.getCoursename()+\"\\t\"+c.getTeacherid()+\"\\t\"+c.getCoursetime());\r\n }\r\n \r\n\t}",
"@Override\n\tpublic String toString() {\n\t\treturn name + \" \" + studentID;\n\t}",
"@Override\n\tpublic void print() {\n\t\tSystem.out.print(\"\\nMSc. student:\\n\");\n\t\tsuper.print();\n\t}",
"public static void studentText(){\n\t\tSystem.out.println(\"Enter: 1.'EXIT' 2.'ADD' 3.'REMOVE' 4.'FIND 5.'ENROLL' 6.'WITHDRAW' 7.'SCHEDULE' 8.'MORE' -for more detail about options\");\n\t}",
"void viewStudents(Professor professor);",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"public void displayMessage(){//displayMessage body start\n\t\tSystem.out.printf(\"course name = %s\\n\", getCourseName());\n\t}",
"void display() {\n System.out.println(id + \" \" + name);\n }",
"public void testPrintStudentDetails() {\n\t System.out.println(\"printStudentDetails\");\n\t Student instance = student1;\n\t student1.addCourse(course1);\n\t student1.addModule(module1);\n\t instance.printStudentDetails();\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 txtId = new javax.swing.JTextField();\n btnShowInfo = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n courseTable = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n txtName = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtDept = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n\n setBackground(new java.awt.Color(153, 153, 153));\n setForeground(new java.awt.Color(153, 153, 153));\n\n jLabel1.setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel1.setText(\"Enter Student ID :\");\n\n txtId.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtIdActionPerformed(evt);\n }\n });\n\n btnShowInfo.setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n btnShowInfo.setText(\"Show Info\");\n btnShowInfo.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnShowInfoActionPerformed(evt);\n }\n });\n\n courseTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Course Name\", \"Semester\", \"Year\", \"Faculty\"\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 jScrollPane1.setViewportView(courseTable);\n\n jLabel2.setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel2.setText(\"Student Full Name:\");\n\n txtName.setEditable(false);\n txtName.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel3.setFont(new java.awt.Font(\"Times New Roman\", 1, 12)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel3.setText(\"Enrolled Department:\");\n\n txtDept.setEditable(false);\n txtDept.setBackground(new java.awt.Color(204, 204, 204));\n\n jLabel4.setFont(new java.awt.Font(\"Times New Roman\", 1, 24)); // NOI18N\n jLabel4.setText(\"Student Info Menu\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1067, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(txtName, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtDept)\n .addComponent(txtId))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnShowInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(357, 357, 357)))))\n .addGap(6, 6, 6))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtId)\n .addComponent(btnShowInfo))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtDept, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(106, 106, 106))\n );\n }",
"void display() {\r\n\t\tSystem.out.println(id + \" \" + name);\r\n\t}",
"private void printAllStudentInDB(){\n ArrayList studentInformation = AdminManager.loadDBStudentInformation();\n System.out.println(\"--------------------------------------------------------------------------------------\");\n System.out.println(\"USERNAME STUDENT NAME MATRIC NUMBER GENDER NATIONALITY\");\n System.out.println(\"--------------------------------------------------------------------------------------\");\n\n for(int i=0; i<studentInformation.size();i++){\n String st = (String)studentInformation.get(i);\n StringTokenizer star = new StringTokenizer(st, \",\");\n System.out.print(String.format(\"%7s \",star.nextToken().trim()));\n String printPassword = star.nextToken().trim();\n System.out.println(String.format(\"%20s %9s %6s %s\",star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim(),star.nextToken().trim()));\n }\n System.out.println(\"--------------------------------------------------------------------------------------\\n\");\n }",
"private void studenti(reusablemenu.sample.Student curent) {\n\t\t\r\n\t}",
"public String toString(){\n return \"Available information for this student: \" + fname + \" \" + lname + \", \" + college + \", \"\n + major + \" major, GPA: \" + gpa;\n }",
"public String toString() {\r\n String st = \"Student Name: \" + getStudentName() +\r\n \" ID: \" + getStudentId() + \"\\n\";\r\n return st;\r\n }",
"public String displayStudent(String lastName, String firstName)\n\t{\n\t\tStudent foundStudent = findStudent(firstName, lastName); //finds the student\n\t\tString studentInfo;\n\t\tif(foundStudent != null)\n\t\t{\n\t\t\tstudentInfo = foundStudent.toString ( );\n\t\t}//if the student is found it is displayed\n\t\telse\n\t\t{\n\t\t\tstudentInfo = \"Invalid Student Name\";\n\t\t}//if the student is not found it displays invalid student name\n\t\treturn studentInfo;\n\t}",
"private void displayByID() { \n\t\tint sic_idHolder; // declares sic_idHolder\n\t\t\n\t\tSystem.out.println(\"Please enter the SIC-ID of the book you would like displayed:\");\n\t\tsic_idHolder = scan.nextInt();\n\t\tscan.nextLine();\n\t\tSystem.out.println(inventoryObject.displayBySICID(sic_idHolder));\n\t\tgetUserInfo();\n\t}",
"public String toString()\n {\n return \"Student(\" + studentName + \", \" + currentPhone + \")\";\n }",
"public void changeCanvasToDetailedStudentView(ActionEvent event) {\r\n CanvasSwitcher.loadCanvas(CanvasSwitcher.SECRETARY_STUDENTS_PROFILE);\r\n \r\n //access the controller and call a method\r\n SecretaryStudentProfileCntrl controller = \r\n (SecretaryStudentProfileCntrl)CanvasSwitcher.getController();\r\n controller.initData(tableView.getSelectionModel().getSelectedItem());\r\n }",
"public static void printRecord(int i) {\r\n\t\ttry {\r\n\t\t\tStudent tempRecord = studRecs.get(i);\r\n\t\t\tSystem.out.println(\"Printing information for student \" + i);\r\n\t\t\tSystem.out.println(\"Student ID: \" + tempRecord.getStudentID());\r\n\t\t\tSystem.out.println(\"First Name: \" + tempRecord.getFirstName());\r\n\t\t\tSystem.out.println(\"Last Name: \" + tempRecord.getLastName());\r\n\t\t\tSystem.out.println(\"Street Address: \" + tempRecord.getStreetAddress());\r\n\t\t\tSystem.out.println(\"City: \" + tempRecord.getCity());\r\n\t\t\tSystem.out.println(\"Province: \" + tempRecord.getProvince());\r\n\t\t\tSystem.out.println(\"Postal Code: \" + tempRecord.getPostalCode());\r\n\t\t\tSystem.out.println(\"Phone Number: \" + tempRecord.getPhoneNumber());\r\n\t\t\tSystem.out.println(\"Birth Date: \" + tempRecord.getBirthDate());\r\n\t\t} catch (IndexOutOfBoundsException e) {\r\n\t\t\tSystem.out.println(\"Invalid student!\");\r\n\t\t}\r\n\t}",
"public void displayDetails() {\r\n\t\tSystem.out.println(\"*******************Profile Details*********************\");\r\n\t\tSystem.out.println(\"\\tUsername :\\t\" + uName);\r\n\t\tSystem.out.println(\"\\tFull Name :\\t\" + fullName);\r\n\t\tSystem.out.println(\"\\tPhone :\\t\" + phone);\r\n\t\tSystem.out.println(\"\\tE-Mail :\\t\" + email);\r\n\t}",
"private void showAuthorDetails()\n {\n String message = \"Author: Kyle Russell\\nUniversity: Auckland University of Technology\\nContact: [email protected]\";\n JOptionPane.showMessageDialog(null, message, \"Author information\", JOptionPane.INFORMATION_MESSAGE);\n }",
"public student() {\n this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);\n initComponents();\n jLabel6.setVisible(false);\n jLabel7.setVisible(false);\n jLabel8.setVisible(false);\n jButton2.setVisible(false);\n jLabel9.setVisible(false);\n \n jComboBox2.removeAllItems();\n jComboBox4.removeAllItems();\n jComboBox1.removeAllItems();\n jComboBox3.removeAllItems();\n \n jComboBox2.addItem(\"Engineering\");\n jComboBox2.setSelectedItem(\"Engineering\");\n jComboBox2.addItem(\"MCA\");\n \n jComboBox1.addItem(\"Mechanical\");\n jComboBox1.setSelectedItem(\"Mechanical\");\n jComboBox1.addItem(\"Computer\");\n //jComboBox1.addItem(\"Computer\");\n\n jComboBox3.addItem(\"FE\");\n jComboBox3.setSelectedItem(\"FE\");\n jComboBox3.addItem(\"SE\");\n jComboBox3.addItem(\"TE\");\n jComboBox3.addItem(\"BE\");\n \n jComboBox4.addItem(\"A\");\n jComboBox4.setSelectedItem(\"A\");\n jComboBox4.addItem(\"B\");\n }",
"public ViewStudent() {\n initComponents();\n DB_Connection();\n DisplayInitialValues();\n }",
"public void display(){\n\t\tSystem.out.print(programGrade + \" \" + examGrade );\n\t\t\n\t\t\n\t}",
"private void setStudentScroll() {\n\t\t\t\tVector<User> studentList = client.getStudentList();\n\t\t\t\tcourseGUI.getModel().removeAllElements();\n\t\t\t\tif(studentList == null)return;\n\t\t\t\tfor(int i = 0; i < studentList.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tString info = studentList.get(i).getID() + \" \" + studentList.get(i).getFirstName() \n\t\t\t\t\t\t\t+ \" \" + studentList.get(i).getLastName() + \" \";;\n\t\t\t\t\t\t\tif(client.isEnrolled(studentList.get(i), courseGUI.getCourse().getName()))\n\t\t\t\t\t\t\t\tinfo += (\"\t\t(enrolled)\");\n\t\t\t\t\t\t\tcourseGUI.getModel().addElement(info);\n\t\t\t\t}\n\t\t\t\t//courseGUI.list.setModel(courseGUI.model);\n\t\t\t}",
"public String getStudent(){\n\t\t\n\t\treturn this.student;\n\t}",
"public void setStudent(Student s) {\n\t\tStudent = s;\n\t\tsetWelcomeText(s.getFirstName() , s.getLastName());//update the \"welcome, name!\" JLabel\n\t}",
"public studentrecord() {\n initComponents();\n }",
"private void addStudentButtonActionPerformed(java.awt.event.ActionEvent evt) {\n if(lastName.getText().length()==0 && firstName.getText().length()==0) {\n JOptionPane.showMessageDialog(this, \"Some of the fields are empty!\");\n } else if(isInteger(levelOfStudy.getText())) {\n JOptionPane.showMessageDialog(this, \"Valid infomation, adding student (may take a minute)\");\n controller.addStudent(firstName.getText(),lastName.getText(),degreeName.getSelectedItem().toString(),tutor.getText(),levelOfStudy.getText());\n scrollTable.showStudents();\n JOptionPane.showMessageDialog(this, \"Created with password of '123'\");\n } else {\n JOptionPane.showMessageDialog(this, \"Period of study must be a vaild year!\");\n }\n \n \n }",
"private void displayStudentByName(String name) {\n\n int falg = 0;\n\n for (Student student : studentDatabase) {\n\n if (student.getName().equals(name)) {\n\n stdOut.println(student.toString());\n\n falg = 1;\n\n break;\n }\n }\n\n if (falg == 0) {\n\n stdOut.println(\"cannot find student\\n\");\n }\n }",
"public StudentGUI(Student s) {\n\t\tstudent=s;\n\t\tsetTitle(\"B&B Learning\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tcards = new JPanel(new CardLayout());\n\n\t\tstudentHomePagePanel = new StudentHomepage(); \n\t\tstudentHomePagePanel.setStudent(student);\n\t\tcards.add(studentHomePagePanel, \"STUDHOMEPAGE\"); //the cardName of the homePagePanel is STUDHOMEPAGE\n\n\t\tstudentCoursePagePanel = new StudentCoursePage();// TODO set the CoursePage's course every time you go to it \n\t\tcards.add(studentCoursePagePanel, \"STUDCOURSEPAGE\"); //the cardName of the homePagePanel is STUDCOURSEPAGE\n\n\t\tstudentAssignmentPanel = new StudentAssignmentPage();// TODO set the assignment page's file every time you go to it \n\t\tcards.add(studentAssignmentPanel, \"STUDASSIGNMENTPAGE\"); //the cardName is STUDASSIGNMENTPAGE\n\n\t\temailPage = new EmailPage();\n\t\tcards.add(emailPage, \"EMAILPAGE\"); //the cardName is EMAILPAGE\n\t\t\n\t\tgradePage = new GradePage();\n\t\tcards.add(gradePage, \"GRADEPAGE\"); //the cardName is GRADEPAGE\n\t\t\n\t\t\n\t\tadd(cards);\n\t\tpack();\n\t\tsetResizable(false);\n\t\tsetLocationRelativeTo(null); // center the JFram\n\t\tsetVisible(true);\n\t}",
"public void viewStudent(ActionEvent actionEvent) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"StudentCard.fxml\"));\n Parent activitiesView = loader.load();\n Scene activitiesScene = new Scene(activitiesView);\n StudentCardController controller = loader.getController();\n controller.intDatas(newStudent);\n controller.intData(studentList);\n Stage window = (Stage)((Node)actionEvent.getSource()).getScene().getWindow();\n window.setScene(activitiesScene);\n window.setTitle(\"View Student\");\n window.show();\n }",
"public String toString() {\r\n\t\treturn \"Student ID: \" + this.studentID + \"\\n\" + \r\n\t\t\t\t\"Name and surname: \" + this.name + \"\\n\" + \r\n\t\t\t\t\"Date of birth: \" + this.dateOfBirth + \"\\n\" + \r\n\t\t\t\t\"University:\" + this.universityName + \"\\n\" + \r\n\t\t\t\t\"Department code: \" + this.departmentCode + \"\\n\" + \r\n\t\t\t\t\"Department: \" + this.departmentName + \"\\n\" +\r\n\t\t\t\t\"Year of enrolment: \" + this.yearOfEnrolment;\r\n\t}",
"private void tblStudentsMouseClicked(java.awt.event.MouseEvent evt) {// GEN-FIRST:event_tblStudentsMouseClicked\n\t\t// TODO add your handling code here:\n\t\tint i = tblBollard.getSelectedRow();\n\t\tTableModel model = tblBollard.getModel();\n\t\ttxtId.setText(model.getValueAt(i, 0).toString());\n\t\ttxtAlert.setText(model.getValueAt(i, 1).toString());\n\t\ttxtNbMax.setText(model.getValueAt(i, 2).toString());\n\t\ttextnbactuel.setText(model.getValueAt(i, 3).toString());\n\t\t\n\t}",
"public void display() {\n String box = \"\\n+--------------------------------------------+\\n\";\n String header = \"| \" + name;\n String lvlStat = \"Lv\" + level;\n for (int i=0; i<42-name.length()-lvlStat.length(); i++) {\n header += \" \";\n }\n header += lvlStat + \" |\\n\";\n System.out.println(box + header + \"| \" + getHealthBar() + \" |\" + box);\n }",
"public void printFieldInformation() {\n \t\tint isnull = 0;\n \t\tint studentsA = 0;\n \t\tint empty = 0;\n \t\tfor (int a = 0; a < 5; a++) {\n \t\t\tfor (int b = 0; b < 7; b++) {\n \t\t\t\tif (students[a][b] == null) {\n \t\t\t\t\tisnull++;\n \t\t\t\t\tSystem.out.println(a + \" / \" + b);\n \t\t\t\t} else if (students[a][b] instanceof EmptyPlace)\n \t\t\t\t\tempty++;\n \t\t\t\telse if (students[a][b] instanceof Student)\n \t\t\t\t\tstudentsA++;\n \t\t\t}\n \t\t}\n \t\tSystem.out.println(\"null: \" + isnull);\n \t\tSystem.out.println(\"empty: \" + empty);\n \t\tSystem.out.println(\"studentsA: \" + studentsA);\n \t}",
"@Override\npublic void studentId(int id) {\n\tthis.myId=id;\n\tSystem.out.println(\"student Id is \" +name);\n}",
"@FXML\n private void getStudent() {\n System.out.println(\"Handling student: \"+handledStudent.toString());\n Student toBeEdited = handledStudent;\n System.out.println(\"Student to be edited:\"+toBeEdited.toString());\n txfID.setText(toBeEdited.getStudentID());\n txfFirstName.setText(toBeEdited.getFirstName());\n txfLastName.setText(toBeEdited.getLastName());\n txfAddress.setText(toBeEdited.getAddress());\n txfZIP.setText(toBeEdited.getZIP());\n txfZIPloc.setText(toBeEdited.getZIPloc());\n txfEmail.setText(toBeEdited.getEmail());\n txfPhone.setText(toBeEdited.getPhone());\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 }",
"@Override\r\n public String toString() {\r\n return \"Student: \" + super.toString();\r\n }",
"public String getStudentId() {\n\treturn this.studentId;\n }",
"void display(){\n System.out.println(\"Name:\"+name);\n System.out.println(\"Age:\"+age);\n System.out.println(\"Faculty:\"+faculty);\n System.out.println(\"Department:\"+department);\n System.out.println(\"IsHandicapped:\"+isHandicapped);\n }",
"void display() {\n System.out.println(id + \" \" + name + \" \" + age);\n }",
"private void showStudentCourses()\r\n {\r\n \tString courseResponse = \"\";\r\n \tfor(Course course : this.getDBManager().getStudentCourses(this.studentId))\r\n \t{\r\n \t\tcourseResponse += \"Course Faculty: \" + course.getCourseName() + \", Course Number: \" + String.valueOf(course.getCourseNum()) + \"\\n\";\r\n \t}\r\n \tthis.getClientOut().printf(\"SUCCESS\\n%s\\n\", courseResponse);\r\n \tthis.getClientOut().flush();\r\n }",
"public studentGUI() {\n\t\ttry {\n\t\t\tinitialize();\n\t\t} catch (AccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (NotBoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void initJTableSchoolStudents() {\n schoolStudents = new SchoolStudents();\n // Load data from database\n schoolStudents.findAll(entityManager);\n\n // Model for JTable, assigning classgroups content\n schoolStudentsTableModel = new SchoolStudentsTableModel(schoolStudents);\n jTableSchoolStudents.setModel(schoolStudentsTableModel); \n\n // Allow only one row selected\n jTableSchoolStudents.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n \n // Listen for student selection in jtable\n jTableSchoolStudents.getSelectionModel().addListSelectionListener(\n new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent event) {\n int indexSelectedRow = jTableSchoolStudents.getSelectedRow();\n if(indexSelectedRow >= 0) {\n schoolStudentSelected = schoolStudents.getSchoolStudentList().get(indexSelectedRow);\n showDetailStudentSelected();\n } else {\n jTextFieldName.setText(\"\");\n jTextFieldSurnames.setText(\"\");\n jTextFieldGrade.setText(\"\");\n }\n }\n }\n );\n \n enableEditingStudentDetail(false);\n }",
"private void PopulateStudentInfo(int Id) {\n Student _student = _myDb.getStudentInfoById(Id);\n\n // ***** Build the fields for the data to update\n EditText _fullName = (EditText) findViewById(R.id.editTextFullName);\n EditText _birthdate = (EditText) findViewById(R.id.dateBirthday);\n EditText _fullStreetAddress = (EditText) findViewById(R.id.editTextFullAddress);\n EditText _contactPhone = (EditText) findViewById(R.id.editTextContactPhone);\n EditText _contactEmail = (EditText) findViewById(R.id.editTextContactEmail);\n EditText _parentNames = (EditText) findViewById(R.id.editTextParentNames);\n EditText _defaultRate = (EditText) findViewById(R.id.numberRate);\n EditText _notes = (EditText) findViewById(R.id.editTextNotes);\n\n // ***** Set the field values\n _fullName.setText(_student.fullName);\n _birthdate.setText(_student.birthDate);\n _fullStreetAddress.setText(_student.fullAddress);\n _contactPhone.setText(_student.contactPhone);\n _contactEmail.setText(_student.contactEmail);\n _parentNames.setText(_student.parentNames);\n\n // ***** Convert to a string from Display\n _defaultRate.setText(String.valueOf(_student.defaultRate));\n _notes.setText(_student.notes);\n\n }",
"public String getStudentid() {\n return studentid;\n }",
"public int getStudentNum(){//return student Number\r\n \treturn studentNum;\r\n }",
"public void setStuData() {\n\n System.out.print(\"Enter The Name : \"); \t String Entered_Name = Scan.next();\n\n System.out.print(\"Enter User Name : \");\t String Entered_User = Scan.next();\n\n System.out.print(\"Enter Password : \");\t int Entered_Pass = Scan.nextInt();\n\n System.out.print(\"Enter Feild : \");\t\t String Entered_Feild = Scan.next();\n\n Students_list.add(new Student(Entered_User , Entered_Name , Entered_Pass , Entered_Feild));\n\n System.out.print(\"Data Has been Saved!\");\n\n }",
"@Given(\"^I selected a student$\")\r\n\tpublic void SelectAstudent() throws Throwable {\n\t\tdriver.findElement(\r\n\t\t\t\tBy.xpath(\".//*[@id='_ING_WAR_INGportlet_:list:studentlist:0:edit']\"))\r\n\t\t\t\t.click();\r\n\t}",
"public static void Display (int Table_num) throws SQLException\n\t {\n\t\t try{\t\t\n\t\t\t//Declarations\n\t\t\tint flag =0; //to check if data is found or not\n\t\t\tString query = new String();\n\t\t\t\n \n\t\t\tif (Table_num ==1) \n\t \t\tquery = \"begin StudRegSys.show_students(:1); end;\" ;\n\t \telse if (Table_num == 2)\n\t \t\tquery = \"begin StudRegSys.show_classes(:1); end;\" ;\n\t \telse if (Table_num == 3)\n\t \t\tquery = \"begin StudRegSys.show_prerequisites(:1); end;\" ;\n\t\t\telse if (Table_num == 4)\n query = \"begin StudRegSys.show_enrollments(:1); end;\" ;\n else if (Table_num == 5)\n query = \"begin StudRegSys.show_courses(:1); end;\" ;\n\t \telse if (Table_num == 6)\n\t \t\tquery = \"begin StudRegSys.show_logs(:1); end;\" ;\n\t\t\telse if\t(Table_num == 7)\n\t\t\t\t{\n\t\t\t\t\tsearch_prerequisites();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\telse if\t(Table_num == 8)\n\t\t\t\t{\n\t\t\t\t \tstudents_info();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t/*else if (Table_num == 8)\n\t\t\t\tquery = \"begin StudRegSys.student_info(:1,:2,:3);end;\" ;*/\n\n//Connection to Oracle server\n OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();\n ds.setURL(\"jdbc:oracle:thin:@grouchoIII.cc.binghamton.edu:1521:ACAD111\");\n Connection conn = ds.getConnection(\"vbobhat1\", \"BingData\");\nCallableStatement cs = conn.prepareCall (query);\n\t \n\t \tcs.registerOutParameter(1,OracleTypes.CURSOR);\n\t \n\t \t//execute and retrieve the result set\n\t \tcs.execute();\n\t \tResultSet rs;\n\t\t\n\t \trs = (ResultSet)cs.getObject(1);\n\t \n\t \t// print the results for Show_students\n\t \tif(Table_num == 1){ \n\t\t\t\tSystem.out.println(\"SID\" + \"\\t\" + \"FIRSTNAME\" + \"\\t\" + \"LASTNAME\" + \"\\t\" + \"STATUS\" + \"\\t\" + \"\\t\" + \"GPA\" + \"\\t\" + \"\\t\" + \"EMAIL\");\n\t \t\tSystem.out.println(\"---\" + \"\\t\" + \"---------\" + \"\\t\" + \"--------\" + \"\\t\" + \"------\" + \"\\t\" + \"\\t\" + \"---\" + \"\\t\" + \"\\t\" + \"-----\");\n\t \t\twhile (rs.next()){\n\t \t\tflag=1; //indicates data found\n\t\t\t\tSystem.out.println(rs.getString(1) + \"\\t\" + rs.getString(2) + \"\\t\" + \"\\t\" + rs.getString(3) + \"\\t\" + \"\\t\" + rs.getString(4) + \"\\t\" + \"\\t\" \n+ rs.getFloat(5) + \"\\t\" + \"\\t\" + rs.getString(6));\n\t \t\t}\n\t \t}\n// print the results for Show_classes \n\t \telse if(Table_num == 2){ \n\t\t\t\tSystem.out.println(\"CLASSID\" + \"\\t\" + \"DEPT_CODE\" + \"\\t\" + \"COURSE#\" + \"\\t\" + \"SECT#\" + \"\\t\" + \"YEAR\" + \"\\t\" +\n\t \t\t\"SEMESTER\" + \"\\t\" + \"LIMIT\" + \"\\t\" + \"CLASS_SIZE\" );\n\t \t\tSystem.out.println(\"---\" + \"\\t\" + \"---------\" + \"\\t\" + \"-------\" + \"\\t\" + \"-----\" + \"\\t\" + \"----\" + \"\\t\" + \n\t\t\t\t\"--------\" + \"\\t\" + \"-----\" + \"\\t\" + \"----------\" );\n\t \t\t\t\n\t \t\twhile (rs.next())\n\t \t\t{\n\t \t\t\tflag=1; //indicates data found\n\t \t\t\tSystem.out.println(rs.getString(1) + \"\\t\" + rs.getString(2) + \"\\t\" + \"\\t\" + rs.getInt(3) + \"\\t\" + rs.getInt(4) + \"\\t\"+ rs.getInt(5) + \"\\t\" + rs.getString(6) + \"\\t\" +\"\\t\" + rs.getInt(7) + \"\\t\" + \"\\t\" + rs.getInt(8) ); \n\t \t\t}\n\t \t}\n\t\t\t// print the results for Show_Prerequities\n else if(Table_num == 3){\n System.out.println(\"DEPT_CODE\" + \"\\t\" + \"COURSE#\" + \"\\t\" + \"PRE_DEPT_CODE\" + \"\\t\" + \"PRE_COURSE#\");\n System.out.println(\"---------\" + \"\\t\" + \"-------\" + \"\\t\" + \"-------------\" + \"\\t\" + \"-----------\");\n while (rs.next())\n {\n flag=1; //indicates data found\n System.out.println(rs.getString(1) + \"\\t\" + \"\\t\" + rs.getInt(2) + \"\\t\" + rs.getString(3) + \"\\t\" + \"\\t\" + rs.getInt(4));\n }\n }\n\t \t// print the results for Show_enrollment\n\t \telse if(Table_num == 4){ \n\t\t\t\tSystem.out.println(\"SID\" + \"\\t\" + \"CLASSID\" + \"\\t\" + \"LGRADE\");\n\t \t\tSystem.out.println(\"---\" + \"\\t\" + \"-------\" + \"\\t\" + \"------\");\n\t \t\twhile (rs.next())\n\t \t\t{\n\t \t\t\tflag=1; //indicates data found\n\t \t\t\tSystem.out.println(rs.getString(1) + \"\\t\" + rs.getString(2)+ \"\\t\" + rs.getString(3));\n\t \t\t}\n\t \t}\n\t\t\t// print the results for Show_courses\n else if(Table_num == 5){\n System.out.println(\"DEPT_CODE\" + \"\\t\" + \"COURSE#\" + \"\\t\" + \"\\t\" + \"TITLE\" );\n System.out.println(\"---------\" + \"\\t\" + \"-------\" + \"\\t\" + \"\\t\" + \"-----\" );\n while (rs.next())\n {\n flag=1; //indicates data found\n System.out.println(rs.getString(1) + \"\\t\" + \"\\t\" + rs.getInt(2)+ \"\\t\" + \"\\t\" + rs.getString(3));\n }\n }\n\t \t// print the results for Show_logs\n\t \telse if(Table_num == 6){ \t\n\t\t\t\tSystem.out.println(\"LOGID\" + \"\\t\" + \"WHO\" + \"\\t\" + \"\\t\" + \"TIME\" + \"\\t\" + \"\\t\" + \"TABLE_NAME\" +\"\\t\" + \"OPERATION\" + \"\\t\" + \"KEY_VALUE\" );\n\t \t\tSystem.out.println(\"-----\" + \"\\t\" + \"---\" + \"\\t\" + \"\\t\" + \"----\" + \"\\t\" + \"\\t\" + \"----------\" + \"\\t\" + \"---------\" + \"\\t\" + \"---------\");\n\t \t\twhile (rs.next()){\n\t \t\t\tflag=1; //indicates data found\n System.out.println(rs.getInt(1) + \"\\t\" + rs.getString(2) +\"\\t\" + rs.getTime(3)+ \"\\t\" + rs.getString(4) + \"\\t\"+ rs.getString(5)+ \"\\t\" + \"\\t\" + rs.getString(6));\n\t \n\t \t\t}\n\t\t\t} \n\t\t\n\n\t \n\t\t\t//Indicates that no data was found\n\t\t\tif (flag== 0) \n\t\t\t\tSystem.out.println (\"No data found\");\n\t\t\n\t \t//close the result set, statement, and the connection\n\t \trs.close();\n\t \tcs.close();\n\t \tconn.close();\n\t \n\t \t System.out.println(\"\\n\\n\");\n\n\t }\ncatch (SQLException ex) { System.out.println (\"\\n*** SQLException caught ***\\n\" + ex.getMessage());}\n catch (Exception e) {System.out.println (\"\\n*** other Exception caught ***\\n\");}\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jLabel1 = new javax.swing.JLabel();\n jSeparator1 = new javax.swing.JSeparator();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n txtStudentId = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n txtFullname = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n ftxMark = new javax.swing.JFormattedTextField();\n jLabel5 = new javax.swing.JLabel();\n cbxMajor = new javax.swing.JComboBox<>();\n jLabel6 = new javax.swing.JLabel();\n txtCapacity = new javax.swing.JTextField();\n cbxBonus = new javax.swing.JCheckBox();\n jSeparator2 = new javax.swing.JSeparator();\n btnAdd = new javax.swing.JButton();\n btnRemove = new javax.swing.JButton();\n btnUpdate = new javax.swing.JButton();\n btnReset = new javax.swing.JButton();\n jScrollPane2 = new javax.swing.JScrollPane();\n tblStudents = new javax.swing.JTable();\n btnSortByName = new javax.swing.JButton();\n btnSortByMark = new javax.swing.JButton();\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n jScrollPane1.setViewportView(jTable1);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 18)); // NOI18N\n jLabel1.setText(\"Student Management\");\n\n jLabel2.setText(\"Student ID:\");\n\n jLabel3.setText(\"Fullname:\");\n\n jLabel4.setText(\"Mark:\");\n\n jLabel5.setText(\"Major\");\n\n cbxMajor.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Item 1\", \"Item 2\", \"Item 3\", \"Item 4\" }));\n\n jLabel6.setText(\"Grade\");\n\n txtCapacity.setEditable(false);\n\n cbxBonus.setText(\"Bonus\");\n cbxBonus.setEnabled(false);\n\n btnAdd.setText(\"Add\");\n btnAdd.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnAddActionPerformed(evt);\n }\n });\n\n btnRemove.setText(\"Remove\");\n btnRemove.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveActionPerformed(evt);\n }\n });\n\n btnUpdate.setText(\"Update\");\n btnUpdate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnUpdateActionPerformed(evt);\n }\n });\n\n btnReset.setText(\"Reset\");\n btnReset.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnResetActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)))\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(24, 24, 24)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtStudentId)\n .addComponent(txtFullname)\n .addComponent(ftxMark)\n .addComponent(cbxMajor, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(cbxBonus, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtCapacity, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jSeparator2))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(39, 39, 39)\n .addComponent(btnAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnRemove, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnReset, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(57, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(txtStudentId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(txtFullname, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(25, 25, 25)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(ftxMark, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(27, 27, 27)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5)\n .addComponent(cbxMajor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtCapacity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel6))\n .addGap(12, 12, 12)\n .addComponent(cbxBonus)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 12, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAdd)\n .addComponent(btnRemove)\n .addComponent(btnUpdate)\n .addComponent(btnReset))\n .addGap(12, 12, 12))\n );\n\n tblStudents.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n tblStudents.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tblStudentsMouseClicked(evt);\n }\n });\n jScrollPane2.setViewportView(tblStudents);\n\n btnSortByName.setText(\"Sort by Name\");\n btnSortByName.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSortByNameActionPerformed(evt);\n }\n });\n\n btnSortByMark.setText(\"Sort by Mark\");\n btnSortByMark.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSortByMarkActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jSeparator1)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addGap(85, 85, 85))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jScrollPane2)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(59, 59, 59)\n .addComponent(btnSortByName)\n .addGap(74, 74, 74)\n .addComponent(btnSortByMark, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSortByName)\n .addComponent(btnSortByMark))\n .addContainerGap(46, Short.MAX_VALUE))\n );\n\n pack();\n }",
"public String getStudentName() {\r\n\t\treturn studentName;\r\n\t}",
"public void printStudents()\n {\n for(Student s : students)\n System.out.println(s);\n }",
"private void drawStudentViews() {\n Dimensions dimsNum = dimensionsContainer.findDimensions(KEY_NUM_LEFT);\n Dimensions dimsName = dimensionsContainer.findDimensions(KEY_NAME_LEFT);\n Integer iPref = Integer.valueOf(PrefsManager.getInstance(mainContext).getPrefs()\n .getString(PrefsManager.PREFS_BLANK_NAME_FORMAT,\n \"0\"));\n String str;\n BlankTagHandler tagHandler;\n if ((studentList != null) && (!studentList.isEmpty())) {\n for (int i = 0; i < studentList.size(); i++) {\n //Add LayoutLeft\n LinearLayout layoutLeft = new LinearLayout(mainContext);\n layoutLeft.setOrientation(LinearLayout.HORIZONTAL);\n layoutLeft.setLayoutParams(layoutParams_WC_WC);\n bodyLeftLayout.addView(layoutLeft);\n //Add numBody\n TextView numBody = new TextView(mainContext);\n numBody.setText(String.valueOf(i + 1));\n dimsNum.setStyle(numBody);\n numBody.setTag(\n new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_num_body));\n numBody.setClickable(true);\n numBody.setOnClickListener(generalClickListener);\n layoutLeft.addView(numBody);\n //Add nameBody\n TextView nameBody = new TextView(mainContext);\n int formatId;\n if ((studentList.get(i).getMiddleName() == null)\n || ((studentList.get(i).getMiddleName().equals(\"\")))) {\n if (iPref == 0) { formatId = 4; } else formatId = 3;\n } else { formatId = iPref; }\n switch (formatId) {\n case 0:\n str = String.format(\"%s %c.%c.\",\n studentList.get(i).getLastName(),\n studentList.get(i).getFirstName().charAt(0),\n studentList.get(i).getMiddleName().charAt(0));\n break;\n case 1:\n str = String.format(\"%s %s %s\",\n studentList.get(i).getLastName(),\n studentList.get(i).getFirstName(),\n studentList.get(i).getMiddleName());\n break;\n case 2:\n str = String.format(\"%s %s %c.\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName(),\n studentList.get(i).getMiddleName().charAt(0));\n break;\n case 3:\n str = String.format(\"%s %s\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName());\n break;\n case 4:\n str = String.format(\"%s %c.\", studentList.get(i).getLastName(),\n studentList.get(i).getFirstName().charAt(0));\n break;\n default:\n str = \"err\";\n }\n nameBody.setText(str);\n dimsName.setStyle(nameBody);\n setClickableView(nameBody, dimsName.getBgColor());\n //nameBody.setMinHeight(Dimensions.dipToPixels(mainContext,48));\n //Add tagHandler\n tagHandler =\n new BlankTagHandler(BlankTagHandler.CeilType.STUDENT, R.id.blank_name_body);\n tagHandler.setStudentId(studentList.get(i).getId());\n tagHandler.setTextView(nameBody);\n nameBody.setTag(tagHandler);\n //DebugUtils.testStudentCols(nameBody);\n layoutLeft.addView(nameBody);\n\n }\n }\n//Add addRowCeil / Absent Row\n if (studentList == null || studentList.isEmpty() || (classList != null && !classList.isEmpty())\n || (studentList.isEmpty() && summaryEntryList != null &&\n !summaryEntryList.isEmpty())) {\n //Add LayoutLeft\n LinearLayout layoutLeft = new LinearLayout(mainContext);\n layoutLeft.setOrientation(LinearLayout.HORIZONTAL);\n layoutLeft.setLayoutParams(layoutParams_MP_WC);\n //layoutLeft.setX(dims.getViewWidth()+dims.getMarginsLeft()*2);\n layoutLeft.setGravity(Gravity.RIGHT);\n layoutLeft.setBackgroundColor(bgColor_Table);\n bodyLeftLayout.addView(layoutLeft);\n //Add nameBody\n TextView nameBody = new TextView(mainContext);\n //nameBody.setWidth(dims.getViewWidth());\n //nameBody.setGravity(Gravity.CENTER);\n\n Dimensions dimsAbsent = dimensionsContainer.findDimensions(KEY_ABSENT_CEIL);\n dimsAbsent.setStyle(nameBody);\n nameBody.setGravity(Gravity.CENTER);\n int width = 0;\n if (dimsName.getViewWidth() != null) width += dimsName.getViewWidth();\n if (dimsNum.getViewWidth() != null) width += dimsNum.getViewWidth();\n if (width != 0) {\n width += dimsNum.getMarginsLeft() + dimsNum.getMarginsRight();\n nameBody.setWidth(width);\n }\n if (studentList.isEmpty()) {\n nameBody.setText(R.string.symbol_row_add);\n tagHandler = new BlankTagHandler(BlankTagHandler.CeilType.ADD_ROW_CEIL,\n R.id.blank_absent_row);\n setClickableView(nameBody, dimsAbsent.getBgColor());\n } else {\n nameBody.setText(R.string.blank_absent_row);\n tagHandler =\n new BlankTagHandler(BlankTagHandler.CeilType.NONE, R.id.blank_absent_row);\n nameBody.setClickable(true);\n nameBody.setOnClickListener(generalClickListener);\n }\n tagHandler.setTextView(nameBody);\n nameBody.setTag(tagHandler);\n layoutLeft.addView(nameBody);\n }\n\n }",
"public String getStudentID() {\r\n\t\treturn studentID;\r\n\t}"
] | [
"0.7364118",
"0.7241678",
"0.7011796",
"0.6922891",
"0.6770412",
"0.67689556",
"0.6708533",
"0.6664326",
"0.6527069",
"0.6524789",
"0.64536875",
"0.64184266",
"0.6389466",
"0.63528204",
"0.6347148",
"0.6336457",
"0.6278884",
"0.6257689",
"0.6256723",
"0.62299067",
"0.6184821",
"0.6176733",
"0.6152397",
"0.6152184",
"0.615003",
"0.61435294",
"0.6105347",
"0.6082883",
"0.6074507",
"0.60420763",
"0.6017467",
"0.60036725",
"0.5985239",
"0.598421",
"0.59719837",
"0.5966971",
"0.59666425",
"0.59552526",
"0.5951429",
"0.5942839",
"0.5933174",
"0.59260535",
"0.59153455",
"0.5912345",
"0.5899836",
"0.58970886",
"0.58915365",
"0.58819425",
"0.58753014",
"0.5867563",
"0.585818",
"0.58552134",
"0.5826971",
"0.5800821",
"0.5790454",
"0.57868385",
"0.57817453",
"0.5779503",
"0.57755333",
"0.57660675",
"0.57527983",
"0.5736364",
"0.5735392",
"0.57290125",
"0.5724803",
"0.57216966",
"0.57136375",
"0.57064515",
"0.57061857",
"0.5701121",
"0.5652992",
"0.5648474",
"0.5640554",
"0.5636199",
"0.5631124",
"0.56300235",
"0.5624314",
"0.56237584",
"0.5621845",
"0.5613492",
"0.56094486",
"0.5604893",
"0.5601244",
"0.5599737",
"0.5588608",
"0.55848306",
"0.5582819",
"0.557224",
"0.55717283",
"0.5565947",
"0.5565501",
"0.5552589",
"0.55488014",
"0.5547938",
"0.5547824",
"0.5546918",
"0.5540422",
"0.55290115",
"0.55281883",
"0.55271804",
"0.5525387"
] | 0.0 | -1 |
/ AnchorPane root = (AnchorPane)FXMLLoader.load(getClass().getResource("View/Login.fxml")); primaryStage.setTitle("TypePlat"); Scene scene = new Scene(root); primaryStage.setScene(scene); primaryStage.show(); | @Override
public void start(Stage primaryStage) throws Exception {
listePane.add((AnchorPane) FXMLLoader.load(getClass().getResource("../View/Login.fxml")));
ps = primaryStage;
primaryStage.initStyle(StageStyle.TRANSPARENT);
root = (AnchorPane) FXMLLoader.load(getClass().getResource("../View/Blank.fxml"));
root.setOnMousePressed(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
xOffset = event.getSceneX();
yOffset = event.getSceneY();
}
});
root.setOnMouseDragged(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
primaryStage.setX(event.getScreenX() - xOffset);
primaryStage.setY(event.getScreenY() - yOffset);
}
});
setVue(0);
Scene scene = new Scene(root);
// scene.setFill(javafx.scene.paint.Color.TRANSPARENT);
// scene.getStylesheets().add(getClass().getResource("application.css").toExternalForm());
primaryStage.setScene(scene);
primaryStage.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"DispatcherLogin/DispatcherLoginView.fxml\"));\n primaryStage.setTitle(\"DISPATCHER LOGIN :P\"); // titel\n primaryStage.setScene(new Scene(root));\n primaryStage.show();\n }",
"@Override\r\n public void start(Stage primaryStage) throws Exception \r\n {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/loginView.fxml\")); \r\n Scene scene = new Scene(root);\r\n primaryStage.setScene(scene);\r\n primaryStage.show();\r\n }",
"private void loadLogin() throws IOException {\r\n Stage primaryStage;\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/LoginView.fxml\"));\r\n Scene scene = new Scene(root);\r\n primaryStage = new Stage();\r\n primaryStage.setScene(scene);\r\n primaryStage.setResizable(false);\r\n primaryStage.show();\r\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getClassLoader().getResource(\"Main.fxml\"));\n primaryStage.setTitle(\"Faulkner Kiosk\");\n primaryStage.setScene(new Scene(root, 600, 400));\n primaryStage.show();\n\n }",
"public void showLogin() {\n try {\n\n // Load person overview.\n loginController controller = new loginController(this);\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(MainApp.class.getResource(\"Login.fxml\"));\n loader.setController(controller);\n AnchorPane personOverview = (AnchorPane) loader.load();\n\n // Set person overview into the center of root layout.\n rootLayout.setCenter(personOverview);\n controller.background();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/mainForm.fxml\"));\n Scene sceneOne = new Scene(root);\n primaryStage.setScene(sceneOne);\n primaryStage.show();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"Scene.fxml\"));\n primaryStage.setTitle(\"Project 3\");\n primaryStage.setScene(new Scene(root, 600, 600));\n primaryStage.show();\n }",
"public void start(Stage primaryStage) {\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/pig/gui/Login.fxml\"));\n\t\t\tprimaryStage.setScene(new Scene(root));\n\t\t\tprimaryStage.show();\n\t\t\troot.requestFocus();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"@FXML\n void onLogin(ActionEvent event) throws IOException {\n System.out.println(\"inloggen\");\n Parent parent1 = FXMLLoader.load(getClass().getResource(\"/schermen/navigatie.fxml\"));\n Scene scene = new Scene(parent1);\n Stage app_stage = (Stage)((Node) event.getSource()).getScene().getWindow();\n app_stage.setScene(scene);\n app_stage.show();\n \n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"fxml_files/home.fxml\"));\n primaryStage.setScene(new Scene(root, 1000, 700));\n primaryStage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws SQLException {\n daoUsers.makeAllInactive();\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"/view/Login.fxml\"));\n Scene scene = new Scene(root);\n scene.getStylesheets().add(getClass().getResource(\"/view/app.css\").toExternalForm());\n primaryStage.setScene(scene);\n primaryStage.setTitle(\"Cryptocurrency Trader\");\n //primaryStage.getIcons().add(new Image(\"icon.jpg\"));\n primaryStage.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n // Loads the Home view\n Parent root = FXMLLoader.load(getClass().getResource(\"fxml/Home.fxml\"));\n\n primaryStage.setTitle(\"To-Do Manager\"); // Sets the title of the window\n\n // Sets the Home view as the first scene\n Scene scene = new Scene(root, 854, 480);\n\n // Sets the window's scene\n primaryStage.setScene(scene);\n\n // Prevents user from resizing window ( because of UI reasons )\n primaryStage.setResizable(false);\n\n // Displays the window\n primaryStage.show();\n }",
"public void displayCreateProfile() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/CreateProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Main Menu\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }",
"public void displayAddFriendSearch() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/AddFriend.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Add Friend Search\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 400));\r\n primaryStage.show();\r\n }",
"@Override\n public void start(Stage stage) {\n try {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/fxml/scnLogIn.fxml\"));\n Parent root = loader.load();\n Scene scene = new Scene(root);\n stage.setScene(scene);\n stage.setTitle(\"Log in\");\n stage.show();\n } catch (Exception ex) {\n System.out.println(ex.getMessage());\n }\n }",
"@Override\n\tpublic void start(Stage mainStage) throws Exception {\n\t\twindow = mainStage;\n\n\t\tFXMLLoader loader = new FXMLLoader();\n\t\tloader.setLocation(getClass().getResource(\"/view/logInScreen.fxml\"));\n\t\t\n\t\tParent root = loader.load();\n\n\t\tmainStage.setTitle(\"Photos\");\n\n\t\tScene logIn = new Scene (root);\n\n\t\tmainStage.setResizable(false);\n\t\tmainStage.setScene(logIn);\n\t\tmainStage.show();\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"MainForm.fxml\"));\n primaryStage.setTitle(\"Inventory Management System\");\n primaryStage.setMinHeight(500);\n primaryStage.setMinWidth(800);\n primaryStage.setScene(new Scene(root, 1280, 720));\n primaryStage.show();\n\n\n }",
"@Override\n public void start(Stage primaryStage) {\n\n pStage = primaryStage;\n\n try {\n\n\n Parent root = FXMLLoader.load(getClass().getResource(\"/GUI.fxml\"));\n\n Scene scene = new Scene(root, 600, 400);\n\n primaryStage.setTitle(\"Shopper 5000 Ultimate\");\n\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.show();\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"mainMenu/mainMenu.fxml\"));\n primaryStage.setTitle(\"Hello World\");\n Scene s =new Scene(root, defaultWindowWidth, defaultWindowHight);\n s.getStylesheets().add(getClass().getResource(\"css/main.css\").toExternalForm());\n primaryStage.setScene(s);\n primaryStage.setMinHeight(480);\n primaryStage.setMinWidth(480);\n primaryStage.show();\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws IOException {\n\t Parent root = FXMLLoader.load(getClass().getResource(\"WeatherView.fxml\"));\r\n\t \r\n\t //setting the title of the stage\r\n\t primaryStage.setTitle(\"Weather Forecast\");\r\n\t \r\n\t //Setting the scene in the stage\r\n\t primaryStage.setScene(new Scene(root));\r\n\t \r\n\t //this method shows the stage\r\n\t primaryStage.show();\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t}",
"public void displayManageFriendsGroups() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/ManageFriendsGroups.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Manage Friends and Groups\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 400));\r\n primaryStage.show();\r\n }",
"@FXML\n private void loadRegisterView() throws Exception{\n Parent root = FXMLLoader.load(getClass().getClassLoader().getResource(\"registerCar.fxml\"));\n Scene scene = new Scene(root);\n getPrimaryStage().setTitle(\"Welcome\");\n getPrimaryStage().setScene(scene);\n }",
"public void loginStage(Stage primaryStage){\n loginStage = primaryStage;\n BorderPane logInBp = new BorderPane();\n String currentPage;\n currentPage = setBorderPaneTopLogin(logInBp, \"login\");\n setBorderPaneLogin(logInBp);\n \n \n Scene scene = new Scene(logInBp, Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n scene.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n loginStage.setTitle(bankName + \": \" + currentPage);\n loginStage.setScene(scene);\n loginStage.show();\n createMainStage(); // creates next stage\n }",
"public void displayEditProfile() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/EditProfile.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Edit Profile\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 900));\r\n primaryStage.show();\r\n }",
"public void displayAddFriendresults() throws Exception{\r\n System.out.println(\"Username And Login Match\");\r\n currentStage.hide();\r\n Stage primaryStage = new Stage();\r\n System.out.println(\"Step 1\");\r\n Parent root = FXMLLoader.load(getClass().getResource(\"view/SearchResults.fxml\"));\r\n System.out.println(\"step 2\");\r\n primaryStage.setTitle(\"Friend Search Results\");\r\n System.out.println(\"Step 3\");\r\n primaryStage.setScene(new Scene(root, 600, 400));\r\n primaryStage.show();\r\n }",
"public void showPersonOverview() {\n try {\n // Load person overview.\n FXMLLoader loader = new FXMLLoader();\n //URL url=getClass().getResource(\"/fxml/Focustab.fxml\");\n loader.setLocation(MainApp.class.getResource(\"/fxml/Focustab.fxml\"));\n // Pane focusPane = (Pane)FXMLLoader.load(getClass().getResource(\"/fxml/Focustab.fxml\"));\n Pane focusPane=(Pane)loader.load();\n FocusPaneController controller = loader.getController();\n controller.setMainApp(this);\n Scene myScene = new Scene(focusPane);\n primaryStage.setScene(myScene);\n primaryStage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@FXML\n private void SignInButtonAction(ActionEvent event) throws IOException {\n\n Parent sign_parent = FXMLLoader.load(getClass().getResource(\"/sample/admin/admin.fxml\"));\n Scene sign_scene = new Scene(sign_parent);\n Stage sign_stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n sign_stage.setScene(sign_scene);\n sign_stage.show();\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"Splash.fxml\"));\r\n\t\t//Scene scene = new Scene(root,1200,800);\r\n\t\tScene scene = new Scene(root,800,400);\r\n\t\t\r\n\t\tprimaryStage.setResizable(false);\r\n\t\tprimaryStage.setScene(scene);\r\n\t\tprimaryStage.initStyle(StageStyle.UNDECORATED);\t\r\n\t\tprimaryStage.show();\r\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tPane root = (Pane) FXMLLoader.load(new URL(this.getClass().getResource(\"login.fxml\").toExternalForm()));\n\t\tinitAdminCard(root);\n\n\t\tStackPane sp2 = (StackPane) root.lookup(\"#sp2\");\n\t\tJFXDepthManager.setDepth(sp2, 2);\n\t\tStackPane sp3 = (StackPane) root.lookup(\"#sp3\");\n\t\tJFXDepthManager.setDepth(sp3, 2);\n\n\t\t//Setup scene and set it in stage\n\t\tScene scene = new Scene(root);\n\t\tscene.getStylesheets().add(this.getClass().getResource(\"jfoenix-components.css\").toExternalForm());\n\t\tscene.getStylesheets().add(this.getClass().getResource(\"bootstrapfx.css\").toExternalForm());\n\t\tprimaryStage.setResizable(false);\n\t\tprimaryStage.setMaxHeight(700);\n\t\tprimaryStage.setMaxWidth(700);\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.show();\n\t}",
"@FXML\n public void LoginForMember(ActionEvent event) throws IOException {\n //we wrap it in try catch\n\n //it moves to the memberdashboard.\n Parent sign_parent = FXMLLoader.load(getClass().getResource(\"/MainUI/User/MemberDashBoard.fxml\"));\n Scene sign_scene = new Scene(sign_parent);\n Stage sign_stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n sign_stage.setScene(sign_scene);\n sign_stage.show();\n\n\n }",
"@Override\n public void start(Stage primaryStage) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"/MainMenuLayout.fxml\"));\n primaryStage.setTitle(\"Pairs\");\n primaryStage.setMinHeight(600);\n primaryStage.setMinWidth(600);\n primaryStage.setScene(new Scene(root));\n primaryStage.show();\n }",
"@Override\r\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"ui/main.fxml\")); //FXMLLoader.load(Utilities.getResourceURL(\"ui/main.fxml\"));\r\n primaryStage.setTitle(\"Custom Groovy Game Engine\");\r\n primaryStage.setScene(new Scene(root, 960, 480));\r\n primaryStage.show();\r\n }",
"@FXML\n void logIn(MouseEvent event) throws IOException {\n Parent root = FXMLLoader.load(getClass().getResource(\"logIn.fxml\"));\n Node node = (Node) event.getSource();\n Stage stage = (Stage) node.getScene().getWindow();\n stage.setScene(new Scene(root)); \n }",
"@FXML\n public void loginButtonPressed()\n {\n viewModel.validateLogin();\n mainView.setWindow(\"P\");\n\n }",
"private void initializeLoginStage() throws IOException{\n this.loginLoader= new FXMLLoader();\n this.loginLoader.setLocation(getClass().getResource(\"login.fxml\"));\n this.loginStage.setScene(new Scene(loginLoader.load()));\n this.loginStage.setResizable(false);\n ((LoginController)loginLoader.getController()).setStage(loginStage);\n }",
"@Override\n\tpublic void start(Stage primaryStage) {\n\n\t\tscene = new Scene(grid);\n\t\tscene.getStylesheets().add(shared.Configuration.STYLESHEETLOGINVIEW);\n\t\tthis.primaryStage = primaryStage;\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.setTitle(\"Login\");\n\t\tprimaryStage.setResizable(true);\n\t\tprimaryStage.show();\n\n\t}",
"@Override\n public void start(Stage stage) throws Exception \n {\n \n FXMLLoader appMainLoader = new FXMLLoader(getClass().getResource(Resources.app_main));\n\n Parent root = (Parent)appMainLoader.load();\n root.prefHeight(600);\n root.prefWidth(1100);\n\n AppMainController appMainController = appMainLoader.getController();\n appMainController.setAppLauncher(this);\n\n// stage.initStyle(StageStyle.UNDECORATED);\n stage.setResizable(false);\n stage.setMaxHeight(600);\n stage.setMaxWidth(1000);\n\n Scene scene = new Scene(root, Color.TRANSPARENT);\n scene.getStylesheets().add(Resources.app_css);\n \n stage.setTitle(\"Hims-Lab Equipment Interface\");\n stage.setScene(scene);\n stage.show();\n //init();\n }",
"private void showGameOverScreen(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/GameOverScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader.load();\n\n rootLayout.setCenter(anchorPane);\n }catch(IOException e){\n e.printStackTrace();\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n\n checkDllFiles.check(); // Checking if the DLL files for the gamepad is present. If not then it will add them\n Parent root = FXMLLoader.load(getClass().getClassLoader().getResource(\"sdv/gui/scenes/Login.fxml\")); // Loading the FXML file\n primaryStage.getIcons().add(new Image(\"icon/icon.png\", 200, 200, false, true)); // Adding a application icon\n primaryStage.setTitle(sceneTitle); // Setting the scene name\n primaryStage.setScene(new Scene(root, 700, 400)); // Setting the application size\n primaryStage.show(); // Shows the application window\n }",
"@FXML\n private void loadDriverView() throws Exception{\n Parent root = FXMLLoader.load(getClass().getClassLoader().getResource(\"driverTools.fxml\"));\n Scene scene = new Scene(root);\n getPrimaryStage().setTitle(\"Welcome\");\n getPrimaryStage().setScene(scene);\n }",
"@Override\n\tpublic void start(Stage stage) {\n\t\tParent parent;\n try {\n parent = FXMLLoader.load(\n this.getClass().getClassLoader().getResource(LOGIN_FORM) );\n } catch (IOException ex) {\n Logger.getLogger(\"LoginApplication\").log(Level.SEVERE, null, ex);\n return;\n }\n Scene scene = new Scene(parent);\n\n stage.setTitle(\"Login\");\n stage.setScene(scene);\n stage.show();\n\t}",
"public void loginButtonAction() {\n String username = usernameTextField.getText();\n String pass = passwordField.getText();\n\n if(checkFields()){\n if(am.login(username, pass)){\n LoginDetails.currentAdmin = am.getAdmin();\n try {\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n Stage stage = new Stage();\n Parent parent = FXMLLoader.load(getClass().getResource(\"/app/main/MainView.fxml\"));\n stage.setResizable(true);\n stage.setTitle(\"Admin Application\");\n stage.setScene(new Scene(parent, screenSize.getWidth() * 0.9, screenSize.getHeight() * 0.9));\n stage.show();\n\n Stage thisStage = (Stage) usernameTextField.getScene().getWindow();\n thisStage.close();\n\n stage.setOnCloseRequest(e -> {\n System.err.println(\"Main: Shutting down!\");\n });\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n else{\n setInfoMessage(\"Wrong username and/or password\", true);\n }\n }\n else{\n setInfoMessage(\"You have to enter username/password\", true);\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/application/views/MainMenu.fxml\")); //open up the menu on start up\n Parent root = loader.load();\n MainMenuController controller = loader.getController();\n NameModelManager model = new NameModelManager(); //construct the list of name models1\n CSSManager cssManager = new CSSManager();\n controller.initialise(model, cssManager);\n primaryStage.setTitle(\"Name Sayer\");\n primaryStage.setScene(new Scene(root, 1200, 700));\n primaryStage.show();\n primaryStage.setResizable(false);\n\n primaryStage.setOnCloseRequest(e ->{ //confirmation box for exiting program\n e.consume();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Quit?\");\n alert.setHeaderText(\"Are you sure you want to exit?\");\n alert.setContentText(\"Hit OK to quit\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n primaryStage.close();\n System.exit(0);\n }\n });\n }",
"private void showCreateNewPlayer(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/CreateNewPlayer.fxml\"));\n AnchorPane janela = (AnchorPane) loader.load();\n \n Stage createNewPlayerStage = new Stage();\n createNewPlayerStage.setTitle(\"Create new player\");\n createNewPlayerStage.initModality(Modality.WINDOW_MODAL);\n createNewPlayerStage.initOwner(primaryStage);\n Scene scene = new Scene(janela);\n createNewPlayerStage.setScene(scene);\n \n CreateNewPlayerController controller = loader.getController();\n controller.setGame(this);\n controller.setCreateNewPlayerStage(createNewPlayerStage); \n \n createNewPlayerStage.showAndWait();\n }catch(IOException e){\n }\n }",
"public void onShowMain(ActionEvent event) {\n try {\n Stage stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\n Parent scene = FXMLLoader.load(getClass().getResource(\"/App/View/MainScreenView.fxml\"));\n stage.setTitle(\"Customer Schedule\");\n stage.setScene(new Scene(scene));\n stage.show();\n }\n catch (Exception e){\n System.out.println(e.getMessage());\n }\n }",
"public void loadMainMenuView()\n\t{\n\n\t\ttry {\n\t\t\tprimaryStage.setTitle(\"Onitama\");\n\t\t\tGridPane root = new GridPane();\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/MainMenu.fxml\"));\n\t\t\troot = loader.load();\n\t\t\tMainMenuViewController viewController = (MainMenuViewController) loader.getController();\n\t\t\tviewController.setOnitamaController(onitamaController);\n\t\t\tviewController.init();\n\t\t\t\n\n\t\t\tScene scene = new Scene(root);\n\t\t\t//((Stage) outerPane.getScene().getWindow()).setScene(scene);\n\t\t\t//LoadViewController.primaryStage.setScene(scene);\n\t\t\tPlatform.runLater(() -> { LoadViewController.primaryStage.setScene(scene); });\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void bankraadgiver(Stage primaryStage) {\n try {\n // Indlaeser BankraadgiverScreen_System_2.fxml fil\n Parent root = FXMLLoader.load(getClass().getResource(\"GUI/BankraadgiverScreen_System_2.fxml\"));\n\n // Laver en scene med FXML filen\n Scene scene = new Scene(root);\n\n // Saetter vinduet titel til Kontoejer\n primaryStage.setTitle(\"Bank raadgiver\");\n // Saetter scenen\n primaryStage.setScene(scene);\n // Viser den\n primaryStage.show();\n\n\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }",
"@Override\n public void start(Stage primaryStage) {\n try {\n stage = primaryStage;\n stage.setTitle(\"Indie Airways\");\n stage.setMinWidth(WINDOW_WIDTH);\n stage.setMinHeight(WINDOW_HEIGHT);\n gotoLogin();\n //gotoMenu();\n primaryStage.show(); \n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }",
"@FXML\n private void sign_in(MouseEvent event) throws IOException {\n Parent login = FXMLLoader.load(this.getClass().getResource(\"Login.fxml\"));\n Scene scene = new Scene(login, 1500, 870);\n\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setScene(scene);\n window.setMaximized(true);\n window.show();\n }",
"public void setStage(String title, String resource) throws IOException, ClassNotFoundException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(resource));\n root = (AnchorPane)loader.load();\n //figure out which controller to show\n switch (resource){\n case \"../view/admin.fxml\":\n adminController = loader.getController();\n adminController.start(window);\n break;\n case \"../view/nonadmin.fxml\":\n nonAdminController = loader.getController();\n nonAdminController.start(window);\n break;\n case \"../view/login.fxml\":\n controller = loader.getController();\n controller.start(window);\n break;\n case \"../view/openAlbum.fxml\":\n openAlbumController = loader.getController();\n openAlbumController.start(window);\n break;\n case \"../view/searchPhotos.fxml\":\n searchPhotosController = loader.getController();\n searchPhotosController.start(window);\n break;\n case \"../view/slideshow.fxml\":\n slideShowController = loader.getController();\n slideShowController.start(window);\n break;\n default:\n throw new ClassNotFoundException();\n }\n Scene scene = new Scene(root, 714.0, 440.0);\n window.setScene(scene);\n window.setTitle(title);\n window.setResizable(false);\n window.show();\n }",
"@FXML\n protected void viewLoginPage() {\n \tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }",
"@FXML\n void returnMainMenu(ActionEvent event) throws IOException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/view/MainMenu.fxml\"));\n loader.load();\n\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n Parent scene = loader.getRoot();\n stage.setScene(new Scene(scene));\n stage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n\n // set up window.\n primaryStage.setWidth(600);\n primaryStage.setHeight(400);\n primaryStage.setResizable(false);\n\n // set up scenes.\n FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource(\"FXML/mainMenuLayout.fxml\"));\n Scene mainMenuScene = new Scene(mainMenuLoader.load());\n FXMLLoader gameLoader = new FXMLLoader(getClass().getResource(\"FXML/gameLayout.fxml\"));\n Scene gameScene = new Scene(gameLoader.load());\n\n // set the main menu to load into the game.\n MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController();\n mainMenuController.setGameScene(gameScene);\n\n primaryStage.setScene(mainMenuScene);\n\n primaryStage.show();\n\n }",
"@FXML\n public void New_List(ActionEvent actionEvent) {\n\n //Here we are going to open a window to create a list.\n //Working!!\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewTodolist.fxml\"));\n Parent root1 = (Parent) fxmlLoader.load();\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.initStyle(StageStyle.UNDECORATED);\n stage.setTitle(\"New List\");\n stage.setScene(new Scene(root1));\n stage.show();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@FXML\n private void loadMainScreen(ActionEvent event) {\n\t\tSystem.out.println(\"loading MainScreen \" + getClass().getResource(RESOURCE_PATH + \"MainScreen.fxml\"));\n\t\ttry {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(RESOURCE_PATH + \"MainScreen.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tscene.getStylesheets().add(getClass().getResource(RESOURCE_PATH + \"application.css\").toExternalForm());\n\t\t\tStage window = (Stage)((Node)event.getSource()).getScene().getWindow();\n\t \n\t window.setScene(scene);\n\t window.show();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@FXML\r\n\tpublic void viewTest( ) {\r\n\t\ttry {\r\n\t\t\tParent root2 = FXMLLoader.load(getClass().getResource(\"../view/TestView.fxml\"));\r\n\t\t\tMain.stage.setScene(new Scene (root2, 700, 500));\r\n\t\t\tMain.stage.show();\r\n\t\t} catch (Exception exception) {\r\n\t\t\texception.printStackTrace();\r\n\t\t}\r\n\t}",
"@FXML\r\n\tpublic void userMain(ActionEvent event) {\r\n\t\ttry {\r\n\t\t\t((Node) event.getSource()).getScene().getWindow().hide();\r\n\t\t\tPane root = loader.load(getClass().getResource(\"/application/user.fxml\").openStream());\r\n\t\t\tScene scene = new Scene(root);\r\n\t\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\r\n\t\t\tprimaryStage.setScene(scene);\r\n\t\t\tprimaryStage.show();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void initRootLayout() {\n try {\n // Load root layout from fxml file.\n FXMLLoader loader = new FXMLLoader();\n //loader.setLocation(RestApplication.class.getResource(\"views/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load(getClass().getResourceAsStream(\"/views/RootLayout.fxml\"));\n Scene scene = new Scene(rootLayout);\n Image img = new Image(\"file:resources/img/logo.png\");\n Stage mainStage = new Stage();\n this.stage = mainStage;\n mainStage.setScene(scene);\n mainStage.initStyle(StageStyle.DECORATED); \n mainStage.setTitle(\"..: tallyMED :: Home :..\");\n mainStage.getIcons().add(img);\n mainStage.setMaximized(true);\n loginStage.close();\n mainStage.setOnHidden(event -> Platform.exit());\n mainStage.show();\n \n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@FXML\n void viewNotes(ActionEvent event) {\n Parent root;\n try {\n //Loads library scene using library.fxml\n root = FXMLLoader.load(getClass().getResource(model.NOTES_VIEW_PATH));\n model.getNotesViewController().setPodcast(this.podcast);\n Stage stage = new Stage();\n stage.setTitle(this.podcast.getTitle()+\" notes\");\n stage.setScene(new Scene(root));\n stage.getIcons().add(new Image(getClass().getResourceAsStream(\"resources/musicnote.png\")));\n stage.setResizable(false);\n stage.showAndWait();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n window = primaryStage;\n Parent root = FXMLLoader.load(getClass().getResource(\"UserInterface.fxml\"));\n primaryStage.setTitle(\"Calculator\");\n primaryStage.setOnCloseRequest(e -> Main.closeMe());\n primaryStage.setResizable(false);\n\n primaryStage.setScene(new Scene(root, 600, 300));\n primaryStage.show();\n }",
"@FXML\r\n\tprivate void volverLogin(ActionEvent event) throws IOException {\r\n\r\n\t\tMain_App.showLoginView();\r\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/sample.fxml\"));\n Parent root = loader.load();\n primaryStage.setTitle(\"Tower Defence\");\n s = new Scene(root, 600, 480);\n primaryStage.setScene(s);\n primaryStage.show();\n MyController appController = (MyController)loader.getController();\n appController.createArena(); \t\t\n\t}",
"public static Scene getMainWindow(Stage mainStage) {\n\n HBox systemInfo = new HBox(SystemInfo.getSystemInfoLabel());\n systemInfo.alignmentProperty().setValue(Pos.BOTTOM_RIGHT);\n\n Button login = new Button(\"Login\");\n\n EventHandler<ActionEvent> loginButtonEvent = (actionEvent) -> {\n Authentication.getUserAccessToken();\n App.setUser(Graph.getUser(SimpleAuthProvider.getAccessToken()));\n if(App.getUser() == null){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(\"There was an error logging in please try again\");\n } else {\n App.configScene.show(mainStage);\n }\n };\n\n login.setOnAction(loginButtonEvent);\n\n\n\n\n\n //login button\n\n VBox loginContainer = new VBox();\n loginContainer.setAlignment(Pos.CENTER);\n loginContainer.getChildren().addAll(login);\n\n BorderPane borderPane = new BorderPane();\n borderPane.setCenter(loginContainer);\n borderPane.setBottom(systemInfo);\n\n\n Scene scene = new Scene(borderPane);\n\n return scene;\n }",
"public void OpenLoginScreen(ActionEvent event) throws IOException {\n Parent tripViewParent = FXMLLoader.load(getClass().getResource(\"login.fxml\")); // Carregando o arquivo fxml\n\n Stage window = new Stage();\n window.setResizable(false);\n window.setScene(new Scene(tripViewParent));\n window.show();\n\n ((Stage)(((Button)event.getSource()).getScene().getWindow())).close();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"sample.fxml\"));\n addExitOnEsc(primaryStage);\n primaryStage.setTitle(\"Hello World\");\n primaryStage.setScene(new Scene(root, 300, 275));\n primaryStage.show();\n\n }",
"@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void showAbout() {\n Stage aboutStage = new Stage();\n FXMLLoader aboutLoader = new FXMLLoader(getClass().getResource(\"/view/About.fxml\"));\n try {\n //Tries to load the fxml for the about window\n Parent root = aboutLoader.load();\n\n //Opens and waits\n aboutStage.setTitle(\"About\");\n aboutStage.setScene(new Scene(root, 600, 500));\n aboutStage.showAndWait();\n\n }catch (IOException ioe){\n //Shows a warning should the loading of the FXML fail.\n PopUpAlerts.ioAlertFXML();\n }\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\t\tGridPane root = FXMLLoader.load(getClass().getResource(\"Sample.fxml\"));\n\t\t\tScene scene = new Scene(root,400,400);\n\t\t\t\n\t\t\t//scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n\t\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\t\t\t\n\t}",
"@Override\n public void start(Stage primaryStage) {\n root = new VBox(10);\n root.setPadding(new Insets(30));\n initLabel();\n //set up scene\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.sizeToScene();\n primaryStage.setTitle(\"Mastermind\");\n primaryStage.show();\n }",
"@FXML\n private void logoutClick(){\n mainContainer.getScene().getWindow().hide();\n try {\n this.userController.logout();\n } catch (SQLException ex) {\n Logger.getLogger(MainController.class.getName()).log(Level.SEVERE, null, ex);\n }\n programPref.put(\"email\", \"\");\n Parent login = null;\n try {\n\n login = FXMLLoader.load(getClass().getResource(\"/com/slackers/inc/Boundary/FXML/outershell.fxml\"));\n String cssDoc = getClass().getResource(\"/com/slackers/inc/Boundary/CSS/custom.css\").toExternalForm();\n login.getStylesheets().add(cssDoc);\n\n Stage stage = new Stage();\n stage.setTitle(\"Main Application\");\n stage.setScene(new Scene(login));\n stage.show();\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"Logout Failed\");\n System.exit(0);\n }\n\n }",
"@FXML\n public void MainWindowScene(ActionEvent e) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"MainWindow.fxml\"));\n Main.mainWindow.setScene(new Scene(root));\n } catch (IOException el) {\n el.printStackTrace();\n }\n }",
"@FXML protected void editPatient(ActionEvent event) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"EditPatientInformation.fxml\"));\n Stage stage = new Stage();\n Scene scene = new Scene(root);\n \n stage.setScene(scene);\n stage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(\n getClass().getResource(\"/View/main.fxml\"));\n Pane root = (Pane)loader.load();\n\n listController = loader.getController();\n listController.start(primaryStage);\n\n primaryStage.setTitle(\"Song Library - Nick Carchio and Adam Romano\");\n primaryStage.setScene(new Scene(root, 750 , 500));\n primaryStage.show();\n\n }",
"public void initAndShowStage(Parent root) {\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.initModality(Modality.APPLICATION_MODAL);\n stage.setScene(scene);\n stage.setTitle(\"Ayuda para la Gestion de Usuarios\");\n stage.setResizable(false);\n stage.setMinWidth(800);\n stage.setMinHeight(600);\n stage.setOnShowing(this::handleWindowShowing);\n stage.show();\n }",
"public void showHomeScreen() {\n try {\n FXMLLoader loader1 = new FXMLLoader();\n loader1.setLocation(MainApplication.class.getResource(\"view/HomeScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader1.load();\n rootLayout.setCenter(anchorPane);\n HomeScreenController controller = loader1.getController();\n controller.setMainApp(this);\n } catch (IOException e) {\n \t\te.printStackTrace();\n \t }\n }",
"@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"Lesson3.fxml\"));\n \n \n // Create Scene with background Color\n Scene scene = new Scene(root, 700, 350, Color.LIGHTYELLOW);\n \n // set scene on stage with title\n stage.setTitle(\"Lesson 3 FXML\");\n stage.setScene(scene);\n stage.show();\n }",
"@FXML\r\n public void customerLogin(MouseEvent event) throws IOException {\r\n System.out.println(\"Customer Login Button Clicked.\");\r\n Parent root2 = FXMLLoader.load(getClass().getResource(\"Customer.fxml\"));\r\n Scene customerView = new Scene(root2, 700, 500);\r\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n appStage.setScene(customerView);\r\n customerView.getStylesheets().add\r\n (getClass().getResource(\"Customer.css\").toExternalForm());\r\n appStage.show();\r\n }",
"@FXML\n private void handleButtonAction(ActionEvent event) throws IOException {\n if (event.getSource() == logInButton) {\n //get reference to the button's stage \n stage = (Stage) logInButton.getScene().getWindow();\n //load up OTHER FXML document\n root = FXMLLoader.load(HRMS.class.getResource(\"View/EmployeeLoginView.fxml\"));\n } else if (event.getSource() == backButton) {\n //get reference to the button's stage \n stage = (Stage) backButton.getScene().getWindow();\n //load up OTHER FXML document\n root = FXMLLoader.load(HRMS.class.getResource(\"View/RoomView.fxml\"));\n } else if (event.getSource() == nextButton) {\n app.setChosenRooms(chosenRooms);\n stage = (Stage) nextButton.getScene().getWindow();\n root = FXMLLoader.load(HRMS.class.getResource(\"View/AmenityView.fxml\"));\n } else if (event.getSource() == cancelButton) {\n stage = (Stage) cancelButton.getScene().getWindow();\n root = FXMLLoader.load(HRMS.class.getResource(\"View/HomeView.fxml\"));\n } else {\n System.exit(0);\n }\n //create a new scene with root and set the stage\n Scene scene = new Scene(root);\n stage.setScene(scene);\n stage.show();\n }",
"public void start(Stage primaryStage)\n {\n Scene scene = new Scene(new PassWordPane(), 300, 150);\n // Takes information from PassWordPane and uses it\n primaryStage.setTitle(\"Password Creator\");\n primaryStage.setScene(scene);\n primaryStage.show();\n }",
"@FXML\r\n private void configMenuSalir(ActionEvent event) {\r\n LOG.log(Level.INFO, \"Ventana Login\");\r\n try {\r\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/LogIn.fxml\"));\r\n\r\n Parent root = (Parent) loader.load();\r\n\r\n LogInController controller = ((LogInController) loader.getController());\r\n controller.initStage(root);\r\n stage.hide();\r\n } catch (IOException e) {\r\n LOG.log(Level.SEVERE, \"Se ha producido un error de E/S\");\r\n }\r\n }",
"@Override\n\n\tpublic void start(Stage arg0) throws Exception {\n\t\twindow = arg0;\n\t\twindow.setTitle(\"Admin Login\");\n\t\n\t\t//adding components\n\t\t\n\t\tl1 = new Label(\"UserName\");\n\t\tname = new TextField();\n\t\tname.setPromptText(\"Enter username\");\n\t\tHBox hBox1 = new HBox();\n\t\thBox1.getChildren().addAll(l1,name);\n\t\thBox1.setSpacing(10);\n\t\thBox1.setAlignment(Pos.CENTER);\n\t\t\n\t\tl2 = new Label(\"Password\");\n\t\tpassword = new TextField();\n\t\tpassword.setPromptText(\"Enter password\");\n\t\tHBox hBox2 = new HBox();\n\t\thBox2.getChildren().addAll(l2,password);\n\t\thBox2.setSpacing(10);\n\t\thBox2.setAlignment(Pos.CENTER);\n\t\t\n\t\tlogin = new Button(\"Login\");\n\t\tconnect();\n\t\tlogin.setOnAction(e -> {try{loginClicked();}catch(Exception le) {System.out.println(\"Problem in Login\" + le);}});\n\t\t\n\t\tVBox vBox = new VBox();\n\t\tvBox.getChildren().addAll(hBox1,hBox2,login);\n\t\tvBox.setAlignment(Pos.CENTER);\n\t\t\n\t\tvBox.setSpacing(20);\n\t\ts = new Scene(vBox,300,250);\n\t\twindow.setScene(s);\n\t\twindow.show();\n\t\t\n\t}",
"@FXML\r\n\tvoid AccountViewBtnAction(ActionEvent event) {\r\n\t\ttry {\r\n\t\t\tStage stage;\r\n\t\t\tFXMLLoader loader = new FXMLLoader(\r\n\t\t\t\t\tgetClass().getResource(\"/bertelsbank/AccountViewController/AccountView.fxml\"));\r\n\t\t\tParent root = null;\r\n\t\t\troot = loader.<Parent>load();\r\n\t\t\tAccountViewController controller = loader.<AccountViewController>getController();\r\n\t\t\tScene scene = new Scene(root);\r\n\t\t\tstage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n\t\t\tstage.setScene(scene);\r\n\t\t\tstage.show();\r\n\t\t} catch (IOException e) {\r\n\t\t\ttxtError.setText(\"Der Server ist nicht verfügbar.\");\r\n\t\t}\r\n\t}",
"public void initRootLayout(){\n try{\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(Game.class.getResource(\"view/RootLayout.fxml\"));\n rootLayout = (BorderPane) loader.load();\n\n Scene scene = new Scene(rootLayout);\n \n primaryStage.setScene(scene);\n \n RootLayoutController controller = loader.getController();\n controller.setGame(this);\n \n primaryStage.show(); \n showCreateNewPlayer();\n }catch(IOException e){\n }\n }",
"@Override\n public void start(Stage primaryStage) throws IOException {\n Main.primaryStage = primaryStage;\n Main.primaryStage.setTitle(\"American Travel Bucketlist\");\n\n //Call the extension of the FXMLLoader for the MainView.\n showMainView();\n }",
"@FXML\r\n private void handleButtonAction(ActionEvent event) throws Exception{\n Employee emp = dao.findEmployeeByUsername(usernameTxtField.getText());\r\n if(emp.getPassword().equals(pwField.getText())){\r\n Parent homePageParent = FXMLLoader.load(getClass().getResource(\"FXMLDocument.fxml\"));\r\n Scene homePageScene = new Scene(homePageParent);\r\n\r\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n appStage.hide();\r\n appStage.setScene(homePageScene);\r\n appStage.show();\r\n }else{\r\n errorLabel.setText(\"Incorrect username or password!\");\r\n } \r\n }",
"@FXML\n private void startGame(){\n AnchorPane anchorPane = new AnchorPane();\n Scene gameScene = new Scene(anchorPane, 800, 600);\n Stage gameStage = new Stage();\n GameView gameView = new GameView(anchorPane, gameScene, gameStage);\n gameView.gameStart();\n }",
"@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }",
"@Override\n\tpublic Scene giveScene() {\n\t\tLabel SignIn=new Label(\"SIGN IN\");\n\t\tLabel UserName=new Label(\"Username\");\n\t\tLabel Password=new Label(\"Password\");\n\t\tTextField Username=new TextField();\n\t\tTextField PassWord=new TextField();\n\t\tButton SubmitButton=new Button(\"SUBMIT\");\n\t\tButton BackButton=new Button(\"BACK\");\n\t\tBackButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tmyGame.setPrimaryStage(myGame.GetLoginPageScene());\n\t\t\t}\n\t\t});\t\n\t\tSignIn.setId(\"SignInLabel\");\n\t\tUserName.setId(\"UserLabel\");\n\t\tPassword.setId(\"PasswordLabel\");\n\t\tUsername.setId(\"UserText\");\n\t\tPassWord.setId(\"PasswordText\");\n\t\tSubmitButton.setId(\"SubmitButton\");\n\t\tBackButton.setId(\"BackButton\");\n\t\tVBox SignInPageVb=new VBox(50,SignIn,UserName,Username,Password,PassWord,BackButton,SubmitButton);\n\t\tSignInPageVb.setTranslateY(100);\n\t\tSignInPageVb.setAlignment(Pos.TOP_CENTER);\n\t\tStackPane MainPageStackpane=new StackPane(SignInPageVb);\n\t\tMainPageStackpane.getStylesheets().add(getClass().getResource(\"SignInPage.css\").toString());\n\t\tmyScene= new Scene(MainPageStackpane,500,1000);\n\t\tmyScene.setFill(Color.BLACK);\n\t\tSubmitButton.setOnAction(new EventHandler<ActionEvent>() {\t\n\t\t\t@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tPlayer newPLayer = myGame.getMyDataBase().login(Username.getText(), PassWord.getText());\n\t\t\t\t//System.out.println(newPLayer);\n\t\t\t\tif (newPLayer != null) {\n\t\t\t\t\tmyGame.setCurrentPlayer(newPLayer);\n\t\t\t\t\tmyGame.setPrimaryStage(myGame.GetMainPageScene());\n\t\t\t\t}else {\n\t\t\t\t\tif(NoPlayer==null) {\n\t\t\t\t\t\tNoPlayer=new Label(\"Invalid User/Password\");\n\t\t\t\t\t\tSignInPageVb.getChildren().add(NoPlayer);\n\t\t\t\t\t}//System.out.println(\"katta\");\n\t\t\t\t//myGame.setPrimaryStage(myGame.GetGamePlayScene());\n\t\t\t\t}\n\t\t\t}\n\t\t});\t\n\n\t\treturn myScene;\n\t}",
"@Override\r\n public void start(Stage primaryStage) throws IOException {\r\n this.primaryStage = primaryStage;\r\n this.primaryStage.setTitle(\"HidatoTheGame\");\r\n initializeLayout(primaryStage);\r\n swapLoginFX();\r\n }",
"@Override\n public void start(Stage primaryStage) throws Exception\n {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/main/mainMenu.fxml\"));\n Pane root = loader.load();\n\n MainMenuController controller = loader.getController();\n controller.start(primaryStage);\n\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.setTitle(\"RU Cafe: Main Menu\");\n primaryStage.setResizable(false);\n primaryStage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n //Cargar primer escena\n Stage inicio = primaryStage;\n Parent rootInicio = FXMLLoader.load(getClass().getResource(\"vistas/inicio.fxml\"));\n inicio.setTitle(\"Baúl de los recuerdos\");\n inicio.setScene(new Scene(rootInicio, 790, 790));\n inicio.setResizable(false);\n //inicio.setResizable(false);\n inicio.show();\n\n }",
"private void connected(){\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/ui/dashboard.fxml\"));\n Parent root ;\n try {\n root = loader.load();\n } catch (IOException e) {\n e.printStackTrace();\n return;\n }\n DashboardController dashboardController = loader.getController();\n dashboardController.setData(loginManager.getFacadeManager());\n changeScene(root,\"Home\");\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\troot = new VBox(); // create vbox root pane\r\n\t\t\troot.setBackground(\r\n\t\t\t\t\tnew Background(new BackgroundFill(Color.WHITE, new CornerRadii(0), new Insets(0))));\r\n\t\t\tScene scene = new Scene(root,570,200); // set scene as vbox root pane\r\n\r\n\t\t\t/* top hbox pane and components --------------------------------------------------------------------------------------- */\r\n\t\t\t// set component with\r\n\t\t\tdouble upperComponentWidth = scene.getWidth()/5; // size for each component in top pane\r\n\r\n\t\t\t// email label:\r\n\t\t\tlblEmail = new Label(\"Email: \"); // create email label \r\n\t\t\tlblEmail.setPrefWidth(upperComponentWidth); // set email label width\r\n\t\t\tlblEmail.setPadding(new Insets(4, 0, 0, 0)); // set email label padding\r\n\t\t\tlblEmail.setAlignment(Pos.CENTER_LEFT); // set email label text alignment\r\n\r\n\t\t\t// email text field:\r\n\t\t\ttxfLoginEmail = new TextField(); // create email text field\r\n\t\t\ttxfLoginEmail.setPromptText(\"\\\"[email protected]\\\"\");\r\n\t\t\ttxfLoginEmail.setPrefWidth(upperComponentWidth); // set email text field width\r\n\r\n\t\t\t// password label:\r\n\t\t\tlblPassword = new Label(\"Password: \"); // create password label\r\n\t\t\tlblPassword.setPrefWidth(upperComponentWidth); // set password label width\r\n\t\t\tlblPassword.setPadding(new Insets(4, 0, 0, 0)); // set password label padding\r\n\t\t\tlblPassword.setAlignment(Pos.CENTER_LEFT); // set password label text alignment\r\n\r\n\t\t\t// password field:\r\n\t\t\tpwfLoginPassword = new PasswordField(); // create password text field\r\n\t\t\tpwfLoginPassword.setPrefWidth(upperComponentWidth); // set password text field width\r\n\r\n\t\t\t// login button:\r\n\t\t\tbtnLogin = new Button(\"Log In\"); // create login button\r\n\t\t\tbtnLogin.setPrefWidth(upperComponentWidth); // set login button width\r\n\t\t\tbtnLogin.setBackground(\r\n\t\t\t\t\tnew Background(new BackgroundFill(Color.ALICEBLUE, new CornerRadii(0), new Insets(0)))); // set login button colour ALICEBLUE\r\n\t\t\tbtnLogin.setOnMouseEntered( e-> buttonMouseEnter(btnLogin)); // set login button facebook blue with mouse hover\r\n\t\t\tbtnLogin.setOnMouseExited( e-> buttonMouseExit(btnLogin)); // set login button white with mouse hover\r\n\t\t\tbtnLogin.setOnAction( e-> loginButtonClick()); // call loginButtonClick() when login button clicked\r\n\r\n\t\t\t// top hbox pane\r\n\t\t\thbTop = new HBox(); // create top hbox pane\r\n\t\t\thbTop.setBorder(new Border(new BorderStroke(Color.BLACK, \r\n\t\t BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT))); // create border around top vbox pane\r\n\t\t\thbTop.getChildren().addAll(lblEmail, txfLoginEmail, lblPassword, pwfLoginPassword, btnLogin); // add components to top hbox\r\n\t\t\troot.getChildren().add(hbTop); // add top hbox to root vbox pane\r\n\r\n\t\t\t/* bottom hbox pane components ---------------------------------------------------------------------------------------- */\t\t\t\t\t\r\n\t\t\t// sign up vbox\r\n\t\t\tvbSignUp = new VBox(1);\r\n\t\t\tvbSignUp.setPrefWidth(126); // set signup vbox width 126\r\n\t\t\t\r\n\t\t\t// facebook image\r\n\t\t\tiv = new ImageView(getClass().getResource(\"facebook.png\").toExternalForm());\r\n\t\t\tfbImage = new Label(\"\", iv);\r\n\t\t\tfbImage.setPadding(new Insets(10, 42, 10, 42));\r\n\r\n\t\t\t// signup label\r\n\t\t\tlblSignUp = new Label(\"Sign Up\"); // create signup label\r\n\t\t\tlblSignUp.setPrefWidth(126); // set label width 126\r\n\t\t\tlblSignUp.setFont(Font.font(\"SanSerif\", FontWeight.BOLD, 18) ); // set signup label font properties\r\n\t\t\tlblSignUp.setBorder(new Border(new BorderStroke(Color.BLACK, \r\n\t\t BorderStrokeStyle.SOLID, CornerRadii.EMPTY, BorderWidths.DEFAULT))); // create border around signup label\r\n\t\t\tvbSignUp.getChildren().add(lblSignUp); // add signup label to signup vbox pane\r\n\r\n\t\t\t// first name textfield\r\n\t\t\ttxfFName = new TextField(); // create first name textfield\r\n\t\t\ttxfFName.setPromptText(\"Enter First Name\");\r\n\t\t\tvbSignUp.getChildren().add(txfFName); // add first name textfield to signup vbox pane\r\n\t\t\t\r\n\t\t\t// surname textfield\r\n\t\t\ttxfSName = new TextField(); // create surname textfield\r\n\t\t\ttxfSName.setPromptText(\"Enter Surname\");\r\n\t\t\tvbSignUp.getChildren().add(txfSName); // add surname textfield to signup vbox pane\r\n\r\n\t\t\t// email textfield\r\n\t\t\ttxfEmail = new TextField(); // create email textfield\r\n\t\t\ttxfEmail.setPromptText(\"Enter Email Address\");\r\n\t\t\tvbSignUp.getChildren().add(txfEmail); // add email textfield to signup vbox pane\r\n\r\n\t\t\t// surname textfield\r\n\t\t\ttxfPassword = new TextField(); // create password textfield\r\n\t\t\ttxfPassword.setPromptText(\"Enter Password\");\r\n\t\t\tvbSignUp.getChildren().add(txfPassword); // add password textfield to signup vbox pane\r\n\t\t\t\r\n\t\t\t// signup button\r\n\t\t\tbtnSignUp = new Button(\"Sign Up\"); // create signup button\r\n\t\t\tbtnSignUp.setPrefWidth(Double.MAX_VALUE);\r\n\t\t\tbtnSignUp.setFont(Font.font(\"SanSerif\", FontWeight.BOLD, 18) ); // set signup label font properties\r\n\t\t\tbtnSignUp.setBackground(\r\n\t\t\t\t\tnew Background(new BackgroundFill(Color.ALICEBLUE, new CornerRadii(0), new Insets(0))));\r\n\t\t\tbtnSignUp.setOnMouseEntered( e-> buttonMouseEnter(btnSignUp)); // set signup button facebook blue with mouse hover\r\n\t\t\tbtnSignUp.setOnMouseExited( e-> buttonMouseExit(btnSignUp)); // set signup button white with mouse hover\r\n\t\t\tbtnSignUp.setOnAction( e-> signUpButtonClick()); // call signUpButtonClick() when signup button clicked\r\n\t\t\tvbSignUp.getChildren().add(btnSignUp); // add signup button to signup vbox pane\r\n\r\n\t\t\t// bottom hbox pane\r\n\t\t\thbBottom = new HBox(); // create bottom hbox pane\r\n\t\t\thbBottom.getChildren().addAll(fbImage, vbSignUp);//, txfLoginEmail, lblPassword, pwfLoginPassword, btnLogin); // add components to top hbox\r\n\t\t\troot.getChildren().add(hbBottom); // add top hbox to root vbox pane\r\n\r\n//\t\t\tprimaryStage.setResizable(false);\r\n\t\t\tprimaryStage.getIcons().add(new Image(this.getClass().getResource(\"fb-icon.png\").toString()));\r\n\t\t\tprimaryStage.setScene(scene);\r\n\t\t\tprimaryStage.setTitle(\"FACEBOOK\");\r\n\t\t\tprimaryStage.show();\r\n\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) {\n\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/view/History.fxml\"));\n\t\t\tScene window = new Scene(root);\n\t\t\tprimaryStage.setScene(window);\n\t\t\tprimaryStage.show();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@FXML\r\n\tpublic void login(ActionEvent event) throws IOException{\r\n\t\tConnection con = null;\r\n\r\n\t\tString dbPassword = \"user\";\r\n\t\tString dbUsername = \"user\";\r\n\t\ttry{\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tcon= DriverManager.getConnection(\"jdbc:mysql://localhost/new_schema\", dbUsername, dbPassword);\r\n\t\t\tif (username.getText().matches(dbUsername)&& password.getText().matches(dbPassword)){\r\n\t\t\t\tif(event.getSource()== login){\r\n\t\t\t\t\tFXMLLoader loader = new FXMLLoader(Main.class.getResource(\"Application.fxml\"));\r\n\t\t\t\t\troot = (Parent) loader.load();\r\n\r\n\t\t\t\t\tMain.setLoggedIn();\r\n\t\t\t\t\tScene scene = new Scene(root);\r\n\t\t\t\t\tStage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();\r\n\t\t\t\t\tstage.setScene(scene);\r\n\t\t\t\t\tstage.setTitle(\"Member Registry Editing Mode\");\r\n\t\t\t\t\tstage.show();\r\n\t\t\t\t} \r\n\t\t\t}\r\n\r\n\t\t\telse{\r\n\t\t\t\tSystem.out.println(\"Incorrect login information\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(ClassNotFoundException cnfe)\r\n\t\t{\r\n\t\t\tcnfe.printStackTrace(System.err);\r\n\t\t}\r\n\r\n\t\tcatch(SQLException sql)\r\n\t\t{\r\n\t\t\tsql.printStackTrace(System.err);\r\n\t\t}\r\n\r\n\t\tfinally{\r\n\t\t\ttry{\r\n\t\t\t\tcon.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void createFXScene() {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"toolBarFXML.fxml\"));\n Scene scene = new Scene(root, Color.LIGHTGREY);\n fxPanel.setScene(scene);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n }\n\n }",
"@FXML\n public void OALogout(ActionEvent event) throws IOException {\n stage = (Stage)((Button)event.getSource()).getScene().getWindow();\n scene = FXMLLoader.load(getClass().getResource(\"/View/Login.fxml\"));\n stage.setScene(new Scene(scene));\n stage.show();\n\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"Application.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n\t\t\tImage icon = new Image(getClass().getResourceAsStream(\"/resources/icon.png\"));\n\t\t\tprimaryStage.getIcons().add(icon);\n\t\t\t\n\t\t\tprimaryStage.setTitle(\"Billing Manager\");\n\t\t\tprimaryStage.setMaximized(true);\n\t\t\t//primaryStage.setFullScreen(true);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\t\t\n\t}",
"public void gotoCreateUser(){\n try {\n FXMLCreateUserController verCreateUser = (FXMLCreateUserController) replaceSceneContent(\"FXMLCreateUser.fxml\");\n verCreateUser.setApp(this);\n } catch (Exception ex) {\n Logger.getLogger(IndieAirwaysClient.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"@Override\n public void start(Stage primaryStage) throws IOException {\n this.loginStage=primaryStage;\n initializeLoginStage();\n this.loginStage.show();\n }"
] | [
"0.87961483",
"0.87890565",
"0.84725803",
"0.843746",
"0.82381064",
"0.82006294",
"0.8168273",
"0.8063182",
"0.8060782",
"0.80395764",
"0.7997354",
"0.79878575",
"0.7968248",
"0.79588217",
"0.79420626",
"0.7924459",
"0.7905686",
"0.7862004",
"0.7825411",
"0.78232193",
"0.77755344",
"0.7756106",
"0.7715758",
"0.7685093",
"0.7663549",
"0.76472914",
"0.76377785",
"0.76245165",
"0.76132184",
"0.7611884",
"0.7597538",
"0.75827473",
"0.75668967",
"0.75634503",
"0.75322133",
"0.7531699",
"0.7524496",
"0.752284",
"0.75174314",
"0.7496405",
"0.7486126",
"0.7483263",
"0.74829835",
"0.7476389",
"0.7468085",
"0.74679226",
"0.7464272",
"0.74640036",
"0.74620026",
"0.74427366",
"0.74369854",
"0.74311924",
"0.7430047",
"0.7419116",
"0.74132264",
"0.74040943",
"0.73977476",
"0.73887295",
"0.7375521",
"0.7359378",
"0.73349464",
"0.73328024",
"0.7328538",
"0.73220515",
"0.7321189",
"0.73138756",
"0.7299009",
"0.7298813",
"0.72965336",
"0.7290388",
"0.72826684",
"0.7279711",
"0.72646147",
"0.7264269",
"0.7260306",
"0.72570693",
"0.72552997",
"0.7252461",
"0.7249234",
"0.7244372",
"0.7242484",
"0.723512",
"0.72271717",
"0.7220563",
"0.7215451",
"0.7214119",
"0.720978",
"0.7207252",
"0.720512",
"0.71932703",
"0.7192301",
"0.71889114",
"0.7186699",
"0.718217",
"0.7173685",
"0.71626186",
"0.71571237",
"0.7151273",
"0.7148088",
"0.71470606"
] | 0.7534464 | 34 |
path => D:\a\b => 2 path => D:\a\b\hello.java => 3 window : \ Linux : / | private static int getFileDepth(String path) {
int depth = 0;
for (char c : path.toCharArray()) {
if (c == File.separatorChar) {
depth += 1;
}
}
return depth;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getEclipsePathFromWindowsPath(String path) {\n StringBuilder sbPath = new StringBuilder();\n char [] chars = path.toCharArray();\n for (int i = 0; i < chars.length; i++) {\n char c = chars[i];\n if (c == '\\\\') {\n sbPath.append('/');\n } else {\n sbPath.append(c);\n }\n }\n path = sbPath.toString();\n return path;\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}",
"@Test\n public void testPathParsing_withAlternateSeparator() {\n PathService windowsPathService = PathServiceTest.fakeWindowsPathService();\n assertEquals(\n windowsPathService.parsePath(\"foo\\\\bar\\\\baz\"), windowsPathService.parsePath(\"foo/bar/baz\"));\n assertEquals(\n windowsPathService.parsePath(\"C:\\\\foo\\\\bar\"), windowsPathService.parsePath(\"C:\\\\foo/bar\"));\n assertEquals(\n windowsPathService.parsePath(\"c:\\\\foo\\\\bar\\\\baz\"),\n windowsPathService.parsePath(\"c:\", \"foo/\", \"bar/baz\"));\n }",
"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}",
"static void ex4() {\n\t\tSystem.out.println(\"subPath\");\n\t\t/*\n\t\t * this is a path within a path\n\t\t */\n\t\tString parent=\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\";\n\t\tString child=\"src/com/android/Examples.java\";\n\t\tPath fullPath=Paths.get(parent,child);\n\t\tSystem.out.println(fullPath);\n\t\tSystem.out.println(\"is this an absolute path \"+fullPath.isAbsolute());\n\t\t/*C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\n\t\t\\src\\com\\android\\Examples.java\n\t\t*/\n\t\t//this path has 10 elements, 9 folders and one file\n\t\t//the elements use array numbering, so these elements go from 0 to 9\n\t\tSystem.out.println(\"there are \"+fullPath.getNameCount()+\" elements in the path\");\n\t\t/*\n\t\t * subpath returns any relative subpath within the abseloute path\n\t\t * there are 10 elements in this path\n\t\t * so this path goes from index postion 0, up to index positiion 5, but DOES NOT include\n\t\t * index position 5, operates exact same way as the subString() method of the String\n\t\t * this creates the relative path\n\t\t * Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\n\t\t * subpath returns a relative path\n\t\t */\n\t\tSystem.out.println(\"subpath from 0 to 5 but not including 5 \"+fullPath.subpath(0, 5));\n\t\t/*\n\t\t * this starts at index position 3, which is the folder \"JavaProgrammer2019-20\"\n\t\t * and up to index position 7, but not including position 7, which will be the folder \"src\"\n\t\t */\n\t\tPath relPath=fullPath.subpath(3, 7);\n\t\t//prints off\n\t\t/*\n\t\t * JavaProgrammer2019-20\\->index postion 3\n\t\t * WorkSpace2\\ -> index position 4\n\t\t * F9.2InteractingWithPathAndFiles -> index position 5\n\t\t * \\src -> index position 6\n\t\t * index position 7 is NOT included\n\t\t */\n\t\tSystem.out.println(relPath);\n\t\tSystem.out.println(relPath.isAbsolute());//false as it's a relative path\n\t\t/*\n\t\t * this will print\n\t\t * C:\\Users\\noelf\\OneDrive\\JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\\n\t\t * JavaProgrammer2019-20\\WorkSpace2\\F9.2InteractingWithPathAndFiles\\src\n\t\t */\n\t\tSystem.out.println(relPath.toAbsolutePath());\n\t\ttry {\n\t\t\t/*\n\t\t\t * if you attempt to access an element in a path by subpath that does not exist\n\t\t\t * you will get an IllegalArguementException\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 0 to 10 \"+fullPath.subpath(0, 10));//this wil compile, no exception\n\t\t\t//this will give us an illegalArugmenmt exception as this is out of bounds as only\n\t\t\t//10 elements in our path, so only goes UP TO 10, but numbering is 0 t0 9\n\t\t//\tSystem.out.println(\"subpath from 0 to 11 \"+fullPath.subpath(0, 11));\n\t\t\t/*\n\t\t\t * can't have an empty path or subpath, this is a empty path, so this will throw an\n\t\t\t * IllegalArguement exception as well\n\t\t\t */\n\t\t\tSystem.out.println(\"subpath from 2 to 2 \"+fullPath.subpath(2, 2));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"exception is \"+e);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"static String localPath(String name) {\n\t\tchar c = File.separatorChar;\n\t\treturn name.replace((char) (c ^ '/' ^ '\\\\'), c);\n\t}",
"private static void process() {\n try {\n \tpath = path.replaceAll(\"\\\\\\\\\",\"\\\\\\\\\\\\\\\\\");\n Process process = Runtime.getRuntime().exec(\"cmd /c start \"+\"\\\"\"+\"\\\" \\\"\"+ path+\"\\\"\");\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"void path(String path);",
"void path(String path);",
"public String path(String path1, String path2);",
"public static String convertToWindowsPath(String path) {\n\t\treturn \"E:\" + path;\n\t}",
"public void testPathWithSpace () throws Throwable {\n final Path base = selected.resolve(getName());\n try {\n Files.createDirectory(base);\n\n final Path file1 = base.resolve(\" file1\");\n Files.createFile(file1);\n assertTrue(Files.isRegularFile(file1));\n\n final Path file2 = base.resolve(\"file2 \");\n Files.createFile(file2);\n assertTrue(Files.isRegularFile(file2));\n\n final Path file3 = base.resolve(\" file3 \");\n Files.createFile(file3);\n assertTrue(Files.isRegularFile(file3));\n }\n finally {\n Files.walkFileTree(base, Utils.DELETE_FILE_VISITOR);\n }\n }",
"public static void main(String[] args) {\n\t\tPath path = Paths.get(\"F:\\\\AccentureMayBatch\\\\JSTLProject\");\r\n\r\n\t\r\n\r\n\t\tSystem.out.format(\"toString: %s%n\", path.toString());\r\n\t\tSystem.out.format(\"getFileName: %s%n\", path.getFileName());\r\n\t\tSystem.out.format(\"getName(0): %s%n\", path.getName(0));\r\n\t\tSystem.out.format(\"getNameCount: %d%n\", path.getNameCount());\r\n\t\tSystem.out.format(\"subpath(0,2): %s%n\", path.subpath(0,2));\r\n\t\tSystem.out.format(\"getParent: %s%n\", path.getParent());\r\n\t\tSystem.out.format(\"getRoot: %s%n\", path.getRoot());\r\n\t\t\r\n\t\ttry {\r\n\t\t\tFiles.list(new File(\".\").toPath())\r\n\t\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tFiles.walk(new File(\".\").toPath())\r\n\t\t .filter(p -> !p.getFileName()\r\n\t\t .toString().startsWith(\".\"))\r\n\t\t .forEach(System.out::println);\r\n\t\t\t\r\n\t\t\tFiles.lines(new File(\"./src/com/polaris/utility/PathDemo.java\").toPath())\r\n\t\t .map(s -> s.trim())\r\n\t\t .filter(s -> !s.isEmpty())\r\n\t\t .forEach(System.out::println);\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//finding path and sub path into string\r\n\t\t Path start = Paths.get(\".\");\r\n\t\t int maxDepth = 5;\r\n\t\t try (Stream<Path> stream = Files.find(start, maxDepth, (path2, attr) -> String.valueOf(path2).endsWith(\".java\"))) \r\n\t\t {\r\n\t\t String joined = stream\r\n\t\t .sorted()\r\n\t\t .map(String::valueOf)\r\n\t\t .collect(Collectors.joining(\"; \"));\r\n\t\t System.out.println(\"Found: \" + joined);\r\n\t\t } catch (IOException e1) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te1.printStackTrace();\r\n\t\t\t}\r\n\t\t \r\n\t\t\r\n\t\tPath source = Paths.get(\"./src/com/polaris/utility/PathDemo.java\");\r\n\t\tPath target = Paths.get(\"F:/yatrabakup\");\r\n\t\t\r\n/*\r\n\t\ttry {\r\n\t\t // Files.copy(source, target);\r\n\t\t} catch(FileAlreadyExistsException fae) {\r\n\t\t fae.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t // something else went wrong\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\t*/\r\n\t\ttry (BufferedReader reader = Files.newBufferedReader(Paths.get(\"f:\\\\yatrabakup\\\\EmployeeData.csv\"))) {\r\n\t\t reader.lines().map(String::toLowerCase).forEach(System.out::println);\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}",
"static void ex1() {\n\t\tSystem.out.println(\"various methods of NIO.2\");\n\t\tPath path=Paths.get(\"C:/JavaCode/Main.java\");//this file actually exists and this is an abseloute path\n\t\tSystem.out.println(\"the path is \"+path);\n\t\tSystem.out.println(\"getNameCount\");\n\t\t/*\n\t\t * this will get the amount of elements in the path, it does not include the drive letter (more commonly \n\t\t * called ROOT)\n\t\t * or if it's ftp or http, does not include that either\n\t\t */\n\t\tSystem.out.println(\"amount of items in this path is \"+path.getNameCount());\n\t\tPath path2=Paths.get(\"text.txt\");\n\t\tSystem.out.println(path2.toUri());\n\t\tPath path3=Paths.\n\t\t\t\tget(\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles/text.txt\");\n\t\t/*\n\t\t * this will print off 7 as there is 7 elements in this path (excluding the drive letter)\n\t\t */\n\t\tSystem.out.println(path3.getNameCount());\n\t\tSystem.out.println(\"getting details of our path\");\n\t\tfor(int i=0;i<path3.getNameCount();i++) {\n\t\t\t/*\n\t\t\t * this will get the name of all the elements in the path, including the final elemetn which will\n\t\t\t * be text.txt\n\t\t\t */\n\t\t\tSystem.out.println(\"element name is \"+path3.getName(i));\n\t//\t\tSystem.out.println(path3.getFileName());\n\t\t}\n\t\t//this will get the final element, which is the produce of the whole path, which is \"text.txt\"\n\t\tSystem.out.println(\"the file at this location is \"+path3.getFileName());\n\t\t//this will get the final element, which will be F9.2InteractingWithPathAndFiles\n\t\tPath path4=Paths.\n\t\t\t\tget(\"C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\");\n\t\tSystem.out.println(path4.getFileName());\n\t\t/*\n\t\t * if you have a realtive path, the folders leading up to your relative path, namely in this case\n\t\t * C:/Users/noelf/OneDrive/JavaProgrammer2019-20/WorkSpace2/F9.2InteractingWithPathAndFiles\n\t\t * is not counted at all\n\t\t * so this below here only returns 4\n\t\t */\n\t\tPath relPath=Paths.get(\"src/com/android/Examples.java\");//4\n\t\tSystem.out.println(\"the relative path has \"+relPath.getNameCount()+\" elements\");//return 4\n\t\t//this will return 1 as the elements preceded this, the relative path folder, are NOT counted\n\t\trelPath=Paths.get(\"text.txt\");\n\t\tSystem.out.println(relPath.getNameCount());//return 1\n\t\t\n\t\tPath root=Paths.get(\"C:/\");//will return 0, because the root element (the drive) is not counted\n\t\tSystem.out.println(root.getNameCount());\n\t\t//does not matter that this does NOT exist, its just checking the string\n\t\troot=Paths.get(\"D:/\");//0\n\t\tSystem.out.println(root.getNameCount());\n\t\t//does not matter that this does NOT exist, it's just checking the string\n\t\troot=Paths.get(\"D:/Home/Web/myWebsite/index.html\");\n\t\tSystem.out.println(root.getNameCount());//4\n\n\t}",
"String displayableFileName(String path) {\n String result = \"\";\n StringTokenizer tok = new StringTokenizer(path, \"\\\\/\");\n while (tok.hasMoreTokens()) {\n result = tok.nextToken();\n }\n return result;\n }",
"public static void main(String[] args) {\n\t\tPath iP = Paths.get(\"/\", \"First.txt\");\t// C\n\t\t//Path iP = Paths.toPath(\"/First.txt\");\t// D\n\t\tSystem.out.println(iP) ;\n\t}",
"public static void main(String[] args) { String dirname = \"/home/diego/IdeaProjects/JAVAStuff/src/tmp/dirTest.txt\";\n// File d = new File(dirname);\n// d.mkdirs();\n//\n File file = null;\n String[] paths;\n\n try {\n file = new File(\"/home/diego/IdeaProjects/JAVAStuff/src\");\n paths = file.list();\n\n for(String s: paths) {\n System.out.println(s);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"public static String normalizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '\\\\'))\r\n {\r\n // Convert the Windows style path separator to the standard path separator\r\n result.append('/');\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tString str =\"D:\\\\jboss-4.2.2.GA\\\\server\\\\default\\\\deploy\\\\shen3spnet.war\\\\aa\\\\bb\";\r\n\t\tint i = str.indexOf(\"shen3spnet\");\r\n\t\tint j = str.substring(i).indexOf(\"\\\\\")+1;\r\n\t\tSystem.out.println(str.substring(i).substring(j));\r\n\t\t\r\n\t}",
"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}",
"static String escapePathName(String path) {\n if (path == null || path.length() == 0) {\n throw new RuntimeException(\"Path should not be null or empty: \" + path);\n }\n\n StringBuilder sb = null;\n for (int i = 0; i < path.length(); i++) {\n char c = path.charAt(i);\n if (needsEscaping(c)) {\n if (sb == null) {\n sb = new StringBuilder(path.length() + 2);\n for (int j = 0; j < i; j++) {\n sb.append(path.charAt(j));\n }\n }\n escapeChar(c, sb);\n } else if (sb != null) {\n sb.append(c);\n }\n }\n if (sb == null) {\n return path;\n }\n return sb.toString();\n }",
"public static void main(String[] args) throws IOException {\n\t\tPath testFilePath = Paths.get(\"/home/ilmir/Dropbox/Aliya_Ilmir/2дебила\");\n\t\tSystem.out.println(\"Path: \"+testFilePath);\n\t\tline();\n\n\t\t// retrieve basic information about path\n\t\tSystem.out.println(\"Printing file information: \");\n\t\tSystem.out.println(\"\\t getFileName(): \\t\" + testFilePath.getFileName());\n\t\tSystem.out.println(\"\\t getRoot(): \\t\\t\" + testFilePath.getRoot());\n\t\tSystem.out.println(\"\\t getParent(): \\t\\t\" + testFilePath.getParent());\n\t\tline();\n\n\t\t// print path elements\n\t\tSystem.out.println(\"Printing elements of the path: \");\n\t\tfor(Path element : testFilePath) {\n\t\t\tSystem.out.println(\"\\t path element: \" + element);\n\t\t}\n\t\tline();\n\n\t\t//get a path object with relative path\n\t\tPath path = Paths.get(\"./src\");\n\t\tSystem.out.println(\"Path: \"+path);\n\t\tSystem.out.println(\"1) getFileName(): \" + path.getFileName());\n\t\tSystem.out.println(\"2) toUri(): \" + path.toUri());\n\t\tSystem.out.println(\"3) toAbsolutePath(): \" + path.toAbsolutePath());\n\t\tSystem.out.println(\"4) normalize(): \" + path.normalize());\n\n\t\t// get another path object with normalized relative path\n\t\tPath testPathNormalized = Paths.get(path.normalize().toString());\n\t\tSystem.out.println(\"Path normalized: \"+testPathNormalized);\n\t\tSystem.out.println(\"5) normalized absolute path is: \" +\n\t\t\t\ttestPathNormalized.toAbsolutePath());\n\t\tSystem.out.println(\"6) normalized real path is: \" +\n\t\t\t\tpath.toRealPath (LinkOption.NOFOLLOW_LINKS));\n\n\t\tline();\n\n\t\tPath dir = Paths.get(\"/home/ilmir/Dropbox/Aliya_Ilmir\");\n\t\tPath resolvedPath = dir.resolve(\"2дебила\");\n\t\tSystem.out.println(\"Resolved path: \"+resolvedPath);\n\t}",
"public static String getPath(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator))//Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return file_path;\n else\n {\n \t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t return ((new File(file_path)).getParent()).replaceAll(\"/\",\"\\\\\\\\\");\n\t }\n\t //Bug Id 81741, End\n\t else\n return (new File(file_path)).getParent();\n }\n }",
"private String normalizePath(String path)\n {\n return path.replaceAll(\"\\\\\\\\{1,}\", \"/\");\n }",
"public static String NAME(String path) {\n String separator = System.getProperty(\"file.separator\");\n StringTokenizer str = new StringTokenizer(path, separator);\n String file;\n int i = str.countTokens();\n while(--i > 0 )str.nextToken();\n return str.nextToken(\".\");\n }",
"private static int getDividingIndex(String fullPath) {\n int baseEnd = fullPath.lastIndexOf(\"/\");\n if (fullPath.substring(0, baseEnd).endsWith(COMMAND_PATH)) {\n baseEnd = fullPath.substring(0, baseEnd).lastIndexOf(\"/\");\n }\n return baseEnd;\n }",
"public List<String> paths(String path) throws SystemException;",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n System.out.println(\"please input the file path....\");\n String filePath = sc.next();\n\n // Second: list the file path, and iterator it's sub direction\n File file = new File(filePath);\n for(File f : file.listFiles()){\n // F:\\MyStudyFile\\IT-Books\\书籍仓库\\Java书籍类\n System.out.println(f.getPath());\n iteratorFilePath(f);\n }\n }",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public static void main(String[] args) {\n\n\t\tSystem.out.println(path(4,4));\n\t}",
"public static void main(String[] args) {\r\n\t\tSystem.out.println(NumberOfPath(3, 4));\r\n\r\n\t}",
"public static void main(String... args) {\nPath path = Paths.get(\".\");\ntry {\n out.println(path.normalize());\n} catch(IOException e){out.println(e);}\n\ntry {\n out.println(path.toRealPath());\n} catch(IOException e){out.println(e);}\n\n}",
"private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }",
"public String[] separatePathName(String path) {\r\n // check if this is the path to the root\r\n if (path.equals(\"/\")) {\r\n return new String[]{\"/\", \"\"};\r\n }\r\n String name, parentPath;\r\n int lastSlash = path.lastIndexOf('/');\r\n if (lastSlash == path.length() - 1) {\r\n lastSlash = path.lastIndexOf('/', lastSlash - 1);\r\n }\r\n if (lastSlash == -1) {\r\n // path is relative\r\n name = path;\r\n parentPath = workingDirectory.getData();\r\n } else if (path.charAt(0) == '/') {\r\n // path is absolute\r\n name = path.substring(lastSlash + 1);\r\n parentPath = path.substring(0, lastSlash + 1);\r\n } else {\r\n name = path.substring(lastSlash + 1);\r\n parentPath =\r\n workingDirectory.getData() + path.substring(0, lastSlash + 1);\r\n }\r\n return new String[]{name, parentPath};\r\n }",
"@Test\n\tpublic void test_ArgumentCount_2_InvalidPath() {\n\t\tString[] args = { \"\", \"\" };\n\t\tTypeFinder.main(args);\n\t\tString expected = TypeFinder.INVALID_PATH_ERROR_MESSAGE + FileManager.lineSeparator;\n\t\tString results = errContent.toString();\n\t\tassertEquals(expected, results);\n\t}",
"String getPathName();",
"String getPathName();",
"public static void main(String[] args) {\n\t\tSystem.out.println(findPath(0,5));\r\n\t}",
"public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n // Convert the URI separator to the system dependent path separator\r\n result.append(File.separatorChar);\r\n }\r\n else\r\n {\r\n result.append(nextChar);\r\n }\r\n }\r\n \r\n return result.toString();\r\n }",
"private String fixPath(String Path) {\n\n // Nothing to do if we're running the plugin on a Windows machine.\n if (Global.IsWindowsOS()) {\n return Path;\n }\n\n // Replace all of the Windows separator characters with linux separator characters.\n String NewPath = Path.replaceAll(\"\\\\\\\\\", File.separator);\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.fixPath: \" + Path + \"->\" + NewPath);\n \n return NewPath;\n }",
"private String sep(String path) {\n return path == null ? \"\" : \"/\" + path;\n }",
"public static String unixPath(String path) {\n String convert = path.replace(\"\\\\\", \"/\");\n return convert;\n }",
"public static String getFileName(String file_path)\n {\n String file_separator = System.getProperty(\"file.separator\"); //Bug Id 81741\n if (file_path == null)\n return null;\n else if (file_path.substring(file_path.length() - 1).equals(file_separator)) //Bug Id 81741, substitute file_separator to System.getProperty(\"file.separator\")\n return null;\n else\n {\n\t //Bug Id 81741, Start \n\t if (\"/\".equals(file_separator) && (file_path.indexOf(file_separator) == -1))\n\t {\n\t file_path = file_path.replaceAll(\"\\\\\\\\\", \"/\");\n\t }\n\t //Bug Id 81741, End\n\t return (new File(file_path)).getName();\n }\n \n }",
"private static String constructPath(String parent, String child) throws Exception {\r\n File file = new File(parent + \"\\\\\" + child);\r\n boolean tmpBool;\r\n if (File.Exists(file.FullName))\r\n tmpBool = true;\r\n else\r\n tmpBool = File.Exists(file.FullName); \r\n if (!tmpBool)\r\n {\r\n //UPGRADE_TODO: Method 'java.io.File.mkdirs' was converted to 'System.IO.Directory.CreateDirectory' which has a different behavior. \"ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javaioFilemkdirs'\"\r\n File.CreateDirectory(file.FullName);\r\n }\r\n else if (!File.Exists(file.FullName))\r\n return null;\r\n \r\n String result = file.toString();\r\n //UPGRADE_TODO: Method 'java.lang.System.getProperty' was converted to 'System.IO.Path.DirectorySeparatorChar.ToString' which has a different behavior. \"ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javalangSystemgetProperty_javalangString'\"\r\n String separator = String.valueOf(File.separatorChar);\r\n if (result.length() > 0 && !result.endsWith(separator))\r\n result += separator;\r\n \r\n return result;\r\n }",
"private static String createDir(String s) {\r\n \tint len = s.length() - 1;\r\n \tString tempBuff;\r\n \tString result;\r\n \tif (s.charAt(len) != '/') {\r\n \t\ttempBuff = String.format(\"%s/\", s);\r\n \t}\r\n \telse {\r\n \t\ttempBuff = s;\r\n \t}\r\n \tresult = tempBuff;\r\n \treturn result;\r\n }",
"@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 static String returnDiretorioPai(Path a){\n return a.getParent().toString();\n }",
"public void showDirPath(String[] list);",
"@Override\n protected String getFileSeparator() { return \"/\"; }",
"@SuppressWarnings(\"unused\")\n\tpublic static void main(String[] args) throws URISyntaxException {\n\t\tSystem.out.println(\"Creating \\\"Path\\\" instances:\");\n\t\tSystem.out.println(\" p1 = d:/Temp/E53Z/Archives/\");\n\t\tSystem.out.println(\" p2 = /tmp/foo\");\n\t\tSystem.out.println(\" p3 = file:///Users/joe/FileTest.java\");\n\t\tPath p1 = Paths.get(\"d:/Temp/E53Z/Archives/\");\n\t\tPath p2 = Paths.get(\"/tmp/foo\");\n\t\tPath p3 = Paths.get(URI.create(\"file:///Users/joe/FileTest.java\"));\n\n\t\t/* Retrieving Information about a Path */\n\t\tSystem.out.println(\"\\nRetrieving information about a Path\");\n\t\tSystem.out.format(\" p1.toString: %s%n\", p1.toString() );\n\t\tSystem.out.format(\" p1.getFileName: %s%n\", p1.getFileName() );\n\t\tSystem.out.format(\" p1.getName(0): %s%n\", p1.getName(0) );\n\t\tSystem.out.format(\" p1.getNameCount: %d%n\", p1.getNameCount());\n\t\tSystem.out.format(\" p1.subpath(0,2): %s%n\", p1.subpath(0,2) );\n\t\tSystem.out.format(\" p1.getParent: %s%n\", p1.getParent() );\n\t\tSystem.out.format(\" p1.getRoot: %s%n\", p1.getRoot() );\n\t\t\n\t\t/* Removing Redundancies From a Path */\n\t\tSystem.out.println(\"\\nRemoving redundancies From a Path\");\n\t\tPath p4 = Paths.get(\"/home/sally/../joe/foo\");\n\t\tSystem.out.println(\" Ful path: \" + p4);\n\t\tSystem.out.println(\" Normalized path: \" + p4.normalize());\n\n\t\t/* Converting a Path */\n\t\tSystem.out.println(\"\\nConverting a Path\");\n\t\tPath p5 = Paths.get(\"/Home/logFile/\");\n\t\tSystem.out.println(\" p5.toUri: \" + p5.toUri());\n\t\tSystem.out.println(\" p5.toAbsolutePath: \" + p5.toAbsolutePath());\n\t\ttry {\n\t\t\tSystem.out.println(\" p5.toRealPath: \" + p5.toRealPath(LinkOption.NOFOLLOW_LINKS));\n\t\t} catch (NoSuchFileException x) {\n\t\t System.out.format(\" Exception: p5 = %s: no such\" + \" file or directory%n\", p5);\n\t\t // Logic for case when file doesn't exist.\n\t\t} catch (IOException x) {\n\t\t System.out.format(\" Exception: %s%n\", x);\n\t\t // Logic for other sort of file error.\n\t\t}\n\t\t\n\t\t/* Joining two paths */\n\t\tSystem.out.println(\"\\nJoining two paths\");\n\t\tPath p6 = Paths.get(\"/Home/logFile/\");\n\t\tPath p7 = Paths.get(\"log.txt\");\n\t\tSystem.out.println(\" p6 = \" + p6);\n\t\tSystem.out.println(\" p7 = \" + p7);\n\t\tSystem.out.println(\" p6.resolve(p7) = \" + p6.resolve(p7));\n\t\t\n\t\t/* Creating a path between two paths */\n\t\tSystem.out.println(\"\\nCreating a path between two paths\");\n\t\tPath p8 = Paths.get(\"D:/Home/logFileS/\");\n\t\tPath p9 = Paths.get(\"D:/Home/TextFiles/\");\n\t\tSystem.out.println(\" p8 = \" + p8);\n\t\tSystem.out.println(\" p9 = \" + p9);\n\t\tSystem.out.println(\" p8.relativize(p9) = \" + p8.relativize(p9));\n\t\tSystem.out.println(\" !!! Paths.get(\\\"\\\").toAbsolutePath().toString(); = \" + Paths.get(\"\").toAbsolutePath().toString());\n\t\tSystem.out.println(\" !!! p8.relativize(p9).toAbsolutePath() = \" + p8.relativize(p9).toAbsolutePath());\n\t\t\n\t\t/* Comparing Two Paths */\n\t\tSystem.out.println(\"\\nComparing two paths\");\n\t\tPath p10 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p11 = Paths.get(\"D:/Home\");\n\t\tPath p12 = Paths.get(\"logFiles\");\n\t\tPath p13 = Paths.get(\"D:/Home/logFiles\");\n\t\tPath p14 = Paths.get(\"D:/Home/TextFiles/../logFiles\");\n\t\tSystem.out.println(\" p10 = \" + p10);\n\t\tSystem.out.println(\" p11 = \" + p11);\n\t\tSystem.out.println(\" p12 = \" + p12);\n\t\tSystem.out.println(\" p13 = \" + p13);\n\t\tSystem.out.println(\" p14 = \" + p14);\n\t\tSystem.out.println(\" p10.equils(p13) = \" + p10.equals(p13));\n\t\tSystem.out.println(\" p10.startsWith(p11) = \" + p10.startsWith(p11));\n\t\tSystem.out.println(\" p10.endsWith(p12) = \" + p10.endsWith(p12));\n\t\tSystem.out.println(\" p10.equils(p14) = \" + p10.equals(p14));\n\t\ttry {\n\t\t\tSystem.out.println(\" Files.isSameFile(p10, p14) = \" + Files.isSameFile(p10, p14)); // It is true if both files(folders) exist.\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/* Iterating over Path \"p10\") */\n\t\tSystem.out.print(\"\\nIterating over Path \\\"p10\\\"\\n \");\n\t\tfor(Path name: p10){\n\t\t\tSystem.out.print(\"[\" + name + \"]\");\n\t\t}\n\t\t\n\t\t\n\t}",
"public void compDire(String pathDire) throws Exception;",
"public void testFilenameCharacters () throws Throwable {\n assertEquals(\"/a%23b\", Uri.fromFile(new File(\"/a#b\")).getEncodedPath());\n\n //final AndroidFileSystem fs = (AndroidFileSystem)FileSystems.getDefault();\n Log.i(TAG, \"tree uri: \"+fs.getTreeDocumentUri(selected.resolve(\"a#b\")));\n\n final Path base = selected.resolve(getName());\n try {\n Files.createDirectory(base);\n assertTrue(Files.isDirectory(base));\n\n final Path a = Files.createFile(base.resolve(\"a.b\"));\n assertTrue(a.toString(), Files.isRegularFile(a));\n\n final Path b = Files.createFile(base.resolve(\"a#b\"));\n assertTrue(b.toString(), Files.isRegularFile(b));\n\n final Path c = Files.createFile(base.resolve(\"a%b\"));\n assertTrue(c.toString(), Files.isRegularFile(c));\n\n try (final DirectoryStream<Path> ds = Files.newDirectoryStream(base)) {\n final Set<Path> actual = new HashSet<>();\n for (final Path path : ds)\n assertTrue(\"duplicate: \"+path, actual.add(path));\n final Set<Path> expected = new HashSet<>(Arrays.asList(a, b, c));\n assertEquals(\"\", expected, actual);\n }\n }\n finally {\n Files.walkFileTree(base, Utils.DELETE_FILE_VISITOR);\n }\n }",
"public static String convertToLinuxPath(String path) {\n\t\t// just remove E: drive letter from path\n\t\treturn path.replaceFirst(\"E:\", \"\");\n\t}",
"private String toCompletePath(String fullRequest) {\n \n///Parse request for file path\nString requestLine[] = new String[] {\" \", \" \", \" \"};\n requestLine = fullRequest.split(\" \");\nString partialPath = requestLine[1];\n \n//If requested path is just \"/\" or \"\", don't return any path\n if(partialPath.length() <= 1) {\n noFileRequested = true;\n return null;\n }\n \nString completePath;\n//If using my Windows machine, the path is different than the school Linux machines\nif (Windows)\n completePath = \"C:/Users/Michelle/eclipse-workspace/P1\" + partialPath;\nelse\n completePath = \".\" + partialPath;\n \n return completePath;\n}",
"@DISPID(76)\r\n\t// = 0x4c. The runtime will prefer the VTID if present\r\n\t@VTID(74)\r\n\tjava.lang.String path();",
"public static void main(String[] args) {\n\t\tFile file=new File(\"d:\\\\新建文件夹 (3)\\\\12.txt\");\r\n\t\tPath path=Paths.get(\"d:\\\\新建文件夹 (3)\\\\146\\\\125\");\r\n\t\tFile file1=new File(\"d:\\\\新建文件夹 (3)\\\\asf\");\r\n\t\t\tSystem.out.println(path.getFileName());\r\n\t\t\tSystem.out.println(file.getName());\r\n\t\t\tSystem.out.println(path.getRoot());\r\n\t\t\tSystem.out.println(path.getParent());\r\n\t\t\ttry {\r\n\t\t\t\tFiles.createFile(Paths.get(\"d:\\\\新建文件夹 (3)\\\\147\\\\1111111.txt\"));\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\ttry {\r\n\t\t\t\tFiles.copy(file.toPath(),Paths.get(\"d:\\\\新建文件夹 (3)\\\\146\\\\189.txt\"));\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\r\n//\t\tSystem.out.println(file.exists());\r\n////\t\tfile.delete();\r\n//\t\tSystem.out.println(file.canRead());]\r\n//\t\tSystem.out.println(file.canWrite());\r\n//\t\tSystem.out.println(file.getPath());\r\n//\t\tSystem.out.println(file.getAbsolutePath());\r\n//\t\tSystem.out.println(file.getName());\r\n//\t\tfile.renameTo(file1);\r\n//\t\tSystem.out.println(file.length());\r\n\r\n\t}",
"String getFilepath();",
"public static void main(String[] args){\n System.out.println(\"Starting ...\");\n String path = \"dir\\n\\tsubdir1\\n\\t\\tfile1.ext\\n\\t\\tsubsubdir1\\n\\tsubdir2\\n\\t\\tsubsubdir2\\n\\t\\t\\tfile2.ext\";\n }",
"private String normalizePath(String path) {\n boolean absolute = path.startsWith(\"/\");\n int cwdl = cwd.length();\n \n // NOTE: This isn't just a fast path, it handles cases the code below doesn't\n if(!path.startsWith(\".\") && path.indexOf(\"./\") == -1 && path.indexOf(\"//\") == -1 && !path.endsWith(\".\"))\n return absolute ? path.substring(1) : cwdl == 0 ? path : path.length() == 0 ? cwd : cwd + \"/\" + path;\n \n char[] in = new char[path.length()+1];\n char[] out = new char[in.length + (absolute ? -1 : cwd.length())];\n path.getChars(0,path.length(),in,0);\n int inp=0, outp=0;\n \n if(absolute) {\n do { inp++; } while(in[inp] == '/');\n } else if(cwdl != 0) {\n cwd.getChars(0,cwdl,out,0);\n outp = cwdl;\n }\n\n while(in[inp] != 0) {\n if(inp != 0) {\n while(in[inp] != 0 && in[inp] != '/') { out[outp++] = in[inp++]; }\n if(in[inp] == '\\0') break;\n while(in[inp] == '/') inp++;\n }\n \n // Just read a /\n if(in[inp] == '\\0') break;\n if(in[inp] != '.') { out[outp++] = '/'; out[outp++] = in[inp++]; continue; }\n // Just read a /.\n if(in[inp+1] == '\\0' || in[inp+1] == '/') { inp++; continue; }\n if(in[inp+1] == '.' && (in[inp+2] == '\\0' || in[inp+2] == '/')) { // ..\n // Just read a /..{$,/}\n inp += 2;\n if(outp > 0) outp--;\n while(outp > 0 && out[outp] != '/') outp--;\n //System.err.println(\"After ..: \" + new String(out,0,outp));\n continue;\n }\n // Just read a /.[^.] or /..[^/$]\n inp++;\n out[outp++] = '/';\n out[outp++] = '.';\n }\n if(outp > 0 && out[outp-1] == '/') outp--;\n //System.err.println(\"normalize: \" + path + \" -> \" + new String(out,0,outp) + \" (cwd: \" + cwd + \")\");\n int outStart = out[0] == '/' ? 1 : 0;\n return new String(out,outStart,outp - outStart);\n }",
"public void process(String line){\n\t\tint i=0;\n\t\tint n=line.length();\n\t\tint count=0;\n\t\twhile(i<n){\n\t\t\t char c=line.charAt(i);\n\t\t\t if(c ==' ' ){\n\t\t\t\t count++;\n\t\t\t }else {\n\t\t\t\t break;\n\t\t\t }\n\t\t\t i++;\n\t\t}\n\t\tNode node=new Node(line,\"\",count);\n\t\tif(node.value.contains(\".\")){\n\t\tif(node.value.contains(\"jpeg\")){\n\t\t\tif(stk.isEmpty()){\n\t\t\t\tresult.add(\"/\"+node.value.trim());\n\t\t\t}else{\n\t\t\t\tNode peek=stk.peek();\n\t\t\t\tif(peek.spaceCount<node.spaceCount){\n\t\t\t\t\tresult.add(peek.path+\"/\"+node.value.trim());\n\t\t\t\t}else{\n\t\t\t\t\t//System.out.println(\"find path called for \"+node.value);\n\t\t\t\t\tresult.add(findPathFromStack(node));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t}else{\n\t\tinsertIntoStack(node);\n\t\t}\n\t\t//System.out.println(line +\" \"+count);\n\t}",
"public static void main(String[] args) {\n File file = new File(\".\", \"subdir\" + File.separator + \"hello.txt\");\r\n System.out.println(\"Does it exist? \" + file.exists());\r\n System.out.println(\"Can it be read? \" + file.canRead());\r\n System.out.println(\"Can it be written? \" + file.canWrite());\r\n System.out.println(\"Is it a directory? \" + file.isDirectory());\r\n System.out.println(\"Is it a file? \" + file.isFile());\r\n //Prints false\r\n System.out.println(\"Is it absolute? \" + file.isAbsolute());\r\n System.out.println(\"Is it hidden? \" + file.isHidden());\r\n\r\n //Shows redundant .'s in the path.\r\n System.out.println(\"What is its absolute path? \" +\r\n file.getAbsolutePath());\r\n\r\n //Like absolute path without redundant .'s.\r\n try {\r\n System.out.println(\"What is its canonical path? \" +\r\n file.getCanonicalPath());\r\n }\r\n catch (IOException ex) { }\r\n\r\n System.out.println(\"What is its name? \" + file.getName());\r\n //Prints the path as defined during instantiation of the File class.\r\n System.out.println(\"What is its path? \" + file.getPath());\r\n\r\n //lastModified() returns a long value representing the date and time\r\n // when the file was last modified. The value is in milliseconds\r\n // measured from 1/1/1970 to last modified date/time.\r\n System.out.println(\"When was it last modified? \" +\r\n new Date(file.lastModified()));\r\n\r\n // Character representation of the path-list separator that's used\r\n // when multiple file paths are given in said path-list.\r\n System.out.println(\"What is the path separator? \" +\r\n File.pathSeparatorChar);\r\n\r\n // Character representation of the separator used in a given\r\n // file path.\r\n System.out.println(\"What is the name separator? \" +\r\n File.separatorChar);\r\n }",
"@DISPID(35)\r\n\t// = 0x23. The runtime will prefer the VTID if present\r\n\t@VTID(40)\r\n\tjava.lang.String fullPath();",
"String getRealPath(String path);",
"public String simplifyPath(String path) {\n String resString=\"\";\n String[] steRes=path.split(\"/|\\\\.\");\n if (steRes.length==0)\n return \"/\";\n return '/'+steRes[steRes.length-1];\n }",
"public static void main(String[] args) {\n\t\tArgsProcessor ap = new ArgsProcessor(args);\n\t\tString file = ap.nextString(\"Paste in directory to convert slashes\");\n\t\tSystem.out.println(convertSlashes(file));\n\n\t}",
"public int getPathLength();",
"@Override\r\n public void dirToPath(String[] arr) {\n\r\n }",
"public String listPath(List<String> arg) {\n String output = \"\";\n for (int path = 0; path < arg.size(); path++) {\n Directory tDir = Directory.getDir(arg.get(path));\n if (tDir == null) {\n output +=\n \"Error: The input path \" + arg.get(path) + \" doesn't exist!\\n\\n\";\n } else if (tDir.isFile) {\n output += tDir.getName();\n } else {\n for (int j = 0; j < tDir.getSubContent().size(); j++) {\n if (!tDir.getSubContent().get(j).isFile) {\n output += tDir.getSubContent().get(j).getName();\n Directory dir = tDir.getSubContent().get(j);\n if (!dir.getSubContent().isEmpty()) {\n output += \" : \";\n for (int k = 0; k < tDir.getSubContent().get(j).getSubContent()\n .size(); k++) {\n if (k != tDir.getSubContent().get(j).getSubContent().size()\n - 1) {\n output += tDir.getSubContent().get(j).getSubContent().get(k)\n .getName() + \", \";\n } else {\n output += tDir.getSubContent().get(j).getSubContent().get(k)\n .getName() + \"\\n\";\n }\n }\n } else {\n output += \"\\n\";\n }\n } else {\n output += tDir.getSubContent().get(j).getName() + \"\\n\";\n }\n }\n }\n }\n return output;\n }",
"public void enter(String path);",
"public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }",
"@Test\n public void testInvalidSlashesRuleMatches() throws Exception {\n Assume.assumeFalse(SystemInfo.isWindows);\n\n File file = new File(\"at\\\\least/one\\\\of/these\\\\slashes/are\\\\wrong\");\n assertRuleFails(myFileOp, PathValidator.INVALID_SLASHES, file);\n }",
"public abstract List<String> path();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();",
"public String getPathName();",
"@Test\n public void testCreateFilePath() {\n System.out.println(\"createFilePath with realistic path\");\n String path = System.getProperty(\"user.dir\")+fSeparator+\"MyDiaryBook\"\n +fSeparator+\"Users\"+fSeparator+\"Panagiwtis Georgiadis\"+fSeparator+\"Entries\"\n +fSeparator+\"Test1\";\n FilesDao instance = new FilesDao();\n boolean expResult = true;\n boolean result = instance.createFilePath(path);\n assertEquals(\"Some message\",expResult, result);\n }",
"@Test\r\n\tpublic void testPatternCase1() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/\";\r\n\t\t// Sets the current working directory\r\n\t\tfs.setCurrent(fs.documents);\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"..\".split(\" \"), \"cd .. \", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}",
"int getSourcepathCount();",
"int getSourcepathCount();",
"public static String getPathSeparator() {\n return File.separator;\n }",
"public String normalizePathName( final String name );",
"public static String getPath(String fn) {\n\t\tif (fn == null) {\n\t\t\treturn null;\n\t\t}\n\t\tint i = fn.lastIndexOf(File.separator);\n\t\treturn (i > -1) ? fn.substring(0, i) : fn;\n\t}",
"public static String formatFilePath(String path) {\n return StringUtils.replace(path, \"\\\\\", StaticValue.FILE_SEPARATOR);\n }",
"public void setPathname(String s) {this.pathname = s;}",
"public static String filenamePart(String path) {\n char sep = System.getProperty(\"file.separator\", \"/\").charAt(0);\n int i = path.lastIndexOf(sep);\n return (i < 0)? path : path.substring(i+1);\n }",
"public int getNumOfPath(){\r\n\t\treturn numOfPath;\r\n\t}",
"public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }",
"public static void main(String[] args) {\n Path currentDir = Paths.get(\".\");\n System.out.println(currentDir.toAbsolutePath());\n Path parentDir = Paths.get(\"..\");\n System.out.println(parentDir.toAbsolutePath());\n Path currentDir2 = Paths.get(\"d:\\\\data\\\\projects\\\\.\\\\a-project\");\n System.out.println(currentDir2);\n String path = \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n Path parentDir2 = Paths.get(path);\n System.out.println(parentDir2);\n\n String originalPath =\n \"d:\\\\data\\\\projects\\\\a-project\\\\..\\\\another-project\";\n\n Path path1 = Paths.get(originalPath);\n System.out.println(\"path1 = \" + path1);\n\n Path path2 = path1.normalize();\n System.out.println(\"path2 = \" + path2);\n }",
"private static void plusProcessPath (final String psFileName) throws IOException {\r\n\t\tvar path = Paths.get (DIR.toString (), psFileName);\r\n\t\tvar lines = Files.readAllLines (path);\r\n\t\tif (lines.size () <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tlines.set (0, lines.get (0) + \" cwd exe cmdline\");\r\n\t\tfor (int i = 1 ; i < lines.size () ; i++) {\r\n\t\t\tvar s = new Scanner (lines.get (i));\r\n\t\t\ts.next (); // USER\r\n\t\t\tvar pid = s.next ();\r\n\t\t\tvar proc = Paths.get (\"/proc/\", pid);\r\n\t\t\tString cwd = \"\", exe = \"\", cmdline = \"\";\r\n\t\t\ttry { cwd = proc.resolve (\"cwd\").toRealPath ().toString (); }\r\n\t\t\tcatch (NoSuchFileException e) { /* ignore */ }\r\n\t\t\ttry { exe = proc.resolve (\"exe\").toRealPath ().toString (); }\r\n\t\t\tcatch (NoSuchFileException e) { /* ignore */ }\r\n\t\t\ttry { cmdline = Files.readString (proc.resolve (\"cmdline\")); }\r\n\t\t\tcatch (NoSuchFileException e) { /* ignore */ }\r\n\t\t\tlines.set (i, String.format (\"%s %s %s %s\", lines.get (i), cwd, exe, cmdline));\r\n\t\t}\r\n\t\tFiles.write (path, lines);\r\n\t}",
"Path createPath();",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tFile file = new File(\"F:/Chandu/Test/Test1/Test2/Test3/Test4\");\n\t\t\n\t\t//create a directory\n\t\t\n\t\tboolean isFolderCreated =file.mkdirs();\n\t\t\n\t\tSystem.out.println(isFolderCreated);\n\t\t\n\t\t//get AbsolutePath\n\t\t\n\t\tString absolutePath =file.getAbsolutePath();\n\t\tSystem.out.println(absolutePath);\n\t\t\n\t\tString canonicalPath =file.getCanonicalPath();\n\t\tSystem.out.println(canonicalPath);\n\t\t\n\t\tboolean isDirectory =file.isDirectory();\n\t\t\n\t\tSystem.out.println(isDirectory);\n\t\t\n\t\t//how to create file\n\t\t\n\t\tFile file1 = new File(\"F:/Chandu/Test/abc.java\") ;\n\t\t\n\t\t//write data into file\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n \r\n System.out.println(\"Enter dirpath:\");\r\n String dirpath=br.readLine();\r\n System.out.println(\"Enter the dirname\");\r\n String dname=br.readLine();\r\n \r\n //create File object with dirpath and dname\r\n File f = new File(dirpath, dname);\r\n \r\n // File folder = new File(\"your/path\");\r\n File[] listOfFiles = f.listFiles();\r\n\r\n for (int i = 0; i < listOfFiles.length; i++) {\r\n if (listOfFiles[i].isFile()) {\r\n System.out.println(\"File \" + listOfFiles[i].getName());\r\n } else if (listOfFiles[i].isDirectory()) {\r\n System.out.println(\"Directory \" + listOfFiles[i].getName());\r\n }\r\n }\r\n }",
"java.lang.String getClasspath(int index);",
"java.lang.String getClasspath(int index);",
"private int pathIndex(String path){\n\t\t\tint returnIndex;\n\t\t\t\n\t\t\tif(path.contains(\"DR\")){\n\t\t\t\treturnIndex = 0;\n\t\t\t}else if(path.contains(\"DT\")){\n\t\t\t\treturnIndex = 1;\n\t\t\t}else if(path.contains(\"L\")){\n\t\t\t\treturnIndex = 2;\n\t\t\t}else{\n\t\t\t\treturnIndex = 3;\n\t\t\t}\n\t\t\treturn returnIndex;\n\t\t}",
"public static void dir(String currentPath){}"
] | [
"0.5963184",
"0.58345485",
"0.5828487",
"0.5800612",
"0.5730303",
"0.57085264",
"0.5684774",
"0.5670739",
"0.5670739",
"0.5664201",
"0.5632151",
"0.56218565",
"0.5605027",
"0.5545206",
"0.54540527",
"0.54415244",
"0.5430195",
"0.54193825",
"0.54026926",
"0.53800637",
"0.5324218",
"0.5281869",
"0.526651",
"0.5266214",
"0.5253738",
"0.5233476",
"0.5229645",
"0.52043176",
"0.51968867",
"0.5187912",
"0.5183825",
"0.51674706",
"0.5126718",
"0.5124383",
"0.5117918",
"0.5114659",
"0.5109125",
"0.5109125",
"0.5100812",
"0.5097446",
"0.5085829",
"0.5083877",
"0.50611305",
"0.50543654",
"0.5032218",
"0.5028962",
"0.4995833",
"0.498164",
"0.4978882",
"0.49783868",
"0.49761185",
"0.49657544",
"0.49441153",
"0.4938844",
"0.49305984",
"0.49300358",
"0.4926441",
"0.49025556",
"0.49020162",
"0.4894153",
"0.48791075",
"0.4838435",
"0.48368773",
"0.48299795",
"0.48279846",
"0.48194015",
"0.48158085",
"0.4811135",
"0.4808827",
"0.48076963",
"0.47997355",
"0.47915885",
"0.47908857",
"0.47840732",
"0.47840732",
"0.47840732",
"0.47840732",
"0.47840732",
"0.47797805",
"0.4778895",
"0.47782993",
"0.47694847",
"0.47694847",
"0.47634944",
"0.4752036",
"0.47495085",
"0.474805",
"0.4747067",
"0.47460088",
"0.47428548",
"0.47420633",
"0.4735797",
"0.47299996",
"0.47267577",
"0.47208455",
"0.471976",
"0.47189322",
"0.47189322",
"0.47144637",
"0.47122434"
] | 0.5966009 | 0 |
Constructs the input object identifier using the provided value | public SplitBackwardInputLayerDataId(int value) {
_value = value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IdentifierType createIdentifierType();",
"public Builder setIdentifier(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n identifier_ = value;\n onChanged();\n return this;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"private void setObjId(int value) {\n \n objId_ = value;\n }",
"public ComposedIdKey(String value) {\n\t\tStringTokenizer token = new StringTokenizer(value, \"::\");\n\t\ttoken.nextToken(); // className\n\t\tthis.Id_Event = token.nextToken(); // field1\n\t\tthis.Id_User = token.nextToken(); // field2\n\t}",
"public void setIdentifier(String value) {\n/* 214 */ setValue(\"identifier\", value);\n/* */ }",
"java.lang.String getIdentifier();",
"String getValueId();",
"private void generateID(){\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (String t : terms.keySet())\n\t\t\tsb.append(t.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, t.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tfor (String s : sources)\n\t\t\tsb.append(s.replaceAll(\"\\\\W\", \"\")\n\t\t\t\t\t.substring(0, Math.min(4, s.replaceAll(\"\\\\W\", \"\").length())) + \"-\");\n\t\tsb.deleteCharAt(sb.length()-1);\n\t\tif (yearFrom > -1) sb.append(\"_\" + yearFrom);\n\t\tif (yearTo > -1) sb.append(\"_\" + yearTo);\n\t\tif (useCompounds) sb.append(\"_COMP\");\n\t\tif (useStopwords) sb.append(\"_STOP\");\n\t\tsb.append(\"_CNT\" + contextSize);\n\t\tsb.append(\"_\" + System.currentTimeMillis());\n\t\tthis.id = sb.toString();\n\t}",
"int toIdentifier() {\n return 1000 * y + x;\n }",
"public AdobeVendorID(\n final String in_value)\n {\n this.value = Objects.requireNonNull(in_value);\n }",
"ObjectValue createObjectValue();",
"Identifier getId();",
"Builder addCreator(String value);",
"public synchronized I identify(Object obj) {\r\n if (obj == null) {\r\n throw new IllegalArgumentException(\"Object cannot be null\");\r\n }\r\n I id = mObjectsToIdentifiers.get(obj);\r\n if (id == null) {\r\n do {\r\n id = newIdentifier(Random.randomLong());\r\n } while (mIdentifiersToObjects.get(id) != null);\r\n id = mIdentifiers.put(id);\r\n mObjectsToIdentifiers.put(obj, id);\r\n mIdentifiersToObjects.put(id, obj);\r\n }\r\n return id;\r\n }",
"public static String toIdentifierToken (String pValue)\n {\n // See if it's a valid java identifier\n if (isJavaIdentifier (pValue)) {\n return pValue;\n }\n\n // Return as a String literal\n else {\n return toStringToken (pValue);\n }\n }",
"private Object makeObj(final String item, final int ID) {\n return new Object() {\n\n @Override\n public String toString() {\n return item;\n }\n\n @Override\n public int hashCode() {\n return ID;\n }\n };\n }",
"public String getId(Object obj, boolean notificaton) {\n\t\t/* new object generate key and add to tables */\n\t\t/* <ShortClassName><Timestamp> */\n\t\tif (obj == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\tString key = getKey(obj);\n\t\tif (key != null) {\n\t\t\treturn key;\n\t\t}\n\t\tkey = grammar.getId(obj, this);\n\t\tif (key != null) {\n\t\t\tput(key, obj, notificaton);\n\t\t\treturn key;\n\t\t}\n\t\treturn createId(obj, notificaton);\n\t}",
"public br.unb.cic.bionimbus.avro.gen.JobInfo.Builder setId(java.lang.String value) {\n validate(fields()[0], value);\n this.id = value;\n fieldSetFlags()[0] = true;\n return this; \n }",
"I getIdentifier();",
"protected Identifier toIdentifier(String stringForm, MetadataBuildingContext buildingContext) {\n\t\treturn buildingContext.getMetadataCollector()\n\t\t\t\t.getDatabase()\n\t\t\t\t.getJdbcEnvironment()\n\t\t\t\t.getIdentifierHelper()\n\t\t\t\t.toIdentifier( addUnderscores(stringForm) );\n\t}",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"public IntegerIdentifier(String name, int type, int value) {\n super(name, type); //String and integer declaration\n this.value = value;//set this.value to value\n }",
"void addId(II identifier);",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }",
"public ID(String id) {\n this.type = id.charAt(0);\n this.UID = id;\n }",
"public Variable castOidType(OIDType type, String value) {\n Variable oidValue = null;\n switch (type) {\n case INTEGER32:\n oidValue = new Integer32(Integer.parseInt(value));\n break;\n case UNSIGNED32:\n oidValue = new UnsignedInteger32(Integer.parseInt(value));\n break;\n case COUNTER32:\n oidValue = new Counter32(Long.parseLong(value));\n break;\n case GAUGE32:\n oidValue = new Gauge32(Long.parseLong(value));\n break;\n case OCTETSTRING:\n oidValue = new OctetString(value);\n break;\n case BITSTRING:\n int val = Integer.parseInt(value);\n int arrayIndex = val / 8;\n byte[] buf = new byte[] { 0x00, 0x00, 0x00, 0x00 };\n buf[arrayIndex] |= 1 << (8 - (val % 8));\n OctetString oct = new OctetString();\n oct.append(buf);\n oidValue = new OctetString(oct);\n break;\n default:\n break;\n }\n return oidValue;\n }",
"org.hl7.fhir.Identifier addNewIdentifier();",
"private Identifier(Scope scope, Type type, String name, String value){\n if(scope == null || type == null || name == null || value == null){\n throw new IllegalStateException(\"Cannot assign nullvalue\");\n }\n this.scope = scope;\n this.type = type;\n this.name = name;\n this.value = value;\n }",
"private String generateId(String input) {\n\t\treturn StringUtil.hashSHA256(input);\n\t}",
"id(int id) {}",
"public void setIdentifierValue(java.lang.String param) {\r\n localIdentifierValueTracker = true;\r\n\r\n this.localIdentifierValue = param;\r\n\r\n\r\n }",
"protected abstract String getIdentifier();",
"public ImagingStudy addIdentifier( String theSystem, String theValue) {\n\t\tif (myIdentifier == null) {\n\t\t\tmyIdentifier = new java.util.ArrayList<IdentifierDt>();\n\t\t}\n\t\tmyIdentifier.add(new IdentifierDt(theSystem, theValue));\n\t\treturn this; \n\t}",
"public String getIdentifierString();",
"public T getIdentifier();",
"private IIdentifierElement createIdentifier() throws RodinDBException {\n\t\tfinal IContextRoot ctx = createContext(\"ctx\");\n\t\treturn ctx.createChild(ICarrierSet.ELEMENT_TYPE, null, null);\n\t}",
"public int getIdentifier();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"public Builder setId(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n id_ = value;\n\n return this;\n }",
"String getIdNumber();",
"int getIdentifier();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();",
"String getId();"
] | [
"0.6154103",
"0.6108827",
"0.6058979",
"0.6058979",
"0.6058979",
"0.6058979",
"0.6058979",
"0.6058979",
"0.6028859",
"0.5956863",
"0.59353125",
"0.5920191",
"0.59010655",
"0.5802367",
"0.58019966",
"0.5788258",
"0.57569975",
"0.5751595",
"0.5732612",
"0.57048184",
"0.56295985",
"0.56226575",
"0.56121737",
"0.5610448",
"0.5596945",
"0.5576316",
"0.5576316",
"0.5576316",
"0.5576316",
"0.5576316",
"0.5576316",
"0.5576316",
"0.55737364",
"0.5568218",
"0.55680156",
"0.55680156",
"0.55680156",
"0.55496633",
"0.5548144",
"0.5540182",
"0.5537157",
"0.55037636",
"0.54944044",
"0.54802847",
"0.54733676",
"0.54705",
"0.54660374",
"0.5465887",
"0.5465265",
"0.54593265",
"0.54516923",
"0.54516923",
"0.54516923",
"0.54516923",
"0.54516923",
"0.54516923",
"0.5451159",
"0.5430882",
"0.54215294",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016",
"0.5404016"
] | 0.0 | -1 |
Returns the value corresponding to the input object identifier | public int getValue() {
return _value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Object getValueFrom();",
"String getValueId();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"Object getValue();",
"IntegerValue getValueObject();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"public Object getValue();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int getObjId();",
"int value(String name);",
"double getValue(int id);",
"public abstract Object getValue();",
"public abstract Object getValue();",
"public abstract Object getValue();",
"V get(K id);",
"public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValue();",
"String getValueName();",
"I getIdentifier();",
"Object value();",
"@Override\n public T getValue(T object) {\n return object;\n }",
"public T getIdentifier();",
"public int getIdentifier();",
"protected String getValue(String identifier) {\n if (identifier == null) {\n return null;\n }\n String[] path = identifier.split(\"\\\\.\", 2);\n BlankDialogModule object = id2ChildModule.get(path[0]);\n if (object != null) {\n return object.getValue(path.length > 1 ? path[1] : null);\n }\n return null;\n }",
"public String getObjidValue(final Node node, final String xPath) throws Exception {\r\n Node selected = selectSingleNode(node, xPath);\r\n assertNotNull(\"No Element selected to retrieve the object id from\", selected);\r\n NamedNodeMap attributes = selected.getAttributes();\r\n assertNotNull(\"Selected node has no attributes (not an element?) \", attributes);\r\n Node objidAttr = attributes.getNamedItem(NAME_OBJID);\r\n if (objidAttr != null) {\r\n return objidAttr.getTextContent();\r\n }\r\n else {\r\n objidAttr = selectSingleNode(selected, \".\" + PART_XLINK_HREF);\r\n assertNotNull(\"Selected node neither has an objid \" + \"attribute nor an xlink href attribute\", objidAttr);\r\n return getObjidFromHref(objidAttr.getTextContent());\r\n }\r\n }",
"@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract String getValue();",
"public String getObjidValue(final String xml) throws Exception {\r\n\r\n Matcher m = PATTERN_OBJID_ATTRIBUTE.matcher(xml);\r\n if (m.find()) {\r\n return m.group(1);\r\n }\r\n else {\r\n fail(\"Missing objid in provided xml data\");\r\n return null;\r\n }\r\n }",
"public Object getIdentifier() {\n return identifier;\n }",
"public Object getValue() {\n\t\treturn object;\n\t}",
"public Object getID()\n {\n return data.siObjectID;\n }",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"java.lang.String getValue();",
"@Override\n\tpublic EvaluateCustom getObjectById(Integer id) {\n\t\treturn evaluateMapper.getObjectById(id);\n\t}",
"java.lang.String getIdentifier();",
"public Object get_KeyValue(){return\t\t\t Id;}",
"public Object objectValue();",
"public abstract long getId(T obj);",
"public FString objectID() {\n return this.key;\n }",
"public Object getValue(int index);",
"Object getId();",
"E getValue();",
"long getID(Object item);",
"public String getStatusId(Object object);",
"Object readValue();",
"private Object getValueObject(Object object) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tObject value = this.methodGet.invoke(object, null);\n\t\treturn value;\n\t}",
"protected abstract T getId(P object);",
"public java.lang.String getIdentifierValue() {\r\n return localIdentifierValue;\r\n }",
"public java.lang.String getValue_id() {\n return value_id;\n }",
"int getObjectNumber();",
"int getIdentifier();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"public String getValue();",
"V get(UniqueId uniqueId);",
"Integer getValue();",
"Integer getValue();",
"public Object getValue() {\n Object o = null; \n if (type == \"string\") { o = svalue; }\n if (type == \"int\" ) { o = ivalue; }\n return o;\n }",
"public final Object ecmaGet(Context cx, Object id)\n {\n if (cx == null) cx = Context.getCurrentContext();\n XMLName xmlName = lib.toXMLNameOrIndex(cx, id);\n if (xmlName == null) {\n long index = ScriptRuntime.lastUint32Result(cx);\n // XXX Fix this cast\n Object result = get((int)index, this);\n if (result == Scriptable.NOT_FOUND) {\n result = Undefined.instance;\n }\n return result;\n }\n return getXMLProperty(xmlName);\n }",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"String getIdentifier();",
"public abstract Object get(String entityName, Serializable id);",
"abstract public Object getValue(int index);",
"@Override\r\n public final Integer getIdentifier() {\r\n return getIdent();\r\n }",
"java.lang.String getId();",
"java.lang.String getId();"
] | [
"0.7167683",
"0.70576674",
"0.6679742",
"0.6679742",
"0.6679742",
"0.6679742",
"0.6679742",
"0.6679742",
"0.6679742",
"0.65298176",
"0.6353725",
"0.6353725",
"0.6353725",
"0.6353725",
"0.6353725",
"0.622545",
"0.622545",
"0.622545",
"0.622545",
"0.622545",
"0.622545",
"0.6206156",
"0.61832076",
"0.6171783",
"0.6171783",
"0.6171783",
"0.6148726",
"0.61426336",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.61295015",
"0.6095926",
"0.60950494",
"0.608253",
"0.60704464",
"0.60684013",
"0.6068104",
"0.6065421",
"0.60560864",
"0.60442847",
"0.60148805",
"0.60144955",
"0.6003168",
"0.5990768",
"0.5977192",
"0.5977192",
"0.5977192",
"0.5977192",
"0.5977192",
"0.5977192",
"0.5962641",
"0.5950118",
"0.59491974",
"0.59424216",
"0.5936953",
"0.58885866",
"0.5886332",
"0.5879277",
"0.5874572",
"0.586111",
"0.5832544",
"0.58188945",
"0.58181214",
"0.5816691",
"0.58125794",
"0.5812179",
"0.5805391",
"0.5803593",
"0.57841223",
"0.57841223",
"0.57841223",
"0.57841223",
"0.57841223",
"0.57841223",
"0.57841223",
"0.57841223",
"0.57841223",
"0.5781028",
"0.57777095",
"0.57777095",
"0.57754856",
"0.5757332",
"0.573162",
"0.573162",
"0.573162",
"0.573162",
"0.573162",
"0.573162",
"0.573162",
"0.5726542",
"0.57243556",
"0.5719698",
"0.57177794",
"0.57177794"
] | 0.0 | -1 |
Returns a new instance of this fragment for the given section number. | public static EndGameTabFragment newInstance(int sectionNumber) {
EndGameTabFragment fragment = new EndGameTabFragment();
Bundle args = new Bundle();
args.putInt(ARG_SECTION_NUMBER, sectionNumber);
fragment.setArguments(args);
return fragment;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static MainFragment newInstance(int sectionNumber) {\n MainFragment fragment = new MainFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static CurrentInfoFragment newInstance(int sectionNumber) {\n CurrentInfoFragment fragment = new CurrentInfoFragment();\n Bundle args = new Bundle();\n args.putInt(ZooGate.ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment newInstance(int sectionNumber) {\n Fragment fragment=null;\n switch (sectionNumber){\n case 1:fragment=new ContactosFragment();\n break;\n case 2:fragment=new SeriesFragment();\n break;\n case 3:fragment=new FavoritosFragment();\n break;\n }\n return fragment;\n }",
"public static LibraryFragment newInstance(int sectionNumber) {\n LibraryFragment fragment = new LibraryFragment();\n Bundle args = new Bundle();\n return fragment;\n }",
"public static ItemFragment newInstance(int section_number){\n ItemFragment fragment = new ItemFragment();\n Bundle args = new Bundle();\n args.putInt(\"SECTION_NUMBER\",section_number);\n fragment.setArguments(args);\n return fragment;\n }",
"public static HistoryFragment newInstance(int sectionNumber) {\n\n //System.out.println(\"INFOs:: new_instance HISTORY...\");\n HistoryFragment fragment = new HistoryFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static MatchmakingFragment newInstance(int sectionNumber) {\n MatchmakingFragment fragment = new MatchmakingFragment();\n fragment.currentMatchCount = 0;\n fragment.getUser_type();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static BannerFragment newInstance(int sectionNumber) {\r\n BannerFragment fragment = new BannerFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\t\tfragment.setArguments(args);\n\t\t\treturn fragment;\n\t\t}",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\t\tfragment.setArguments(args);\n\t\t\treturn fragment;\n\t\t}",
"public static FragmentNearMe newInstance(int sectionNumber) {\n\t\tFragmentNearMe fragment = new FragmentNearMe();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static MapFragment newInstance(int sectionNumber) {\n MapFragment fragment = new MapFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\r\n\t\t\tBundle args = new Bundle();\r\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n\t\t\tfragment.setArguments(args);\r\n\t\t\treturn fragment;\r\n\t\t}",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n\t\t\tPlaceholderFragment fragment = new PlaceholderFragment();\r\n\t\t\tBundle args = new Bundle();\r\n\t\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n\t\t\tfragment.setArguments(args);\r\n\t\t\treturn fragment;\r\n\t\t}",
"public static FriendsFragment newInstance(int sectionNumber) {\n \tFriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static MyAccountFragment newInstance(int sectionNumber) {\n MyAccountFragment fragment = new MyAccountFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FindItemFragment newInstance(int sectionNumber) {\n FindItemFragment fragment = new FindItemFragment();\n Bundle args = new Bundle();\n /*args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);*/\n\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static DishesFragment newInstance(int sectionNumber) {\n DishesFragment fragment = new DishesFragment();\n Bundle args = new Bundle();\n args.putInt(PAGE, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber, MainActivity activity) {\n PlaceholderFragment fragment = new PlaceholderFragment(activity);\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static ArticlesFragment newInstance(int sectionNumber) {\n \tArticlesFragment fragment = new ArticlesFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static NewsfeedFragment newInstance(int sectionNumber) {\n NewsfeedFragment fragment = new NewsfeedFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\r\n PlaceholderFragment fragment = new PlaceholderFragment();\r\n Bundle args = new Bundle();\r\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\r\n args.putString(\"alb_post\",inte.getStringExtra(\"detailJSON\"));\r\n fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static Favourite newInstance(int sectionNumber) {\n Favourite fragment = new Favourite();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static CalendarViewFragment newInstance(int sectionNumber) {\n CalendarViewFragment fragment = new CalendarViewFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment;\n if (sectionNumber == 1) {\n fragment = new WaitListFragment();\n }\n else {\n fragment = new PlaceholderFragment();\n }\n\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static ShoppingListView newInstance(int sectionNumber) {\n ShoppingListView fragment = new ShoppingListView();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static TaskHistoryFragment newInstance(int sectionNumber) {\n TaskHistoryFragment fragment = new TaskHistoryFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static SalaryFragment newInstance(int sectionNumber) {\n SalaryFragment fragment = new SalaryFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static PlaceholderFragment newInstance(int sectionNumber) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(USER_NAME, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FragmentClientTourPage7 newInstance(int sectionNumber) {\n\t\tFragmentClientTourPage7 fragment = new FragmentClientTourPage7();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static LoginFragment newInstance(int section_number) {\n LoginFragment fragment = new LoginFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, section_number);\n fragment.setArguments(args);\n return fragment;\n }",
"public static CharacterCreationFragment newInstance(int sectionNumber, Bundle args) {\n CharacterCreationFragment fragment = new CharacterCreationFragment();\n// Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\t// We need to set arguments of this fragment. That's why I've added Bundle object as an\n\t\t// argument.\n fragment.setArguments(args);\n return fragment;\n }",
"public static ShoppingListSettings newInstance(int sectionNumber) {\n ShoppingListSettings fragment = new ShoppingListSettings();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static AuthorizeFragment newInstance(int sectionNumber) {\n\t\tAuthorizeFragment fragment = new AuthorizeFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\n\t}",
"public static ProjectScreen newInstance(int sectionNumber) {\n ProjectScreen fragment = new ProjectScreen();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static BandLocationDistanceFragment newInstance(int sectionNumber) {\n BandLocationDistanceFragment fragment = new BandLocationDistanceFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n return fragment;\n }",
"public static HomeFragment newInstance(int sectionNumber, JSONObject userInfoJson) {\n HomeFragment fragment = new HomeFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n fragment.setArguments(args);\n fragment.setUserInfoJson(userInfoJson);\n return fragment;\n }",
"public static SubmitPromptFragment newInstance(int sectionNumber) {\n SubmitPromptFragment fragment = new SubmitPromptFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n\n fragment.setArguments(args);\n return fragment;\n }",
"public static ChangesViewFragment newInstance() {\n\t\tChangesViewFragment fragment = new ChangesViewFragment();\n\t\tBundle args = new Bundle();\n\t\targs.putInt(HomeViewActivity.ARG_SECTION_NUMBER, 2);\n\t\tfragment.setArguments(args);\n\t\treturn fragment;\n\t}",
"public static HiPingFragment newInstance(int index) {\n HiPingFragment fragment = new HiPingFragment();\n Bundle bundle = new Bundle();\n bundle.putInt(ARG_SECTION_NUMBER, index);\n fragment.setArguments(bundle);\n return fragment;\n }",
"@Override\n\t\tpublic Fragment getItem(int position) {\n\t\t\tFragment fragment = new SectionFragment(); \n\t\t\tBundle args = new Bundle();\n\t\t\targs.putInt(SectionFragment.ARG_SECTION_NUMBER, position + 1);\n\t\t\tfragment.setArguments(args);\n\t\t\t\n\t\t\t\n\t\t\treturn fragment;\n\t\t\t\n\t\t}",
"public ScanFragment(int sectionNumber) {\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n scanListener = new MyButtonScanListener(this);\n searchListener = new MyButtonSearchListener();\n setArguments(args);\n }",
"public Section newSection() {\n\t\tSection page = new Section();\r\n\t\tpage.setWpPublished(DateUtils.now());\r\n\t\treturn page;\r\n\t}",
"public static EventsOrStatesFragment newInstance(int sectionNumber, boolean showEvents) {\n EventsOrStatesFragment fragment = new EventsOrStatesFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n args.putBoolean(ARG_SHOW_EVENTS, showEvents);\n fragment.setArguments(args);\n return fragment;\n }",
"public SummaryFragment newInstance()\n {\n return new SummaryFragment();\n }",
"void create(Section section);",
"public static PlaceholderFragment newInstance(int sectionNumber, String title_green, String title_black, String message, int imageId) {\n PlaceholderFragment fragment = new PlaceholderFragment();\n Bundle args = new Bundle();\n args.putInt(ARG_SECTION_NUMBER, sectionNumber);\n args.putString(ARG_SECTION_TITLE_GREEN, title_green);\n args.putString(ARG_SECTION_TITLE_BLACK, title_black);\n args.putString(ARG_SECTION_MESSAGE, message);\n args.putInt(ARG_SECTION_IMAGE, imageId);\n fragment.setArguments(args);\n return fragment;\n }",
"public static Fragment Home_Tab_start(String Id, String section) {\n BodyTab_Sub fragment = new BodyTab_Sub();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, Id);\n args.putString(ARG_PARAM2, section);\n fragment.setArguments(args);\n return fragment;\n }",
"public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }",
"Section createSection();",
"public static SummaryFragment newInstance() {\n SummaryFragment fragment = new SummaryFragment();\n return fragment;\n }",
"@Override\n public Fragment getItem(int position) {\n Bundle args = new Bundle();\n AttVFragment fragment = new AttVFragment();\n args.putInt(AttVFragment.ARG_SECTION_NUMBER, position);\n fragment.setArguments(args);\n return fragment;\n }",
"public final SectionsBottomFragment invoke() {\n return new SectionsBottomFragment();\n }",
"@Override\n public Fragment getItem(int position) {\n if (position == 0) {\n return new SectionFragment();\n } else if (position == 1) {\n return new SectionFragment();\n }\n else if (position == 2) {\n return new SectionFragment();\n }\n else if (position == 3) {\n return new SectionFragment();\n }\n\n return null;\n }",
"public static SelectionFragment newInstance() {\n SelectionFragment fragment = new SelectionFragment();\n return fragment;\n }",
"public static PurchaseFragment newInstance(int position) {\n PurchaseFragment f = new PurchaseFragment();\n // Supply index input as an argument.\n Bundle args = new Bundle();\n f.setArguments(args);\n return f;\n }",
"public static Fragment3 newInstance() {\n Fragment3 fragment = new Fragment3();\n return fragment;\n }",
"public static CommentFragment newInstance() {\n CommentFragment fragment = new CommentFragment();\n\n return fragment;\n }",
"public static BitFragment newInstance() {\n BitFragment fragment = new BitFragment();\n return fragment;\n }",
"public static MyCourseFragment newInstance() {\n MyCourseFragment fragment = new MyCourseFragment();\r\n// fragment.setArguments(args);\r\n return fragment;\r\n }",
"public static CategoryFragment newInstance() {\n CategoryFragment categoryFragment = new CategoryFragment();\n return categoryFragment;\n\n }",
"public static DetailsFragment newInstance(@IntRange(from = 1, to = 3) int kittenNumber) {\n Bundle args = new Bundle();\n args.putInt(ARG_KITTEN_NUMBER, kittenNumber);\n\n DetailsFragment fragment = new DetailsFragment();\n fragment.setArguments(args);\n\n return fragment;\n }",
"public static NewGameFragment newInstance() {\n return new NewGameFragment();\n }",
"public static MyFragment getInstance(int position) {\n\n //Construct the fragment\n MyFragment myFragment = new MyFragment();\n\n //New bundle instance\n Bundle args = new Bundle();\n\n //Passing in the Integer position of the fragment into the argument\n args.putInt(\"position\", position);\n\n //Setting the argument of the fragment to be the position\n myFragment.setArguments(args);\n\n //Return the fragment\n return myFragment;\n }",
"public static FootprintFragment newInstance() {\n FootprintFragment fragment = new FootprintFragment();\n\n return fragment;\n }",
"public static AmountFragment newInstance() {\n return new AmountFragment();\n }",
"public static CVFragment newInstance(int i) {\n CVFragment myFragment = new CVFragment();\n\n Bundle args = new Bundle();\n args.putInt(\"pageInt\", i);\n myFragment.setArguments(args);\n\n return myFragment;\n }"
] | [
"0.7838732",
"0.771708",
"0.77108735",
"0.76977235",
"0.76848483",
"0.7611597",
"0.75968856",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.75697947",
"0.7568037",
"0.75579816",
"0.7552547",
"0.75143254",
"0.75143254",
"0.75006056",
"0.75006056",
"0.7498621",
"0.7478436",
"0.7460385",
"0.7460385",
"0.74503946",
"0.7448008",
"0.7400476",
"0.7389113",
"0.738651",
"0.73783594",
"0.73724496",
"0.7342385",
"0.72753686",
"0.7255431",
"0.71909994",
"0.71773815",
"0.7168385",
"0.71616113",
"0.70811814",
"0.7062421",
"0.7030642",
"0.7009545",
"0.6937434",
"0.6924657",
"0.6897596",
"0.68894315",
"0.6320375",
"0.63005376",
"0.61766684",
"0.617159",
"0.60630566",
"0.60614824",
"0.5983227",
"0.58895165",
"0.5849337",
"0.58224684",
"0.5819649",
"0.581171",
"0.568512",
"0.567941",
"0.56255704",
"0.5597527",
"0.55443305",
"0.5528103",
"0.55274624",
"0.54951",
"0.5492887",
"0.5490384",
"0.5451413",
"0.54315335",
"0.5425897",
"0.5398399",
"0.53978527",
"0.53918177",
"0.53675354",
"0.5358253",
"0.53550786"
] | 0.69004536 | 67 |
When the view is created, assign all widgets and listeners. Pass the view v to set up the spinners in a fragment Source: | @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);
setupWidgets();
setupTextFields(view);
setupSpinners(view);
// Inflate the layout for this fragment
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public View setupSpinners(View v){\n // Assign Spinners\n spinnerCollect = (Spinner) v.findViewById(R.id.eSpinner_CollectWhat);\n\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this.getActivity(),\n R.array.eCollectWhat_array, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerCollect.setAdapter(adapter); // Apply the adapter to the spinner\n\n spinnerCollect.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(spinnerCollect.getSelectedItem().toString());\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }\n });\n\n return v;\n }",
"private void initializePeriodicFragmentViews(View view) {\n periodIdentifierSpinner = view.findViewById(R.id.periodIdentifierSpinner);\n pExpenseNameTil = view.findViewById(R.id.pExpenseNameTil);\n pExpenseNameEt = view.findViewById(R.id.pExpenseNameEt);\n pCostTil = view.findViewById(R.id.pCostTil);\n pCostEt = view.findViewById(R.id.pCostEt);\n pExpenseNameEt.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n pExpenseNameTil.setError(null);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n pCostEt.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n pCostTil.setError(null);\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }",
"private void initViews(View view) {\n RecyclerViewClickListener itemClickListener = new RecyclerViewClickListener() {\n @Override\n public void recyclerViewListClicked(View view, int position) {\n\n }\n };\n\n recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view_commits);\n adapter = new RVAdapterCommits(getActivity(), commitsList, itemClickListener);\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n recyclerView.setAdapter(adapter);\n\n initSpinner(view);\n }",
"private void initViews() {\n mCancelButton.setOnClickListener(view -> getDialog().dismiss());\n\n mSaveButton.setOnClickListener(view -> {\n //Check if callback is attached or not\n if (mCallback != null) {\n mCallback.onOptionsFiltered(SELECTED_TIME_OPTION);\n }\n getDialog().dismiss();\n });\n\n //Initialize Spinner adapter\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_item, Constants.TIME_OPTIONS);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mTimeOptionsSpinner.setAdapter(adapter);\n\n mTimeOptionsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n SELECTED_TIME_OPTION = i;\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n SELECTED_TIME_OPTION = 0;\n }\n });\n\n mTimeOptionsSpinner.setSelection(SELECTED_TIME_OPTION);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_create_course_ui, container, false);\n ButterKnife.bind(this, view);\n\n //add list to spinner\n spinnerFieldList();\n return view;\n }",
"private void initView() {\n wvProvince = findViewById(R.id.wheelv_province);\r\n wvCity = findViewById(R.id.wheelv_city);\r\n wvArea = findViewById(R.id.wheelv_area);\r\n\r\n findViewById(R.id.tv_addresspicker_confirm).setOnClickListener(this);\r\n // findViewById(R.id.tv_addresspicker_exit).setOnClickListener(this);\r\n\r\n // if (!TextUtils.isEmpty(title)) tvAddressTitle.setText(title);\r\n }",
"private void initUI(View view) {\n btnSend = (AutoBgButton) view.findViewById(R.id.btnSend);\n btnBack = (ImageView) view.findViewById(R.id.btnBack);\n edtTitle = (EditText) view.findViewById(R.id.edtTitleFB);\n edtDes = (EditText) view.findViewById(R.id.edtDesFB);\n spnType = (Spinner) view.findViewById(R.id.spnType);\n btnBack.setOnClickListener(this);\n btnSend.setOnClickListener(this);\n spnType.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n if (position == 0) {\n type = \"1\";\n } else if (position == 1) {\n type = \"3\";\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n // TODO Auto-generated method stub\n\n }\n });\n }",
"private void initView(){\n\t\tinitSize();\n\t\tinitText();\n\t\tinitBackground();\n\t\tthis.setOnClickListener(this);\n\t\tthis.setOnLongClickListener(this);\n\t}",
"private void initView() {\n\t\tself_info.setOnClickListener(this);\r\n\t\twhich_org.setOnClickListener(this);\r\n\t\tmember_information.setOnClickListener(this);\r\n\t}",
"private void initializeComponents(View view) {\n etTitle = (EditText) view.findViewById(R.id.etTitle);\n etAmount = (EditText) view.findViewById(R.id.etAmount);\n btnSave = (Button) view.findViewById(R.id.btnSaveExpense);\n category = (Spinner) view.findViewById(R.id.spinnerCategory);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(), R.array.spinner_choises, android.R.layout.simple_spinner_dropdown_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n category.setAdapter(adapter);\n\n btnDatePicker = (TextView) view.findViewById(R.id.btnExpenseDatePicker);\n btnSave.setOnClickListener(new btnSaveClicked());\n btnDatePicker.setOnClickListener(new btnDatePickerClicked());\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n mView= inflater.inflate(R.layout.fragment_default_internal_staff, container, false);\n initObjects();\n getInternalStaffListThread();\n getFlatOwnerListThread();\n // :::::::::::::: Onclick:Listner :::::::::::::::::::\n button_submit.setOnClickListener(this);\n button_Select.setOnClickListener(this);\n spinner_visitorTypeUser.setOnItemSelectedListener(this);\n spinner_searchToVisit.setOnItemSelectedListener(this);\n spinner_staffName.setOnItemSelectedListener(this);\n return mView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n String[] numbers = {\"2\", \"4\", \"6\", \"8\",\"10\"};\n\n\n View v = inflater.inflate(R.layout.fragment_my_fragment1, container, false);\n final Spinner spin = (Spinner)v.findViewById(R.id.mySpinner);\n ArrayAdapter<String> stringArrayAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_dropdown_item, numbers);\n spin.setAdapter(stringArrayAdapter);\n\n Button myButton = (Button)v.findViewById(R.id.myButton);\n myButton.setOnClickListener(new Button.OnClickListener() {\n @Override\n public void onClick(View v) {\n String text = spin.getSelectedItem().toString();\n mListener.onNumberSelected(Integer.parseInt(text));\n }\n\n\n });\n\n\n return v;\n }",
"private void initView() {\n\t\tbtnMapMode = contentView.findViewById(R.id.venue_iv_map);\n\t\tbtnMapMode.setOnClickListener(this);\n\t\tbtnSearch = contentView.findViewById(R.id.venue_iv_search);\n\t\tbtnSearch.setOnClickListener(this);\n\t\temptyView = contentView.findViewById(R.id.event_ll_empty);\n\t\temptyView.findViewById(R.id.event_empty_other_area).setOnClickListener(\n\t\t\t\tthis);\n\t\temptyView.findViewById(R.id.event_empty_add_event).setOnClickListener(\n\t\t\t\tthis);\n\n\t\tglHotImage = (ViewPager) vHeader.findViewById(R.id.header_viewpager);\n\t\tllIndic = (LinearLayout) vHeader.findViewById(R.id.header_ll_indic);\n\t\tbtnPlace = (Button) vHeader.findViewById(R.id.header_btn_place);\n\t\tbtnVenue = (Button) vHeader.findViewById(R.id.header_btn_venue);\n//\t\tviewGroup = (ViewGroup) vHeader.findViewById(R.id.viewGroup);\n\t\tbtnPlace.setOnClickListener(this);\n\t\tbtnVenue.setOnClickListener(this);\n\n\t\tmPullRefreshListView = (PullToRefreshListView) contentView\n\t\t\t\t.findViewById(R.id.venue_lv);\n\t\tmPullRefreshListView.setMode(Mode.BOTH);\n\t\tmListView = mPullRefreshListView.getRefreshableView();\n\t\tmListView.setHeaderDividersEnabled(false);\n\t\tmPullRefreshListView.getRefreshableView().setSelector(\n\t\t\t\tnew ColorDrawable(Color.TRANSPARENT));\n\t\t// android.R.color.transparent\n\t\t// mListView.setEmptyView(emptyView);\n\t\tmPullRefreshListView.setOnItemClickListener(this);\n\t\tmListView.addHeaderView(vHeader, null, true);\n\t\tmListView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);\n\t\tmAdapter = new VenueListAdapter(getActivity(), mList);\n\t\tmPullRefreshListView.setAdapter(mAdapter);\n\t\tmPullRefreshListView.setOnRefreshListener(this);\n\t\tglHotImage.setOnPageChangeListener(new HeaderChangeListener());\n\t\tif (null != pagerAdapter) {\n\t\t\tpagerAdapter.notifyDataSetChanged();\n\t\t}\n\t}",
"private void init() {\n initView();\n setListener();\n }",
"private void initView() {\n TIMManager.getInstance().addMessageListener(this);\n initAdapter();\n initRefresh();\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tower_parameter, container, false);\n bind = ButterKnife.bind(this,view);\n EventBus.getDefault().register(this);\n initRecycleView();\n initView();\n initRotationAngle();\n initHookup();\n return view;\n }",
"@SuppressLint(\"ValidFragment\")\n\n\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_eval1_p3, container, false);\n\n spP6sp1 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp1);\n spP6sp2 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp2);\n spP6sp3 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp3);\n spP6sp4 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp4);\n spP6sp5 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp5);\n\n\n return rootView;\n }",
"private void initViews() {\n userNumberEditText = findViewById(R.id.numberEdittextactivityinfo);\n filterButton = findViewById(R.id.cirUploadDetailsBtn_activityinfo);\n filterButton.setOnClickListener(filterButtonClickListener());\n\n// progressDialog = new ProgressDialog(this);\n// progressDialog.setMessage(\"Loading...\");\n// progressDialog.setCancelable(false);\n\n// WaveLoadingView loadingView = findViewById(R.id.waveloadingviewfilterchat);\n// loadingView.setAnimDuration(10000);\n\n }",
"private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.field_spinner_field, this);\n }",
"private void initView() {\n mBinding.swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n\n mBinding.swipeRefresh.setRefreshing(false);\n }\n });\n\n\n setUpBookingRecycler();\n bindStaticData();\n setUpBookingAdapter();\n }",
"private void initViews(){\n mTitle = (EditText) findViewById(R.id.scheduled_event_title);\n mDescription = (EditText) findViewById(R.id.scheduled_event_description);\n mHour = (EditText) findViewById(R.id.scheduled_event_time_hour);\n mMinute = (EditText) findViewById(R.id.scheduled_event_time_minutes);\n mCategorySpinner = (Spinner) findViewById(R.id.scheduled_spinner_categories);\n mDueDate = (TextView) findViewById(R.id.tv_scheduled_event_due_date);\n mDueTime = (TextView) findViewById(R.id.tv_scheduled_event_due_time);\n }",
"private void setupViews(View view) {\n FragmentManager manager = getChildFragmentManager();\n sportsSpinner = (ColoredSpinnerFragment)\n manager.findFragmentById(R.id.sportsSpinnerFragment);\n\n logOut = view.findViewById(R.id.signout);\n\n logOut.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n FirebaseAuth.getInstance().signOut();\n }\n });\n backgroundPicture = view.findViewById(R.id.profile_background);\n usernameText = view.findViewById(R.id.userName);\n expText = view.findViewById(R.id.exp_search);\n followersText = view.findViewById(R.id.followers);\n tierText = view.findViewById(R.id.following);\n sportsmanshipBar = view.findViewById(R.id.ratingBar);\n profilePicture = view.findViewById(R.id.profilePic);\n badgeRecycler = view.findViewById(R.id.profileBadgeRecycler);\n }",
"@Override\n protected void initView() {\n ButterKnife.bind(this);\n }",
"private void initView() {\n\n }",
"@Override\n public void initView() {\n }",
"private void initViews(){\n // Parent View\n view = findViewById(android.R.id.content);\n\n // Initialize toolbar\n cancelBtn = findViewById(R.id.close_btn);\n createBtn = findViewById(R.id.submit_btn);\n TextView toolbarTitle = findViewById(R.id.title);\n toolbarTitle.setText(getString(R.string.create_new_booking));\n\n pickupLocationInput = findViewById(R.id.pickup_location_input);\n destinationInput = findViewById(R.id.destination_input);\n timeInput = findViewById(R.id.time_input);\n noPassengersInput = findViewById(R.id.number_of_passengers_input);\n notesInput = findViewById(R.id.notes_input);\n progressIndicator = findViewById(R.id.progress_indicator_overlay);\n\n pickupLocationInputContainer = findViewById(R.id.pickup_location_input_container);\n destinationInputContainer = findViewById(R.id.destination_input_container);\n timeInputContainer = findViewById(R.id.time_input_container);\n noPassengersInputContainer = findViewById(R.id.number_of_passengers_input_container);\n notesInputContainer = findViewById(R.id.notes_input_container);\n\n\n // Set Default Value of No_Passengers to 1\n noPassengersInput.setText(\"1\");\n\n // Set the default value of desired time to 15 mins from NOW\n Calendar cal = Calendar.getInstance();\n cal.add(Calendar.MINUTE, 15);\n bookingHour = cal.get(Calendar.HOUR_OF_DAY);\n bookingMinute = cal.get(Calendar.MINUTE);\n\n timeInput.setText(getString(R.string.desired_time_format, bookingHour, bookingMinute));\n\n // Add behaviour to relevant views\n noPassengersInput.setOnClickListener(this::showNumberPickerDialog);\n timeInput.setOnClickListener(v -> showTimePicker());\n cancelBtn.setOnClickListener(v -> cancel());\n createBtn.setOnClickListener(v -> createBooking());\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_sensor_dialog, container, false);\n getDialog().requestWindowFeature(Window.FEATURE_NO_TITLE);\n this.spinner_sensor_type = (Spinner)view.findViewById(R.id.sensor_dialog_spinner_sensor_type);\n this.sensor_deep = (EditText)view.findViewById(R.id.sensor_dialog_edit_deep);\n this.sensor_description = (EditText)view.findViewById(R.id.sensor_dialog_edit_description);\n this.spinner_sensor_type.setAdapter(new ArrayAdapter<SensorType>(getActivity(), android.R.layout.simple_list_item_1, SensorType.values()));\n Button button = (Button)view.findViewById(R.id.btnNewSensor);\n //button.setOnClickListener(this);\n\n return view;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_endgame_tab, container, false);\r\n getSpinnerValues(view);\r\n sets(view);\r\n return view;\r\n }",
"@Override\n public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initView();\n }",
"@Override\n public void initViews() {\n adapter = new PaymentAdapter(context, MainActivity.os.getPayments());\n ((ListView)views.get(\"LIST_VIEW\")).setAdapter(adapter);\n (views.get(\"ADD_BUTTON\")).setOnClickListener(this);\n }",
"@Override\r\n\tprotected void initViews(Bundle savedInstanceState) {\n\t\t\r\n\t}",
"@SuppressLint(\"ResourceAsColor\")\r\n\tprivate void initView() {\n\t\tfriendOneBtn = (Button)getActivity().findViewById(R.id.friend_one_btn);\r\n\t\tfriendTwoBtn = (Button) getActivity().findViewById(R.id.friend_two_btn);\r\n\t\tcursorImage = (ImageView)getActivity().findViewById(R.id.cursor);\r\n\t\t// 进入添加好友页\r\n\t\tfriendOneBtn.setOnClickListener(listener);\r\n\t\tfriendTwoBtn.setOnClickListener(listener);\r\n\t\t\r\n\t\tunreadLabel = (TextView) getActivity().findViewById(R.id.unread_msg_number);\r\n unreadAddressLable = (TextView) getActivity().findViewById(R.id.unread_address_number);\r\n ImageView addContactView = (ImageView) getView().findViewById(R.id.iv_new_contact);\r\n\t\t// 进入添加好友页\r\n\t\taddContactView.setOnClickListener(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tstartActivity(new Intent(getActivity(), AddContactActivity.class));\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"@Override\n protected void initView() {\n }",
"@Override\n protected void initView() {\n }",
"private void initView(View view) {\n rlMain = view.findViewById(R.id.rlMain);\n llHeader = view.findViewById(R.id.llHeader);\n tvManually = view.findViewById(R.id.tvManually);\n tbPerson = view.findViewById(R.id.tbPerson);\n viewPagerPerson = view.findViewById(R.id.viewPagerPerson);\n tvPersonHeader = view.findViewById(R.id.tvPersonHeader);\n tvPersonHeader.setText(getString(R.string.choose_vehicle));\n tbPerson.setTabMode(TabLayout.MODE_SCROLLABLE);\n\n isPopulateView();\n\n aRightsMapper = db.getSectionList();\n validateRights();\n setPersonPagerData();\n tvManually.setOnClickListener(this);\n }",
"private void initViews() {\n mTvBalance = findViewById(R.id.tv_receive_client_balance);\n mListView = findViewById(R.id.lv_list_receive_client);\n mFab = findViewById(R.id.fab_receive_receip);\n mTvEmpty = findViewById(R.id.tv_empty_view);\n mIvEmpty = findViewById(R.id.iv_empty_view);\n mEmptyView = findViewById(R.id.empty_view);\n }",
"private void init(View view) {\n\t\t\r\n\t\tFunSub = (CustemGallery)view.findViewById(R.id.FragMain_Pack);\r\n\t\t\r\n\t\tfragMain_Pack_CustemCalleryAdapter = new FragMain_Pack_CustemCalleryAdapter(getActivity());\r\n\t\t\r\n\t\tFunSub.setAdapter(fragMain_Pack_CustemCalleryAdapter);\r\n\t\t\r\n\t\t\r\n\t}",
"private void initViews() {\n\t\t// TODO Auto-generated method stub\n\t\t// venuePager = (ViewPager)findViewById(R.id.pager);\n\n\t\tmyGallery = (LinearLayout) findViewById(R.id.horizontalScrollItems);\n\n\t\tvenueImageLarge = (ImageView) findViewById(R.id.imageVenueLarge);\n\n\t\tinfoImageView = (ImageView) findViewById(R.id.imageInfo);\n\n\t\tcloseBtn = (ImageView) findViewById(R.id.imageclose);\n\n\t\tvenueCapacity = (TextView) findViewById(R.id.venueCapacity);\n\n\t\tvenueDes = (TextView) findViewById(R.id.venueDes);\n\n\t\tvenueName = (TextView) findViewById(R.id.venueName);\n\n\t\tvenueRelative = (RelativeLayout) findViewById(R.id.venue_relative);\n\n\t\tviewAnimator = (ViewAnimator) this.findViewById(R.id.viewFlipper_venue);\n\n\t\tvenueFullname = (TextView) findViewById(R.id.venueFullnameValue);\n\n\t\tvenueCity = (TextView) findViewById(R.id.venueCityValue);\n\n\t\tvenueOwner = (TextView) findViewById(R.id.venueOwnerValue);\n\n\t\tvenueOpened = (TextView) findViewById(R.id.venueOpenedValue);\n\n\t\tvenueSurface = (TextView) findViewById(R.id.venueSurfaceValue);\n\n\t\tvenueWebsite = (TextView) findViewById(R.id.venueWebsiteValue);\n\n\n\t}",
"@Override\n\tprotected void initView() {\n\t\tsetShuohuaTouchListener();\n\t\tiv_shuohua.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tiv_operate.setSelected(!iv_operate.isSelected());\n\t\t\t\tiv_shuohua.setSelected(!iv_shuohua.isSelected());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tmViewPager.setOnPageChangeListener(new OnPageChangeListener()\n\t\t{\n\t\t\t@Override\n\t\t\tpublic void onPageSelected(int position)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcurrentPosition = position;\n\t\t\t\tif (position == 0) {// 直播\n\t\t\t\t\tZhiBoFragment fragment = ((ZhiBoFragment) fragments\n\t\t\t\t\t\t\t.get(position));\n\t\t\t\t\tif (liveModels == null || liveModels.size() == 0) {\n\t\t\t\t\t\t//暂停计时器查询\n\t\t\t\t\t\tstopTimeTask();\n\t\t\t\t\t\t\n\t\t\t\t\t\tsquareLiveDetailLiveRequest(fragment, false,0);\n\t\t\t\t\t}\n\t\t\t\t} else if (position == 1) {// 聊天\n\t\t\t\t\tLiaotianFragment fragment = ((LiaotianFragment) fragments\n\t\t\t\t\t\t\t.get(position));\n\t\t\t\t\tif (chatModels == null || chatModels.size()==0) {\n\t\t\t\t\t\t//暂停计时器查询\n\t\t\t\t\t\tstopTimeTask();\n\t\t\t\t\t\t\n\t\t\t\t\t\tsquareLiveDetailChatRequest(fragment, false,0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPageScrolled(int position, float positionOffset,\n\t\t\t\t\tint positionOffsetPixels)\n\t\t\t{\n\t\t\t\tmIndicator.scroll(position, positionOffset);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onPageScrollStateChanged(int state)\n\t\t\t{\n\n\t\t\t}\n\t\t});\n\t}",
"private void initView() {\n initRefreshListView(mListview);\n }",
"private void initView() {\n \t textDate = (TextView) findViewById(R.id.nextInspectionDate);\n \t textTime = (TextView) findViewById(R.id.nextInspectionTime);\n \t textAddress = (TextView) findViewById(R.id.textAddressInspection);\n \t textPermitType = (TextView) findViewById(R.id.textPermitType);\n \t buttonScheduleInspection = (Button) findViewById(R.id.buttonScheduleInspection);\n \t buttonViewInspections = (Button) findViewById(R.id.buttonViewInspections);\n \t loadingProgress = (ProgressBar) findViewById(R.id.spinnerInpsection);\n \t LinearLayout landingNextInspectionId = (LinearLayout) findViewById(R.id.landingNextInspectionId);\n \t landingNextInspectionId.setOnClickListener(new View.OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(projectsLoader.getNextInspection()!=null){\n\t\t\t\t\tString recordId = projectsLoader.getNextInspection().getRecordId_id();\n\t\t\t\t\tif(recordId==null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tActivityUtils.startScheduleInspectionActivity(LandingPageActivity.this, projectsLoader.getParentProject(recordId).getProjectId(), recordId, projectsLoader.getNextInspection(), AppConstants.CANCEL_INSPECTION_SOURCE_OTHER);\n\t\t\t\t}\n\t\t\t}\t\n\t\t});\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_allrisk2, container, false);\n ButterKnife.bind(this,view);\n // mStepView next registration step\n \n\n mStepView.go(currentStep, true);\n userPreferences = new UserPreferences(getContext());\n itemtypeSpinner();\n init();\n\n setViewActions();\n showDatePicker();\n\n return view;\n }",
"@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.pickupboy_booking_fragment, container, false);\n mActivity = getActivity();\n userBookingFragment = this;\n initViews();\n getBundle();\n // manageHeaderView();\n setupTabIcons();\n setListener();\n setFragment(new FragementPickUpNewBooking());\n\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.rider_tracking_fragment, container, false);\n\n //getting reference to the widgets in layout\n progressBar = view.findViewById(R.id.viewTrackingProgressBar);\n message = view.findViewById(R.id.viewTrackingMessage);\n //method call to get bookings\n getPlacedBookings(view, getContext());\n\n return view;\n }",
"public void initView() {\n ((TextView) _$_findCachedViewById(R.id.tvCancelResv)).setOnClickListener(new MyResvDetailActivity$initView$1(this));\n getResvDetail();\n }",
"@Override\n\tpublic void onViewCreated(View view, @Nullable Bundle savedInstanceState) {\n\t\tsuper.onViewCreated(view, savedInstanceState);\n\t\tinitBar();\n\t\tmSettingManagerItem.setOnClickListener(this);\n\t}",
"private void initView() {\n\t\tmSeekButton = (Button) findViewById(R.id.seekButton);\r\n\t\tmViewPager = (ViewPager) findViewById(R.id.viewPager);\r\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n ctx = getActivity();\n View view = inflater.inflate(getLayoutID(),null);\n mPreenter = createPresenter();\n loading = new MyProgressLoading(ctx, R.style.DialogStyle);\n sp = ctx.getSharedPreferences(SpUtiles.SP_Mode,Context.MODE_PRIVATE);\n HideUtil.init(getActivity());\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"@Override\n public void initView() {\n\n }",
"@Override\n protected void initView() {\n super.initView();\n searchView = (SearchView) findViewById(R.id.search_view);\n searchView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n searchView.onActionViewExpanded();\n }\n });\n searchView.setOnCloseListener(new SearchView.OnCloseListener() {\n @Override\n public boolean onClose() {\n mRunnersAdapter.setRunners(mRunners);\n mRunnersAdapter.notifyDataSetChanged();\n return false;\n }\n });\n searchView.setOnQueryTextListener(listenerSearch);\n searchView.setQueryRefinementEnabled(true);\n mListView = (ListView) findViewById(R.id.runners_you_may_know_list);\n\t\t/*final Dialog dialog = CustomLoadingDialog.show(RunnerActivity.this, \"\",\n\t\t\t\t\"\", false, false);*/\n\n // Set adpater for listview\n mRunners = new ArrayList<Runner>();\n mRunnersAdapter = new NewRunnerAdapter(RunnerActivity.this, mRunners,\n mImageLoader);\n\t\t/*mListView.setAdapter(mRunnersAdapter);\n\t\tmListView.setOnItemClickListener(this);*/\n if(mLoadingDialog == null) {\n mLoadingDialog = CustomLoadingDialog.show(RunnerActivity.this, \"\", \"\", false, false);\n }\n loadListRunner();\n\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_edhgame_setup, container, false);\n spn = (Spinner) v.findViewById(R.id.spnNumPlayers);\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity().getApplicationContext(), R.array.num_players,\n R.layout.spinner_setup_item);\n //adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spn.setAdapter(adapter);\n etxMaxPoison = (EditText) v.findViewById(R.id.etxMaxPoison);\n etxStartingLife = (EditText) v.findViewById(R.id.etxStartingLife);\n chbLinkDamage = (CheckBox) v.findViewById(R.id.chbLinkDamage);\n chbAutoDelete = (CheckBox) v.findViewById(R.id.chbAutoDeleteDead);\n\n EDHSettingsDataHandler handler = new EDHSettingsDataHandler(getActivity());\n chbLinkDamage.setChecked(handler.isCommanderDamageLinked());\n chbAutoDelete.setChecked(handler.isAutoDeleteOn());\n etxMaxPoison.setText(String.valueOf(handler.getMaxPoison()));\n etxStartingLife.setText(String.valueOf(handler.getStartingLife()));\n spn.setSelection(handler.getNumPlayers() - 2);\n handler.close();\n\n chbAutoDelete.setOnCheckedChangeListener(this);\n chbLinkDamage.setOnCheckedChangeListener(this);\n\n ImageView btnGameStart = (ImageView) v.findViewById(R.id.imgGameStartyStart);\n btnGameStart.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n onButtonPressed(v);\n }\n });\n Log.v(TAG, \"set listener\");\n //Button btn = (Button) v.findViewById(R.)\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bus_single_item_shop, container, false);\n\n\n AndroidSupportInjection.inject(this);\n ButterKnife.bind(this, view);\n\n //TODO take care of the progressBar\n\n\n return view;\n }",
"public void initView(){}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_select_idp_callback, container, false);\n\n LinearLayout selectAuthenticationLayout = view.findViewById(R.id.selectAuthenticationLayout);\n LinearLayout selectIdpLayout = view.findViewById(R.id.selectIdpLayout);\n\n\n for (SelectIdPCallback.IdPValue idp : callback.getProviders()) {\n View v = getView(idp);\n if (v != null) {\n v.setOnClickListener(v1 -> {\n callback.setValue(idp.getProvider());\n onDataCollected();\n next();\n });\n selectIdpLayout.addView(v);\n Space space = new Space(getContext());\n space.setMinimumWidth(20);\n selectIdpLayout.addView(space);\n }\n }\n if (showLocalAuthentication()) {\n suspend();\n View v = getLocalAuthenticationView();\n v.setOnClickListener(v1 -> {\n callback.setValue(LOCAL_AUTHENTICATION);\n onDataCollected();\n next();\n });\n selectAuthenticationLayout.addView(v);\n }\n return view;\n }",
"@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tView view = inflater.inflate(R.layout.fragment_slider, null);\n\t\tinitUi(view);\n\t\tsetListener();\n\t\treturn view;\n\t}",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}",
"@Override\r\n protected void initView() {\n mTitleTV = (TextView) findViewById(R.id.sub_header_bar_tv);\r\n mBackIBtn = (ImageButton) findViewById(R.id.sub_header_bar_left_ibtn);\r\n mChooseVehicleTypeLL = (LinearLayout) findViewById(R.id.choose_vehicle_type_ll);\r\n mVehicleTypeTV = (TextView) findViewById(R.id.vehicle_type_tv);\r\n mVehicleCodeTV = (TextView) findViewById(R.id.car_plate_districe_coding_tv);\r\n mVehiclePlateNumET = (EditText) findViewById(R.id.vehicle_plate_num_et);\r\n mChooseCityLL = (LinearLayout) findViewById(R.id.choose_city_ll);\r\n mQueryCityTV = (TextView) findViewById(R.id.choose_city_tv);\r\n mVehicleFrameNumET = (EditText) findViewById(R.id.vehicle_frame_num_et);\r\n mVehicleEngineNumET = (EditText) findViewById(R.id.vehicle_engine_num_et);\r\n mVehicleFrameHelpIV = (ImageView) findViewById(R.id.vehicle_frame_info_iv);\r\n mVehicleEngineHelpIV = (ImageView) findViewById(R.id.vehicle_engine_info_iv);\r\n mQueryBtn = (Button) findViewById(R.id.illegal_query_btn);\r\n mVehicleFrameNumLL = (LinearLayout) findViewById(R.id.vehicle_frame_num_ll);\r\n mVehicleEngineNumLL = (LinearLayout) findViewById(R.id.vhicle_engine_num_ll);\r\n }",
"private void initSpinners() {\n mColourArray = Constants.colours.keySet().toArray(new String[Constants.colours.keySet().size()]);\n mPositonArray = Constants.gravity.keySet().toArray(new String[Constants.gravity.keySet().size()]);\n mScaleArray = Constants.scale.keySet().toArray(new String[Constants.scale.keySet().size()]);\n\n // Init Adapters\n ArrayAdapter<String> colourAdapter = new ArrayAdapter<>(\n this,\n R.layout.adapter_dropdown_menu_item,\n mColourArray);\n\n ArrayAdapter<String> positionAdapter = new ArrayAdapter<>(\n this,\n R.layout.adapter_dropdown_menu_item,\n mPositonArray);\n\n ArrayAdapter<String> scaleAdapter = new ArrayAdapter<>(\n this,\n R.layout.adapter_dropdown_menu_item,\n mScaleArray);\n\n // Set Adapter\n mDataBinding.textColor.setAdapter(colourAdapter);\n mDataBinding.backgroundColor.setAdapter(colourAdapter);\n mDataBinding.position.setAdapter(positionAdapter);\n mDataBinding.imageScale.setAdapter(scaleAdapter);\n\n // Set Listeners\n mDataBinding.textColor.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mTextColour = Constants.colours.get(selectedItemKey);\n });\n\n mDataBinding.backgroundColor.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mBackgroundColour = Constants.colours.get(selectedItemKey);\n });\n\n mDataBinding.position.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mPosition = Constants.gravity.get(selectedItemKey);\n });\n\n mDataBinding.imageScale.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mScale = Constants.scale.get(selectedItemKey);\n });\n\n // Set defaults\n mDataBinding.textColor.setText(colourAdapter.getItem(1), false);\n mDataBinding.backgroundColor.setText(colourAdapter.getItem(0), false);\n mDataBinding.position.setText(positionAdapter.getItem(0), false);\n mDataBinding.imageScale.setText(scaleAdapter.getItem(0), false);\n mTextColour = colourAdapter.getItem(1);\n mBackgroundColour = colourAdapter.getItem(0);\n mPosition = positionAdapter.getItem(0);\n mScale = scaleAdapter.getItem(0);\n }",
"private void initView() {\n\t\t//buttonPlayPause = (ImageButton)getView().findViewById(R.id.ButtonTestPlayPause);\n\t\t//buttonPlayPause.setOnClickListener(this);\n\t\t\n\t\t//seekBarProgress = (SeekBar)getView().findViewById(R.id.SeekBarTestPlay);\t\n\t\t//seekBarProgress.setMax(99); // It means 100% .0-99\n\t\t//seekBarProgress.setOnTouchListener(this);\n\t\t//editTextSongURL = (EditText)findViewById(R.id.EditTextSongURL);\n\t\t//editTextSongURL.setText(R.string.testsong_20_sec);\n\t\t\n\t\t//mediaPlayer = new MediaPlayer();\n\t\t//mediaPlayer.setOnBufferingUpdateListener(this);\n\t\t//mediaPlayer.setOnCompletionListener(this);\n\t}",
"public void initViews() {\n View accountExists = activity.findViewById(R.id.button_register);\n Button buttonSubmitAuth = activity.findViewById(R.id.button_login);\n\n viewUsername = activity.findViewById(R.id.login_username);\n viewPassword = activity.findViewById(R.id.login_password);\n\n accountExists.setOnClickListener(view ->\n activity.setViewPagerCurrentItem(OnboardingActivity.Companion.getFRAGMENT_REGISTRATION()));\n\n buttonSubmitAuth.setOnClickListener(view -> authenticateUser());\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n v= inflater.inflate(R.layout.fragment_blank, container, false);\n ButterKnife.bind(this,v);\n progressDialog=new ProgressDialog(getContext());\n showMessage(\"Loading\");\n initRecycler();\n retrofitObject();\n loadData();\n return v;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View root = inflater.inflate(R.layout.fragment_complete, container, false);\n x.view().inject(this, root);\n initUserNameEditText();\n initSexLayout();\n return root;\n }",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n myView = inflater.inflate(R.layout.fragment_sensor_data, container, false);\r\n\r\n tvSensorName = (TextView) myView.findViewById(R.id.tvSensorName);\r\n tvSensorVendor = (TextView) myView.findViewById(R.id.tvSensorVendor);\r\n tvSensorVersion = (TextView) myView.findViewById(R.id.tvSensorVersion);\r\n tvSensorMinDelay = (TextView) myView.findViewById(R.id.tvSensorMinDelay);\r\n tvSensorMaxDelay = (TextView) myView.findViewById(R.id.tvSensorMaxDelay);\r\n tvSensorRange = (TextView) myView.findViewById(R.id.tvSensorRange);\r\n tvSensorPower = (TextView) myView.findViewById(R.id.tvSensorPower);\r\n tvSensorWakeUp = (TextView) myView.findViewById(R.id.tvSensorWakeUp);\r\n tvSensorResolution = (TextView) myView.findViewById(R.id.tvSensorResolution);\r\n\r\n btnStart = (Button) myView.findViewById(R.id.btnStart);\r\n btnStop = (Button) myView.findViewById(R.id.btnStop);\r\n\r\n init();\r\n registerListeners();\r\n\r\n return myView;\r\n }",
"@Override\n protected void initView() {\n pushTxt = (TextView) findViewById(R.id.push_txt);\n pushActivity = (TextView)findViewById(R.id.push_activity);\n pushArticle = (TextView)findViewById(R.id.push_article);\n pushProduce = (TextView)findViewById(R.id.push_produce);\n\n\n pushTxt.setOnClickListener(this);\n pushActivity.setOnClickListener(this);\n pushArticle.setOnClickListener(this);\n pushProduce.setOnClickListener(this);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_che_yuan_list, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n initListener();\n return view;\n }",
"private void initFragment(View v) {\n spotDescription = v.findViewById(R.id.spotDescription);\n spotName = v.findViewById(R.id.spotName);\n spotCreator = v.findViewById(R.id.creatorText);\n spotCategory = v.findViewById(R.id.spotCategory);\n removeBtn = v.findViewById(R.id.removeBtn);\n\n // Checks if the spot is owned by the current user, if it is the remove spot button appears and becomes activated\n // Otherwise it will not appear nor be activated\n if (currentSpot.getCreatorId().equals(CurrentRun.getActiveUser().getId())) {\n removeBtn.setVisibility(View.VISIBLE);\n removeBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n database.removeSpot(getActivity().getIntent().getStringExtra(\"SpotId\"));\n\n //closes the activity and returns to previous\n getActivity().onBackPressed();\n }\n });\n\n } else {\n removeBtn.setVisibility(View.GONE);\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_lecturers, container, false);\n Bundle bundle = getArguments();\n idST = bundle.getInt(\"ID_ST\");\n addControls(v);\n addEvents();\n return v;\n }",
"private void viewInit() {\n }",
"@Override\n protected void initView()\n {\n ed_name = findView(R.id.ed_name);\n ed_bank = findView(R.id.ed_bank);\n ed_bank_card = findView(R.id.ed_bank_card);\n ed_bank_name = findView(R.id.ed_bank_name);\n btn_submit = findView(R.id.btn_submit);\n findView(R.id.ib_back).setOnClickListener(this);\n Toolbar toolbar = findView(R.id.toolbar);\n setSupportActionBar(toolbar);\n\n }",
"private void initViews(){\n rootView = View.inflate(getContext(), R.layout.fragment_titles, null);\n unbinder = ButterKnife.bind(this, rootView);\n listener = new TitleListener() {\n @Override\n public void onClick(View view, int position, String id , String label) {\n Intent intent = new Intent();\n intent.putExtra(MEConstants.TITLE_ID, id);\n intent.putExtra(MEConstants.TITLE_LABEL , label);\n\n getTargetFragment().onActivityResult(getTargetRequestCode() , 109 , intent);\n\n dismiss();\n }\n };\n if(!DeviceConnectivity.isNetworkAvailable(getContext())) {\n loader.setVisibility(View.GONE);\n noTitles.setVisibility(View.GONE);\n llConnectivityDialog.setVisibility(View.VISIBLE);\n llTitles.setVisibility(View.GONE);\n } else {\n getTitlesWS();\n }\n }",
"@Override\n\tpublic void initView() {\n\t\t\n\t}",
"private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}",
"private void initListFragmentViews(View view) {\n listView = view.findViewById(R.id.fragment_LAY_list);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n inflate = inflater.inflate(R.layout.fragment_kecheng, container, false);\n bind = ButterKnife.bind(this, inflate);\n initView();\n initData();\n initListener();\n return inflate;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_site_progress_add, container, false);\n setHasOptionsMenu(true);\n ButterKnife.bind(this, view);\n\n initializeUI();\n bindData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n if (view == null) {\n view = inflater.inflate(R.layout.fragment_select_type, container, false);\n ButterKnife.bind(this, view);\n initView();\n }\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n View view = inflater.inflate(R.layout.fragment_guan_lxswei_shen, container, false);\n ButterKnife.bind(this, view);\n init();\n return view;\n }",
"public void initView()\n {\n try {\n MainActivity hs = (MainActivity) getActivity();\n BookingsHistoryFragment mof = (BookingsHistoryFragment) hs.fragment;\n bookingsHistoryList = mof.unAssignedBookings;\n bookingDetailsList = mof.unAssignedBookingDetails;\n size = mof.unassignedBookingsList.size();\n\n unassignedBookingsAdapter = new UnassignedBookingsAdapter(getActivity(), bookingsHistoryList, bookingDetailsList, view);\n lv_history_bookings.setAdapter(unassignedBookingsAdapter);\n lv_history_bookings.setOnItemClickListener(unassignedBookingsAdapter);\n\n hideView(size);\n tv_history_run_now.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ((MainActivity) getActivity()).displayView(1);\n }\n });\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }",
"@Override\r\n protected void initListener() {\r\n backiv.setOnClickListener(this);\r\n mSetMainbtn.setOnClickListener(this);\r\n// mSetTerminalBtn.setOnClickListener(this);\r\n// mTerminalipSp3.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner3Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n// mTerminalipSp5.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner5Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n }",
"private void initView(View view) {\n mRecyclerView = view.findViewById(R.id.recycler_view);\n mSearchView = view.findViewById(R.id.search_view);\n mFloatingActionButton = view.findViewById(R.id.message_floating_action_button);\n }",
"@Override\n\tprotected void initUi(View view) {\n\t\tImagesArray = new ArrayList<Integer>();\n\t\tslider_text = (TextView) view.findViewById(R.id.slider_text);\n\t\tmPager = (ViewPager) view.findViewById(R.id.pager);\n\t\tindicator = (CircleIndicator) view.findViewById(R.id.indicator);\n\t\t\n\t\t\n\t\tinit();\n\t}",
"private void initViews() {\n\n }",
"@Override\n\tprotected void initView(Bundle savedInstanceState) {\n\t\tsuper.initView(savedInstanceState);\n\t\taCache = ACache.get(ForgetActivity.this);\n\t\tedittext = (EditText) findViewById(R.id.edittext);\n\t\tproving = (Button) findViewById(R.id.proving);\n\t\tproving.setOnClickListener(this);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_converter, container, false);\n mUnbinder = ButterKnife.bind(this, view);\n mPreferenceManager = DataManager.getInstance().getPreferenceManager();\n mDatabaseManager = DataManager.getInstance().getDatabaseManager();\n eTFirstValue.clearFocus();\n eTSecondValue.clearFocus();\n mTextWatcherAdapter = new TextWatcherAdapter(eTFirstValue, eTSecondValue, false, false,\n new TextWatcherAdapter.SomeAction() {\n @Override\n public void action() {\n convertValue();\n }\n });\n getDefaultData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bubble, container, false);\n unbinder = ButterKnife.bind(this, view);\n\n netView.setOnValueTouchListener(new ValueTouchListener());\n generateData();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }",
"private void initView() {\n\t\tlogin = (Button) pageViews.get(2).findViewById(R.id.sendbtn);\n\t\tlogin.setOnClickListener(this);\n\t}",
"void initializeUIComponents(View v);",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_lottery, container, false);\n\n lotteryButton = view.findViewById(R.id.lottery_use_button);\n lotteryInputText = view.findViewById(R.id.lottery_input_text);\n ticketsTv = view.findViewById(R.id.lottery_tickets_tv);\n rewardTv = view.findViewById(R.id.lottery_reward_tv);\n playerTv = view.findViewById(R.id.lottery_player_tv);\n\n lotteryButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onLotteryButtonClicked();\n }\n });\n init();\n return view;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_volunteer, container, false);\n\n ChangeCityButton = (TextView) view.findViewById(R.id.ChangeCityButton);\n ChangeFieldButton = (TextView) view.findViewById(R.id.ChangeFieldButton);\n SearchButton = (TextView) view.findViewById(R.id.SearchButton);\n\n MyListView = (GridView) view.findViewById(R.id.MyListView);\n NoDataTxt = (TextView) view.findViewById(R.id.NoDataTxt);\n progressBar = (ProgressBar) view.findViewById(R.id.progressBar);\n\n ChangeCityButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n OpenCitesDialog();\n\n }\n });\n\n ChangeFieldButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n OpenFilesDialog();\n\n }\n });\n\n SearchButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n OpenSearchDialog();\n }\n });\n\n initData(FinalCityName);\n\n return view;\n }",
"private void initView() {\n\t\tcb_show = (CheckBox) findViewById(R.id.cb_show);\r\n\t\tbtn_next = (Button) findViewById(R.id.btn_next);\r\n\t}",
"@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState)\r\n {\r\n super.onCreateView(inflater, container, savedInstanceState); \r\n View view = inflater.inflate(R.layout.fragment_quiz, container,false);\r\n \r\n fileNameList = new ArrayList<String>();\r\n quizCountriesList = new ArrayList<String>();\r\n random = new SecureRandom();\r\n handler = new Handler();\r\n // load the shake animation that's used for incorrect answers\r\n // animation repeats 3 times \r\n\r\n // get references to GUI components\r\n\r\n // configure listeners for the guess Buttons\r\n // set questionNumberTextView's text\r\n // returns the fragment's view for display\r\n }",
"private void initViews() {\n\n if (blockListAdapter != null) {\n blockListAdapter = null;\n }\n\n swipeRefreshLayout.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n rv_swipe_refresh_tv.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n rv_swipe_refresh_tv.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n noResultRefreshTextView.setOnClickListener(this);\n\n if (swipeRefreshLayout != null) {\n swipeRefreshLayout.post(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(true);\n firstNetworkCall();\n }\n });\n }\n\n btnBack.setOnClickListener(this);\n }",
"@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n super.onViewCreated(view, savedInstanceState);\n initViews(view);\n // L.e(TAG, \"msg: onViewCreated\" + city);\n }",
"private void setupUi(View v) {\n\t \t\ttxtsurname = (TextView) v.findViewById(R.id.surnametxt);\n\t \t\ttxtforename = (TextView) v.findViewById(R.id.nametxt);\n\t \t\ttxtsubject = (TextView) v.findViewById(R.id.subjecttxt);\n\t \t\tupdate = (TextView) v.findViewById(R.id.notimelisttxt);\n\t}",
"private void initUi(View view) {\n mTvWindValue = view.findViewById(R.id.tv_wind_value);\n mTvCloudinessValue = view.findViewById(R.id.tv_cloudiness_value);\n mTvPressureValue = view.findViewById(R.id.tv_pressure_value);\n mTvHumidityValue = view.findViewById(R.id.tv_humidity_value);\n mTvState = view.findViewById(R.id.tv_state_name);\n mTvCountry = view.findViewById(R.id.tv_country_name);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_synchronous_content, container, false);\n ButterKnife.bind(this, view);\n\n initProgress();\n return view;\n }",
"@SuppressWarnings(\"UnusedParameters\")\n private void initInstances(View rootView, Bundle savedInstanceState) {\n ButterKnife.bind(this, rootView);\n adapter = new MessageAdapter();\n listView.setAdapter(adapter);\n loadMessage();\n initListener();\n }",
"private void initViews(View view) {\n\n tvEmptyView = view.findViewById(R.id.tv_empty_view);\n swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipe_refresh_layout);\n\n contentLayout = view.findViewById(R.id.content_layout);\n\n RecyclerView.LayoutManager manager = new LinearLayoutManager(view.getContext());\n RecyclerView mRecyclerView = (RecyclerView) contentLayout;\n mRecyclerView.setLayoutManager(manager);\n\n String sportsType = getRequestParameters().get(ScoresContentHandler.PARAM_SPORTS_TYPE);\n mAdapter = new BroadcastListAdapter(sportsType, commentaries, view.getContext());\n mRecyclerView.setAdapter(mAdapter);\n mAdapter.notifyDataSetChanged();\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n\n @Override\n public void onRefresh() {\n requestContent();\n }\n\n });\n }"
] | [
"0.7258033",
"0.7113446",
"0.7110147",
"0.7061933",
"0.70589244",
"0.696234",
"0.6941513",
"0.69050634",
"0.68705994",
"0.6846464",
"0.6784766",
"0.67831117",
"0.67818475",
"0.67802566",
"0.67449623",
"0.67278785",
"0.6710552",
"0.66878814",
"0.66681546",
"0.6662065",
"0.66475755",
"0.6628452",
"0.66177917",
"0.6615779",
"0.659139",
"0.6588992",
"0.6585713",
"0.6580831",
"0.65702856",
"0.6565728",
"0.655164",
"0.65267956",
"0.6520962",
"0.6520962",
"0.6515371",
"0.6514528",
"0.65110743",
"0.6506955",
"0.64855534",
"0.64823705",
"0.64794004",
"0.6474089",
"0.64661855",
"0.6460315",
"0.64567405",
"0.6445235",
"0.64444184",
"0.64390826",
"0.64358073",
"0.6434284",
"0.64307946",
"0.6422587",
"0.6416293",
"0.6416139",
"0.64149314",
"0.64089954",
"0.6400933",
"0.6400933",
"0.6398389",
"0.6397139",
"0.6394704",
"0.6389411",
"0.6380751",
"0.6380683",
"0.6380056",
"0.637747",
"0.63750714",
"0.63726383",
"0.63722193",
"0.6371633",
"0.63606673",
"0.63593376",
"0.6356956",
"0.6353978",
"0.6352423",
"0.6350736",
"0.6347491",
"0.6342343",
"0.6333438",
"0.63307416",
"0.6319639",
"0.6312427",
"0.6308607",
"0.6307194",
"0.62995464",
"0.6299392",
"0.6296042",
"0.62945634",
"0.6292931",
"0.62909764",
"0.6287024",
"0.628633",
"0.62795544",
"0.62763476",
"0.62755895",
"0.6271452",
"0.62699795",
"0.6269066",
"0.62680906",
"0.62676346",
"0.62622505"
] | 0.0 | -1 |
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information. | public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
public void onFragmentInteraction(Uri uri);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}",
"public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}",
"public interface IFragmentView {\n public Activity getActivity();\n public void onItemClick(int position);\n}",
"public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n if (context instanceof RequestFragmentInterface) {\n mInterface = (RequestFragmentInterface) context;\n } else {\n throw new RuntimeException(context.toString()\n + \" must implement OnFragmentInteractionListener\");\n }\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onCallBellPressed(MessageReason reason);\n }",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"void onFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onComidaSelected(int comidaId);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }",
"public interface OnFragmentInteractionListener {\n void onReceiverAcceptRequest(int nextState, String requestId);\n }",
"public interface FragMainLife\n{\n\tpublic void onResumeFragMainLife();\n}",
"public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}",
"public interface IBaseFragmentActivity {\n void onFragmentExit(BaseFragment fragment);\n\n void onFragmentStartLoading(BaseFragment fragment);\n\n void onFragmentFinishLoad(BaseFragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }",
"void onFragmentInteraction(Object ref);",
"public interface OnParametersFragmentInteractionListener {\n public void startTask();\n }",
"public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Parcelable selectedItem);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }",
"public interface FragmentInterface {\r\n void fragmentBecameVisible();\r\n}",
"public interface OnFragmentInteractionListener {\n void newList();\n\n void searchList();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void pasarALista();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }",
"public interface MainGameActivityCallBacks {\n public void onMsgFromFragmentToMainGame(String sender, String strValue);\n}",
"public interface IFragment {\n void onFragmentRefresh();\n\n void onMenuClick();\n}",
"public interface FragmentInterface {\n\n void onCreate();\n\n void initLayout();\n\n void updateLayout();\n\n void sendInitialRequest();\n}",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(String accessToken, String network);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }",
"public interface OnFragmentInteractionListener {\n void swapFragments(SetupActivity.SetupActivityFragmentType type);\n\n void addServer(String name, String ipAddress, String port);\n }",
"public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}",
"public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface PersonalFragmentView extends BaseMvpView {\n\n}",
"public interface OnFragmentInteractionListener {\n void onFinishCreatingRequest();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }",
"void onFragmentInteraction(View v);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList<Recepie> recepieList);\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }",
"void onFragmentInteractionMain();",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void showRestaurantDetail(Map<String, Object> objectMap);\n\n public void showAddRestaurantFragment(String location);\n }",
"public interface FragmentNavigator {\n\n void SwitchFragment(Fragment fragment);\n}",
"public interface FragmentModellnt {\n void FragmentM(OnFinishListener onFinishListener,String dataId);\n}",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }",
"void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(ArrayList naleznosci, String KLUCZ);\n }",
"public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }",
"public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onEditFragmentInteraction(Student student);\r\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}",
"public interface IBaseFragment extends IBaseView {\n /**\n * 出栈到目标fragment\n * @param targetFragmentClass 目标fragment\n * @param includeTargetFragment 是否包涵目标fragment\n * true 目标fragment也出栈\n * false 出栈到目标fragment,目标fragment不出栈\n */\n void popToFragment(Class<?> targetFragmentClass, boolean includeTargetFragment);\n\n /**\n * 跳转到新的fragment\n * @param supportFragment 新的fragment继承SupportFragment\n */\n void startNewFragment(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并出栈当前fragment\n * @param supportFragment\n */\n void startNewFragmentWithPop(@NonNull SupportFragment supportFragment);\n\n /**\n * 跳转到新的fragment并返回结果\n * @param supportFragment\n * @param requestCode\n */\n void startNewFragmentForResult(@NonNull SupportFragment supportFragment,int requestCode);\n\n /**\n * 设置fragment返回的result\n * @param requestCode\n * @param bundle\n */\n void setOnFragmentResult(int requestCode, Bundle bundle);\n\n /**\n * 跳转到新的Activity\n * @param clz\n */\n void startNewActivity(@NonNull Class<?> clz);\n\n /**\n * 携带数据跳转到新的Activity\n * @param clz\n * @param bundle\n */\n void startNewActivity(@NonNull Class<?> clz,Bundle bundle);\n\n /**\n * 携带数据跳转到新的Activity并返回结果\n * @param clz\n * @param bundle\n * @param requestCode\n */\n void startNewActivityForResult(@NonNull Class<?> clz,Bundle bundle,int requestCode);\n\n /**\n * 当前Fragment是否可见\n * @return true 可见,false 不可见\n */\n boolean isVisiable();\n\n /**\n * 获取当前fragment绑定的activity\n * @return\n */\n Activity getBindActivity();\n\n}",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public void onFragmentInteraction(String id);",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onSocialLoginInteraction();\n }",
"public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentListener {\n void onClick(Fragment fragment);\n}",
"public interface OnFragmentInteractionListener {\n void playGame(Uri location);\n }",
"public interface LoginFragmentListener {\n public void OnRegisterClicked();\n public void OnLoginClicked(String User, String Pass);\n}",
"public interface MoveFragment {\n\n\n public void moveFragment(Fragment selectedFragment);\n\n}",
"public interface ChangeFragmentListener {\n void changeFragment();\n}",
"public interface OnProductItemFragmentInteraction{\r\n public void itemSelected(Producto product);\r\n }",
"public interface FragmentInterface {\n public void fragmentResult(Fragment fragment, String title);\n}",
"@Override\n public void onAttach(Context context) {\n super.onAttach(context);\n //this registers this fragment to recieve any EventBus\n EventBus.getDefault().register(this);\n }",
"void onFragmentInteraction(int position);",
"public interface AddFarmFragmentView extends BaseView {\n\n\n}",
"void OpenFragmentInteraction();",
"public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}",
"public interface FragmentDataObserver {\n void getDataFromActivity(String data);\n\n}",
"public interface OnFragInteractionListener {\n\n // replace top fragment with this fragment\n interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }\n\n // interface for WifiPresenterFragment\n interface OnWifiScanFragInteractionListener {\n void onGetDataAfterScanWifi(ArrayList<WifiLocationModel> list);\n void onAllowToSaveWifiHotspotToDb(String ssid, String pass, String encryption, String bssid);\n }\n\n // interface for HistoryPresenterFragment\n interface OnHistoryFragInteractionListener {\n // get wifi info\n void onGetWifiHistoryCursor(Cursor cursor);\n // get mobile network generation\n void onGetMobileHistoryCursor(Cursor cursor);\n // get wifi state and date\n void onGetWifiStateAndDateCursor(Cursor cursor);\n }\n\n interface OnMapFragInteractionListerer {\n void onGetWifiLocationCursor(Cursor cursor);\n }\n}",
"public interface PesonageFragmentView extends MvpView {\n\n}",
"public interface OnUsersFragmentInteractionListener {\n void onListFragmentInteraction(User item);\n }",
"public interface MainScreeInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteractionMain();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onClickNextTurn();\n }",
"public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n\n void changeBottomNavSelection(int menuItem);\n }",
"public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }",
"public interface OnFragmentInteractionListener {\n void onSignoutClicked();\n\n void onExtraScopeRequested();\n }",
"interface OnMainFragInteractionListener {\n void onWifiFragReplace();\n void onHistoryFragReplace();\n void onHistoryWithOsmMapFragReplace();\n void onMainFragReplace();\n }",
"public interface OnListFragmentInteractionListener {\n void onListFragmentInteraction(Note note);\n}"
] | [
"0.73242587",
"0.7207157",
"0.7134114",
"0.7123764",
"0.7121726",
"0.7014918",
"0.6975962",
"0.6975962",
"0.6975962",
"0.6973587",
"0.6967293",
"0.6965417",
"0.696113",
"0.6953493",
"0.69438833",
"0.69327354",
"0.6929035",
"0.69262755",
"0.6922307",
"0.69098157",
"0.69022554",
"0.689648",
"0.6894067",
"0.6880956",
"0.68807626",
"0.6874631",
"0.6864042",
"0.6860734",
"0.6859784",
"0.68570393",
"0.6853744",
"0.6843851",
"0.68394977",
"0.68301433",
"0.6817486",
"0.68163913",
"0.6808383",
"0.6785709",
"0.67691374",
"0.67691374",
"0.67691374",
"0.67691374",
"0.67691374",
"0.67691374",
"0.67691374",
"0.67691374",
"0.67691374",
"0.6768808",
"0.6766172",
"0.6761142",
"0.67550904",
"0.675295",
"0.6697695",
"0.6679752",
"0.66733176",
"0.6670102",
"0.66693926",
"0.6660748",
"0.6660726",
"0.6654885",
"0.6651236",
"0.66433877",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.6643236",
"0.66379684",
"0.6635534",
"0.66306615",
"0.6624841",
"0.66243136",
"0.6616408",
"0.6608957",
"0.66080046",
"0.6607876",
"0.660534",
"0.65968454",
"0.6595129",
"0.6586934",
"0.6571949",
"0.6568327",
"0.6559203",
"0.65582156",
"0.65541136",
"0.6549386",
"0.6548291",
"0.6542688",
"0.65379745",
"0.6533734",
"0.6533734",
"0.6533734",
"0.6519062",
"0.65165925",
"0.6515555"
] | 0.0 | -1 |
TODO: Update argument type and name | public void onFragmentInteraction(Uri uri); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public String getFirstArg() {\n return name;\r\n }",
"@Override\n public int getNumberArguments() {\n return 1;\n }",
"java.lang.String getArg();",
"@Override\n public int getArgLength() {\n return 4;\n }",
"Argument createArgument();",
"@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}",
"@Override\n protected PacketArgs.ArgumentType[] getArgumentTypes() {\n return new PacketArgs.ArgumentType[] { PacketArgs.ArgumentType.String };\n }",
"@Override\n\tpublic void traverseArg(UniArg node) {\n\t}",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FArgument src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"Object[] getArguments();",
"Object[] getArguments();",
"String getArguments();",
"@Override\n\tpublic void handleArgument(ArrayList<String> argument) {\n\t\t\n\t}",
"@Override\n public final int parseArguments(Parameters params) {\n return 1;\n }",
"ArgList createArgList();",
"public Object[] getArguments() { return args;}",
"@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }",
"@Override\n protected String getName() {return _parms.name;}",
"private static AbstractType<?>[] argumentsType(@Nullable StringType algorithmArgumentType)\n {\n return algorithmArgumentType == null\n ? DEFAULT_ARGUMENTS\n : new AbstractType<?>[]{ algorithmArgumentType };\n }",
"uicargs createuicargs();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();",
"public static void main(String[] args) {\n\t\t\tmeth(args);\r\n\t\t\targument_test:meth(args);\r\n\t}",
"@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}",
"public getType_args(getType_args other) {\n }",
"Object[] args();",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerator src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"protected void validateArguments( Object[] args ) throws ActionExecutionException {\n\n Annotation[][] annotations = method.getParameterAnnotations();\n for (int i = 0; i < annotations.length; i++) {\n\n Annotation[] paramAnnotations = annotations[i];\n\n for (Annotation paramAnnotation : paramAnnotations) {\n if (paramAnnotation instanceof Parameter) {\n Parameter paramDescriptionAnnotation = (Parameter) paramAnnotation;\n ValidationType validationType = paramDescriptionAnnotation.validation();\n\n String[] validationArgs;\n\n // if we are checking for valid constants, then the\n // args array should contain\n // the name of the array holding the valid constants\n if (validationType == ValidationType.STRING_CONSTANT\n || validationType == ValidationType.NUMBER_CONSTANT) {\n try {\n String arrayName = paramDescriptionAnnotation.args()[0];\n\n // get the field and set access level if\n // necessary\n Field arrayField = method.getDeclaringClass().getDeclaredField(arrayName);\n if (!arrayField.isAccessible()) {\n arrayField.setAccessible(true);\n }\n Object arrayValidConstants = arrayField.get(null);\n\n // convert the object array to string array\n String[] arrayValidConstatnsStr = new String[Array.getLength(arrayValidConstants)];\n for (int j = 0; j < Array.getLength(arrayValidConstants); j++) {\n arrayValidConstatnsStr[j] = Array.get(arrayValidConstants, j).toString();\n }\n\n validationArgs = arrayValidConstatnsStr;\n\n } catch (IndexOutOfBoundsException iobe) {\n // this is a fatal error\n throw new ActionExecutionException(\"You need to specify the name of the array with valid constants in the 'args' field of the Parameter annotation\");\n } catch (Exception e) {\n // this is a fatal error\n throw new ActionExecutionException(\"Could not get array with valid constants - action annotations are incorrect\");\n }\n } else {\n validationArgs = paramDescriptionAnnotation.args();\n }\n\n List<BaseType> typeValidators = createBaseTypes(paramDescriptionAnnotation.validation(),\n paramDescriptionAnnotation.name(),\n args[i], validationArgs);\n //perform validation\n for (BaseType baseType : typeValidators) {\n if (baseType != null) {\n try {\n baseType.validate();\n } catch (TypeException e) {\n throw new InvalidInputArgumentsException(\"Validation failed while validating argument \"\n + paramDescriptionAnnotation.name()\n + e.getMessage());\n }\n } else {\n log.warn(\"Could not perform validation on argument \"\n + paramDescriptionAnnotation.name());\n }\n }\n }\n }\n }\n }",
"@Test\n void getArgString() {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"@Override\n public void prepareArguments(ActionInvocation invocation)\n throws InvalidValueException {\n }",
"int getArgIndex();",
"@Override\n\tpublic void addArg(FormulaElement arg){\n\t}",
"public Type[] getArgumentTypes() {\n/* 236 */ return Type.getArgumentTypes(this.desc);\n/* */ }",
"@Override\n public Object[] getArguments() {\n return null;\n }",
"public login_1_argument() {\n }",
"Optional<String[]> arguments();",
"private Main(String... arguments) {\n this.operations = new ArrayDeque<>(List.of(arguments));\n }",
"@Override\n\tprotected GATKArgumentCollection getArgumentCollection() {\n\t\treturn argCollection;\n\t}",
"protected void sequence_Argument(ISerializationContext context, Argument semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, TdlPackage.Literals.ARGUMENT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TdlPackage.Literals.ARGUMENT__NAME));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getArgumentAccess().getNameSTRINGTerminalRuleCall_0_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}",
"void setArguments(String arguments);",
"@Override\n\tpublic List<String> getArgumentDesc() {\n\t\treturn desc;\n\t}",
"OpFunctionArgAgregate createOpFunctionArgAgregate();",
"protected abstract Feature<T,?> convertArgument(Class<?> parameterType, Feature<T,?> originalArgument);",
"void visitArgument(Argument argument);",
"public Thaw_args(Thaw_args other) {\r\n }",
"@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}",
"private static String getArgumentString(Object arg) {\n if (arg instanceof String) {\n return \"\\\\\\\"\"+arg+\"\\\\\\\"\";\n }\n else return arg.toString();\n }",
"public interface Param {\n\n int[] args();\n String exec(ExecutePack pack);\n String label();\n}",
"@Override\n public void verifyArgs(ArrayList<String> args) throws ArgumentFormatException {\n super.checkNumArgs(args);\n _args = true;\n }",
"public abstract ValidationResults validArguments(String[] arguments);",
"public ArgumentException() {\n super(\"Wrong arguments passed to function\");\n }",
"public String getArgumentString() {\n\t\treturn null;\n\t}",
"@Override\n public String kind() {\n return \"@param\";\n }",
"@Override\n\t\t\t\t\tpublic Parameter handleParameter(Method parent,\n\t\t\t\t\t\t\tEParamType direction, FEnumerationType src) {\n\t\t\t\t\t\treturn super.handleParameter(parent, direction, src);\n\t\t\t\t\t}",
"public void addArgumentTypeSerialization(String functionName, String argumentName, TensorType type) {\n wrappedSerializationContext.addArgumentTypeSerialization(functionName, argumentName, type);\n }",
"void setArgument(int idx,int v) \t\t{ setArgument(idx,Integer.valueOf(v)); }",
"@Override\n\tprotected byte[] getArgByte() {\n\t\treturn paramsJson.getBytes();\n\t}",
"void onArgumentsChanged();",
"com.google.protobuf.ByteString\n\t\tgetArgBytes();",
"MyArg(int value){\n this.value = value;\n }",
"@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }",
"public ArgList(Object arg1) {\n super(1);\n addElement(arg1);\n }",
"public Clear_args(Clear_args other) {\r\n }",
"private ParameterInformation processArgumentReference(Argument argument,\n List<NameDescriptionType> argTypeSet,\n SequenceEntryType seqEntry,\n int seqIndex)\n {\n ParameterInformation argumentInfo = null;\n\n // Initialize the argument's attributes\n String argName = argument.getName();\n String dataType = null;\n String arraySize = null;\n String bitLength = null;\n BigInteger argBitSize = null;\n String enumeration = null;\n String description = null;\n UnitSet unitSet = null;\n String units = null;\n String minimum = null;\n String maximum = null;\n\n // Step through each command argument type\n for (NameDescriptionType argType : argTypeSet)\n {\n // Check if this is the same command argument referenced in the argument list (by\n // matching the command and argument names between the two)\n if (argument.getArgumentTypeRef().equals(argType.getName()))\n {\n boolean isInteger = false;\n boolean isUnsigned = false;\n boolean isFloat = false;\n boolean isString = false;\n\n // Check if this is an array parameter\n if (seqEntry instanceof ArrayParameterRefEntryType)\n {\n arraySize = \"\";\n\n // Store the reference to the array parameter type\n ArrayDataTypeType arrayType = (ArrayDataTypeType) argType;\n argType = null;\n\n // Step through each dimension for the array variable\n for (Dimension dim : ((ArrayParameterRefEntryType) seqEntry).getDimensionList().getDimension())\n {\n // Check if the fixed value exists\n if (dim.getEndingIndex().getFixedValue() != null)\n {\n // Build the array size string\n arraySize += String.valueOf(Integer.valueOf(dim.getEndingIndex().getFixedValue()) + 1)\n + \",\";\n }\n }\n\n arraySize = CcddUtilities.removeTrailer(arraySize, \",\");\n\n // The array parameter type references a non-array parameter type that\n // describes the individual array members. Step through each data type in the\n // parameter type set in order to locate this data type entry\n for (NameDescriptionType type : argTypeSet)\n {\n // Check if the array parameter's array type reference matches the data\n // type name\n if (arrayType.getArrayTypeRef().equals(type.getName()))\n {\n // Store the reference to the array parameter's data type and stop\n // searching\n argType = type;\n break;\n }\n }\n }\n\n // Check if a data type entry for the parameter exists in the parameter type set\n // (note that if the parameter is an array the steps above locate the data type\n // entry for the individual array members)\n if (argType != null)\n {\n long dataTypeBitSize = 0;\n\n // Check if the argument is an integer data type\n if (argType instanceof IntegerArgumentType)\n {\n IntegerArgumentType icmd = (IntegerArgumentType) argType;\n\n // Get the number of bits occupied by the argument\n argBitSize = icmd.getSizeInBits();\n\n // Get the argument units reference\n unitSet = icmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (icmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n // Get the argument alarm\n IntegerArgumentType.ValidRangeSet alarmType = icmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<IntegerRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Store the minimum alarm value\n minimum = alarmRange.get(0).getMinInclusive();\n\n // Store the maximum alarm value\n maximum = alarmRange.get(0).getMaxInclusive();\n }\n }\n\n isInteger = true;\n }\n // Check if the argument is a floating point data type\n else if (argType instanceof FloatArgumentType)\n {\n // Get the float argument attributes\n FloatArgumentType fcmd = (FloatArgumentType) argType;\n dataTypeBitSize = fcmd.getSizeInBits().longValue();\n unitSet = fcmd.getUnitSet();\n\n // Get the argument alarm\n FloatArgumentType.ValidRangeSet alarmType = fcmd.getValidRangeSet();\n\n // Check if the argument has an alarm\n if (alarmType != null)\n {\n // Get the alarm range\n List<FloatRangeType> alarmRange = alarmType.getValidRange();\n\n // Check if the alarm range exists\n if (alarmRange != null)\n {\n // Get the minimum value\n Double min = alarmRange.get(0).getMinInclusive();\n\n // Check if a minimum value exists\n if (min != null)\n {\n // Get the minimum alarm value\n minimum = String.valueOf(min);\n }\n\n // Get the maximum value\n Double max = alarmRange.get(0).getMaxInclusive();\n\n // Check if a maximum value exists\n if (max != null)\n {\n // Get the maximum alarm value\n maximum = String.valueOf(max);\n }\n }\n }\n\n isFloat = true;\n }\n // Check if the argument is a string data type\n else if (argType instanceof StringDataType)\n {\n // Get the string argument attributes\n StringDataType scmd = (StringDataType) argType;\n dataTypeBitSize = Integer.valueOf(scmd.getStringDataEncoding()\n .getSizeInBits()\n .getFixed()\n .getFixedValue());\n unitSet = scmd.getUnitSet();\n isString = true;\n }\n // Check if the argument is an enumerated data type\n else if (argType instanceof EnumeratedDataType)\n {\n EnumeratedDataType ecmd = (EnumeratedDataType) argType;\n EnumerationList enumList = ecmd.getEnumerationList();\n\n // Check if any enumeration parameters are defined\n if (enumList != null)\n {\n // Step through each enumeration parameter\n for (ValueEnumerationType enumType : enumList.getEnumeration())\n {\n // Check if this is the first parameter\n if (enumeration == null)\n {\n // Initialize the enumeration string\n enumeration = \"\";\n }\n // Not the first parameter\n else\n {\n // Add the separator for the enumerations\n enumeration += \", \";\n }\n\n // Begin building this enumeration\n enumeration += enumType.getValue() + \" | \" + enumType.getLabel();\n }\n\n argBitSize = ecmd.getIntegerDataEncoding().getSizeInBits();\n unitSet = ecmd.getUnitSet();\n\n // Check if integer encoding is set to 'unsigned'\n if (ecmd.getIntegerDataEncoding().getEncoding().equalsIgnoreCase(\"unsigned\"))\n {\n isUnsigned = true;\n }\n\n // Determine the smallest integer size that contains the number of bits\n // occupied by the argument\n dataTypeBitSize = 8;\n\n while (argBitSize.longValue() > dataTypeBitSize)\n {\n dataTypeBitSize *= 2;\n }\n\n isInteger = true;\n }\n }\n\n // Get the name of the data type from the data type table that matches the base\n // type and size of the parameter\n dataType = getMatchingDataType(dataTypeBitSize / 8,\n isInteger,\n isUnsigned,\n isFloat,\n isString,\n dataTypeHandler);\n\n // Check if the description exists\n if (argType.getLongDescription() != null)\n {\n // Store the description\n description = argType.getLongDescription();\n }\n\n // Check if the argument bit size exists\n if (argBitSize != null && argBitSize.longValue() != dataTypeBitSize)\n {\n // Store the bit length\n bitLength = argBitSize.toString();\n }\n\n // Check if the units exists\n if (unitSet != null)\n {\n List<UnitType> unitType = unitSet.getUnit();\n\n // Check if the units is set\n if (!unitType.isEmpty())\n {\n // Store the units\n units = unitType.get(0).getContent();\n }\n }\n\n argumentInfo = new ParameterInformation(argName,\n dataType,\n arraySize,\n bitLength,\n enumeration,\n units,\n minimum,\n maximum,\n description,\n 0,\n seqIndex);\n }\n\n break;\n }\n }\n\n return argumentInfo;\n }",
"public abstract interface QueryArgs {\n\n /** Return the catalog associated with this object */\n public Catalog getCatalog();\n\n /** Set the value for the ith parameter */\n public void setParamValue(int i, Object value);\n\n /** Set the value for the parameter with the given label */\n public void setParamValue(String label, Object value);\n\n /** Set the min and max values for the parameter with the given label */\n public void setParamValueRange(String label, Object minValue, Object maxValue);\n\n /** Set the int value for the parameter with the given label */\n public void setParamValue(String label, int value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValue(String label, double value);\n\n /** Set the double value for the parameter with the given label */\n public void setParamValueRange(String label, double minValue, double maxValue);\n\n /** Set the array of parameter values directly. */\n public void setParamValues(Object[] values);\n\n /** Get the value of the ith parameter */\n public Object getParamValue(int i);\n\n /** Get the value of the named parameter\n *\n * @param label the parameter name or id\n * @return the value of the parameter, or null if not specified\n */\n public Object getParamValue(String label);\n\n /**\n * Get the value of the named parameter as an integer.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public int getParamValueAsInt(String label, int defaultValue);\n\n /**\n * Get the value of the named parameter as a double.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public double getParamValueAsDouble(String label, double defaultValue);\n\n /**\n * Get the value of the named parameter as a String.\n *\n * @param label the parameter label\n * @param defaultValue the default value, if the parameter was not specified\n * @return the value of the parameter\n */\n public String getParamValueAsString(String label, String defaultValue);\n\n\n /**\n * Return the object id being searched for, or null if none was defined.\n */\n public String getId();\n\n /**\n * Set the object id to search for.\n */\n public void setId(String id);\n\n\n /**\n * Return an object describing the query region (center position and\n * radius range), or null if none was defined.\n */\n public CoordinateRadius getRegion();\n\n /**\n * Set the query region (center position and radius range) for\n * the search.\n */\n public void setRegion(CoordinateRadius region);\n\n\n /**\n * Return an array of SearchCondition objects indicating the\n * values or range of values to search for.\n */\n public SearchCondition[] getConditions();\n\n /** Returns the max number of rows to be returned from a table query */\n public int getMaxRows();\n\n /** Set the max number of rows to be returned from a table query */\n public void setMaxRows(int maxRows);\n\n\n /** Returns the query type (an optional string, which may be interpreted by some catalogs) */\n public String getQueryType();\n\n /** Set the query type (an optional string, which may be interpreted by some catalogs) */\n public void setQueryType(String queryType);\n\n /**\n * Returns a copy of this object\n */\n public QueryArgs copy();\n\n /**\n * Optional: If not null, use this object for displaying the progress of the background query\n */\n public StatusLogger getStatusLogger();\n}",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n public void doExeception(Map<String, Object> args)\n {\n \n }",
"@Override\n\tprotected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() {\n\t\treturn Arrays.asList(new VCFWriterArgumentTypeDescriptor(engine, System.out, bisulfiteArgumentSources), new SAMReaderArgumentTypeDescriptor(engine),\n\t\t\t\tnew SAMFileWriterArgumentTypeDescriptor(engine, System.out), new OutputStreamArgumentTypeDescriptor(engine, System.out));\n\t}",
"@Override\n public int getArgent() {\n return _argent;\n }",
"private static @NonNull String resolveInputName(@NonNull Argument<?> argument) {\n String inputName = argument.getAnnotationMetadata().stringValue(Bindable.NAME).orElse(null);\n if (StringUtils.isEmpty(inputName)) {\n inputName = argument.getName();\n }\n return inputName;\n }",
"private Object[] getArguments (String className, Object field)\n\t{\n\t\treturn ((field == null) ? new Object[]{className} : \n\t\t\tnew Object[]{className, field});\n\t}",
"PermissionSerializer (GetArg arg) throws IOException, ClassNotFoundException {\n\tthis( \n\t create(\n\t\targ.get(\"targetType\", null, Class.class),\n\t\targ.get(\"type\", null, String.class),\n\t\targ.get(\"targetName\", null, String.class),\n\t\targ.get(\"targetActions\", null, String.class) \n\t )\n\t);\n }",
"public String argTypes() {\n return \"I\";//NOI18N\n }",
"public Type getArgumentDirection() {\n return direction;\n }",
"public static void main(String arg[]) {\n\n }",
"godot.wire.Wire.Value getArgs(int index);",
"@Override\n protected String[] getArguments() {\n String[] args = new String[1];\n args[0] = _game_file_name;\n return args;\n }",
"private Argument(Builder builder) {\n super(builder);\n }",
"public void setArgs(java.lang.String value) {\n this.args = value;\n }",
"@Override\n public void execute(String[] args) {\n\n }",
"@Override\n\tprotected final void setFromArgument(CommandContext<ServerCommandSource> context, String name) {\n\t}",
"UUID createArgument(ArgumentCreateRequest request);",
"@Override\n public void initialise(String[] arguments) {\n\n }",
"public static ParameterExpression parameter(Class type, String name) { throw Extensions.todo(); }",
"protected abstract void parseArgs() throws IOException;"
] | [
"0.71620077",
"0.69440025",
"0.6711487",
"0.6510869",
"0.6395964",
"0.637318",
"0.6347982",
"0.63172585",
"0.626037",
"0.6206126",
"0.6206126",
"0.6204428",
"0.6196331",
"0.61786395",
"0.617723",
"0.61509335",
"0.614605",
"0.61263025",
"0.6074019",
"0.6056265",
"0.59894925",
"0.59894925",
"0.5982372",
"0.59784126",
"0.5976578",
"0.59514225",
"0.5946062",
"0.5945854",
"0.59451884",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.59345317",
"0.5907128",
"0.58901805",
"0.58811074",
"0.5870056",
"0.5866255",
"0.5857818",
"0.58502215",
"0.58372456",
"0.58065504",
"0.5803388",
"0.5794962",
"0.57822233",
"0.57652336",
"0.57551724",
"0.5747548",
"0.5740826",
"0.5729332",
"0.57288444",
"0.5715425",
"0.57104665",
"0.5696492",
"0.5675817",
"0.56724477",
"0.5665729",
"0.5661573",
"0.5659701",
"0.5652922",
"0.5648713",
"0.564161",
"0.56359",
"0.5633436",
"0.56217945",
"0.5620876",
"0.5615735",
"0.5612703",
"0.5604706",
"0.5604706",
"0.56031877",
"0.56012666",
"0.5597895",
"0.5589867",
"0.5587258",
"0.5582892",
"0.5581103",
"0.5567564",
"0.55617505",
"0.55564237",
"0.55520123",
"0.55498207",
"0.5538131",
"0.5536699",
"0.5526077",
"0.55113447",
"0.5509267",
"0.550175"
] | 0.0 | -1 |
Assign all id's to the appropriate variables. | public void setupWidgets(){
// Checkboxes
CheckBox checkBonus = (CheckBox) getActivity().findViewById(R.id.eCheck_StackYellow);
CheckBox checkYellowTop = (CheckBox) getActivity().findViewById(R.id.eCheck_StackTop);
CheckBox checkYellowBottom = (CheckBox) getActivity().findViewById(R.id.eCheck_StackBottom);
CheckBox checkHP = (CheckBox) getActivity().findViewById(R.id.eCheck_AbleCollect);
CheckBox checkStacker = (CheckBox) getActivity().findViewById(R.id.eCheck_Stacker);
CheckBox checkHerder = (CheckBox) getActivity().findViewById(R.id.eCheck_Herder);
CheckBox checkBinSpecialist = (CheckBox) getActivity().findViewById(R.id.eCheck_BinSpecialist);
CheckBox checkNoodleSpecialist = (CheckBox) getActivity().findViewById(R.id.eCheck_NoodleSpecialist);
CheckBox checkInbound = (CheckBox) getActivity().findViewById(R.id.eCheck_Inbound);
CheckBox checkOther = (CheckBox) getActivity().findViewById(R.id.eCheck_Other);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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}",
"public void assignIDtoVM(){\n\t\tint count = 0;\n\t\tfor(VirtualMachine aux : vms)\n\t\t\taux.setId(id + Integer.toString(count++));\n\t}",
"public void assignId(int id);",
"@Override\n protected void assignTypes(Multiset<JReferenceType> typesWithReferenceCounts) {\n assignId(program.getJavaScriptObject());\n assignId(program.getTypeJavaLangObject());\n assignId(program.getTypeJavaLangString());\n\n for (JType type : typesWithReferenceCounts) {\n assignId(type);\n }\n }",
"private void setComponentsId(){\n this.tableA.setId(1);\n this.horizontalScrollViewB.setId(2);\n this.scrollViewC.setId(3);\n this.scrollViewD.setId(4);\n }",
"@Override\n public void prepare(Map conf) {\n this.idToAssignment = new ConcurrentHashMap<>();\n this.idToName = new ConcurrentHashMap<>();\n this.nameToId = new ConcurrentHashMap<>();\n }",
"private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}",
"void id(int id, id id, int id) {}",
"public void setId(int i) { id = i; }",
"private void setIds(Label greeting, LogoutButton logout, LanguageSelector languageSelector, ThemeSelector themeSelector){\n\t\t\n\t\tgreeting.setId(T.system(\"ID_LABEL_GREETING\"));\n\t\tif(logout != null){\n\t\t\tlogout.setId(T.system(\"ID_BUTTON_LOGOUT\"));\n\t\t}\n\t\tlanguageSelector.setId(T.system(\"ID_COMBOBOX_LANGUAGE_SELECTOR\"));\n\t\tthemeSelector.setId(T.system(\"ID_COMBOBOX_THEME_SELECTOR\"));\n\t\t\n\t}",
"public static void initializeVariables() {\n // System.out.println(\"initializeVariables()\");\n for (int i = 1; i <= 20; i++) {\n\n\n List<Variable> variablecopies = new LinkedList<Variable>();\n List<Integer> siteList = new LinkedList<Integer>();\n\n Variable var = null;\n if (i % 2 == 0) {\n for (int j = 1; j <= 10; j++) {\n sites.get(j).addVariable(i, 10 * i);\n var = sites.get(j).getVariable(i);\n siteList.add(j);\n variablecopies.add(var);\n }\n } else {\n for (int j = 1; j <= 10; j++) {\n if (j == 1 + i % 10) {\n sites.get(j).addVariable(i, 10 * i);\n var = sites.get(j).getVariable(i);\n variablecopies.add(var);\n siteList.add(j);\n }\n }\n }\n variable_site_map.put(i, siteList);\n variable_copies_map.put(i, variablecopies);\n }\n }",
"protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }",
"@Override\n protected void assignTypes(Multiset<JReferenceType> typesWithReferenceCounts) {\n assignId(program.getJavaScriptObject());\n assignId(program.getTypeJavaLangObject());\n assignId(program.getTypeJavaLangString());\n\n ImmutableMultiset<JReferenceType> typesOrderedByFrequency =\n Multisets.copyHighestCountFirst(typesWithReferenceCounts);\n for (JType type : typesOrderedByFrequency) {\n assignId(type);\n }\n }",
"public void updateIdentities() {\n // get a list of the internal conversation addresses\n ArrayList<String> addresses = new ArrayList<>();\n for (int i = 0; i < size(); i++)\n addresses.add(get(i).getFromAddress());\n\n // retrieve and set the identities of the internal addresses\n ArrayList<String> identities = retrieveIdentities(addresses);\n for (int i = 0; i < size(); i++)\n get(i).setIdentity(identities.get(i));\n }",
"id(int id, id id, int id) {}",
"public void resetInfoIds()\n\t{\n\t\tthis.resetSuggestedIds();\n\t\tthis.resetFreeIds();\n\t}",
"private void setId(Integer id) { this.id = id; }",
"public void setIDsforViews(){\n\n chequingAccountTV = findViewById(R.id.chequingAccountTV);\n savingsAndTaxesTV = findViewById(R.id.savingsAndTaxesTV);\n rainyDayFunTV = findViewById(R.id.rainyDayFunTV);\n travelSavingsTv = findViewById(R.id.travelSavingsTv);\n personalDevelopmentSavingsTV = findViewById(R.id.personalDevelopmentSavingsTV);\n investmentsTV = findViewById(R.id.investmentsTV);\n primaryHomeAmountTV = findViewById(R.id.primaryHomeAmountTV);\n secondaryHomeAmountTV = findViewById(R.id.secondaryHomeAmountTV);\n\n chequingAccount = findViewById(R.id.chequingAccount);\n savingsAndTaxesAmount = findViewById(R.id.savingsAndTaxesAmount);\n rainyDayFund = findViewById(R.id.rainyDayFund);\n travelSavings = findViewById(R.id.travelSavings);\n personalDevelopmentSavings = findViewById(R.id.personalDevelopmentSavings);\n investments = findViewById(R.id.investments);\n primaryHomeAmount = findViewById(R.id.primaryHomeAmount);\n secondaryHomeAmount = findViewById(R.id.secondaryHomeAmount);\n //assetsTable = findViewById(R.id.selectedAssetOrLiabilityTable);\n\n }",
"void assignIDs(final BinaryPropertyListWriter out) {\n out.assignID(this);\n }",
"private void setTrackDescriptionsAndID() {\n\t\t// Compute new definitions for all tracks\n\t\tllahTrackingOps.clearDocuments();\n\t\ttrackId_to_globalId.clear();\n\t\tglobalId_to_track.forEachEntry(( globalID, track ) -> {\n\t\t\ttrack.trackDoc = llahTrackingOps.createDocument(track.predicted.toList());\n\t\t\t// copy global landmarks into track so that in the next iteration the homography will be correct\n\t\t\ttrack.trackDoc.landmarks.reset();\n\t\t\ttrack.trackDoc.landmarks.copyAll(track.globalDoc.landmarks.toList(), ( src, dst ) -> dst.setTo(src));\n\t\t\ttrackId_to_globalId.put(track.trackDoc.documentID, globalID);\n\t\t\treturn true;\n\t\t});\n\t}",
"public void resetAllIdCounts() {\n \t\tthis.userCounterIdCounter = 0;\n \t\tthis.questionIdCounter = 0;\n \t\tthis.answerIdCounter = 0;\n \t\tthis.commentIdCounter = 0;\n \t}",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }",
"protected void initVars() {}",
"public void setId(String id)\r\n/* 19: */ {\r\n/* 20:17 */ this.id = id;\r\n/* 21: */ }",
"private static void mapDbAsstIDs()\r\n {\r\n if (dbIdMap == null) {\r\n dbIdMap = new HashMap<String, Integer>();\r\n dbIdMap.put(\"repair\", 1);\r\n dbIdMap.put(\"fuel\", 2);\r\n dbIdMap.put(\"tuition\", 3);\r\n dbIdMap.put(\"clothing\", 4);\r\n dbIdMap.put(\"registration\", 5);\r\n dbIdMap.put(\"utilities\", 21);\r\n }\r\n }",
"private void setId() {\n id = count++;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void makeAndSendAgentID(){\n sendID(id, x, y);\n }",
"public void setId(int id){ this.id = id; }",
"@Override\n\tpublic void assignPids() {\n\t\tThread t = new Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile (nPidsAssigned < nProc -1) {\n\t\t\t\t\t\tinitConn.connectRetry(coordinatorHostname, 20000);\n\n\t\t\t\t\t\tnPidsAssigned++;\n\t\t\t\t\t\t// Pid 1 is reserved for the coordinator.\n\t\t\t\t\t\tint newPid = nPidsAssigned + 1;\n\t\t\t\t\t\tString hostname = initConn.getHostName();\n\t\t\t\t\t\tinitConn.send(((Integer)newPid).toString());\n\t\t\t\t\t\tinitConn.send(pidToHolderMap.get(newPid).toString());\n\t\t\t\t\t\tsynchronized (pidToHostnameMap) {\n\t\t\t\t\t\t\tpidToHostnameMap.put(newPid, hostname);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"PID: \" + newPid + \" sent\\n\");\n\n\t\t\t\t\t\tinitConn.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(pidToHostnameMap.toString());\n\t\t\t}\n\t\t});\n\t\tt.start();\n\t}",
"private void addAllSrcId(\n Iterable<? extends Integer> values) {\n ensureSrcIdIsMutable();\n com.google.protobuf.AbstractMessageLite.addAll(\n values, srcId_);\n }",
"protected void setID(int i){\r\n\t\tthis.ID = i;\r\n\t}",
"public void setId(long id) {\n id_ = id;\n }",
"public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }",
"final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}",
"public void setID(int i){\n\t\tid = i;\n\t}",
"public void resetIds()\r\n {\r\n this.ids = null;\r\n }",
"public void setId(final int i) {\n\t\tid = i;\n\t}",
"public void prepare()\n {\n // First, we assign the payload a new UUID if it does not already have one\n if(getId() == null)\n setId(UUID.randomUUID());\n \n // Set the submission date to now\n setSubmissionDate(new Date());\n }",
"private void assignMissingResidueIds() {\n \t\tfor (Atom atom: atomVector) {\n \t\t\tif (atom.residue_id == Integer.MIN_VALUE) {\n \t\t\t\tatom.residue_id = atom.authorResidue_id;\n \t\t\t\tatom.nonpolymer = true;\n \t\t\t}\n \t\t}\n \t}",
"public IDReferences()\n {\n idReferences = new Hashtable();\n idValidation = new Hashtable();\n }",
"void setId(int val);",
"private void assignment() {\n\n\t\t\t}",
"private static Map<String, Integer> assignVertexIds(DAG dag) {\n Map<String, Integer> vertexIdMap = new LinkedHashMap<>();\n final int[] vertexId = {0};\n dag.forEach(v -> vertexIdMap.put(v.getName(), vertexId[0]++));\n return vertexIdMap;\n }",
"void initListRemainingId();",
"public void setidnumber(int id) {\r\n idnumber = id;\r\n }",
"public Object setID(int iD)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setId : \" + \"Agent\");\r\n/* 51 */ \tthis.myID = iD;\r\n/* 52 */ \treturn this;\r\n/* */ }",
"public abstract void setId(int id);",
"public void setID(String idIn) {this.id = idIn;}",
"private void setStudentId() {\n\t id++;\n\t this.studentId=gradeYear+\"\"+id;\n }",
"public static void updateVars() {\n IntVar tempo;\n for (Vars vars: getArrayutcc() ){\n tempo = (IntVar) Store.getModelStore().findVariable(vars.varname);\n vars.vinf = tempo.value();\n }\n\n }",
"private void setAId(int value) {\n \n aId_ = value;\n }",
"public void setId(int i) {\n\t\tthis.id = i;\n\t}",
"@SuppressWarnings(\"unused\")\n private static <T extends AbstractApiIdentifiableDTO> Map<Long, T> generateIdMap(List<T> idList) {\n Map<Long, T> results = new HashMap<>(idList.size());\n\n for (T idSingle : idList) {\n results.put(idSingle.getId(), idSingle);\n }\n\n return results;\n }",
"public void generateCpnIDs() {\n\t\t// for all places, generate a cpnID\n\t\tIterator places = this.getPlaces().iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tColoredPlace place = (ColoredPlace) places.next();\n\t\t\tplace.setCpnID(ManagerID.getNewID());\n\t\t}\n\t\t// for all transitions, generate a cpnID\n\t\tIterator transitions = this.getTransitions().iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tColoredTransition transition = (ColoredTransition) transitions.next();\n\t\t\ttransition.setCpnID(ManagerID.getNewID());\n\t\t}\n\t}",
"public void defId(int id) {\r\n\t\tthis.id = id;\r\n\t}",
"public void setAllValues() {\n//\t\tNewRestaurantDetailsByStoreId newRestaurantDetailsByStoreId = null;\n\t\t\n\t\tif (Constants.allthemes!=null){\n\t\t int length = Constants.allthemes.size();\n\t\t for(int i=0;i<length;i++){\n\t\t \tThemes currentTheme = Constants.allthemes.get(i);\n\t\t \tAddObjectToList(currentTheme.photo_url,\n\t\t \t\t\tcurrentTheme.title, \n\t\t\t\t\t\t\"~\"+currentTheme.content,\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\tcurrentTheme.themeIndex);\n\t\t }\n\t\t \n\t\t \n\t\t runOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tprepareArrayLits();//CREATE LIST VIEW OF THE NEW RESTAURANTS\n\t\t\t\t}\n\t\t\t});\n\t\t}else{\n\t\t\tToast.makeText(SlyThemesActivity.this, \"無資料,請重開App.\",Toast.LENGTH_SHORT).show();\n\t\t}\n\t}",
"id(int id) {}",
"private void setUpRouteIDsAndIndexes() {\n\n\n for (int i = 0; i < routeIDsOfBillboards.size(); i++) {\n\n List<Integer> routeIDs = routeIDsOfBillboards.get(i);\n\n for (int j = 0; j < routeIDs.size(); j++) {\n\n int routeID = routeIDs.get(j);\n routeIDSet.add(routeID);\n }\n }\n\n buildHash();\n\n for (int i = 0; i < routeIDsOfBillboards.size(); i++) {\n\n List<Integer> routeIndexes = new ArrayList<>();\n List<Integer> routeIDs = routeIDsOfBillboards.get(i);\n for (int j = 0; j < routeIDs.size(); j++) {\n\n int routeID = routeIDs.get(j);\n int routeIndex = (int) routeIDMap.get(routeID);\n routeIndexes.add(routeIndex);\n }\n routeIndexesOfBillboards.add(routeIndexes);\n }\n }",
"public void setId(int id) { this.id = id; }",
"public void setId(int id) { this.id = id; }",
"public void setId(String i) {\n\t\tid = i;\n\t}",
"public void setId (long id)\r\n {\r\n _id = id;\r\n }",
"@Test\r\n\tpublic void testGetId() {\r\n\t\tassertEquals(1, breaku1.getId());\r\n\t\tassertEquals(2, externu1.getId());\r\n\t\tassertEquals(3, meetingu1.getId());\r\n\t\tassertEquals(4, teachu1.getId());\r\n\t}",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"private void setId(int value) {\n \n id_ = value;\n }",
"public void resetSelectIds() {\n calendarId = new SelectId<>(null, SelectId.AHasPrecedence);\n locId = new SelectId<>(null, SelectId.AHasPrecedence);\n ctctId = new SelectId<>(null, SelectId.AHasPrecedence);\n }",
"public static void resetId() {\r\n nextid=1;\r\n }",
"void setId(ID id);",
"public void method_6321(int var1, Random var2, class_1206 var3, int var4) {\r\n super.method_6192(var1);\r\n this.field_5753 = var4;\r\n this.field_5851 = this.method_6303(var2);\r\n this.field_5752 = var3;\r\n this.field_5880 = var2.nextInt(5);\r\n }",
"public void getIdForDel(int rID, int fID, int vID){\n recipeID = rID;\n foodID = fID;\n vitaminID = vID;\n }",
"public void setId(int id){\r\n this.id = id;\r\n }",
"private void updateVars()\n {\n\n }",
"public void setIdAutorizacionEmpresaSRI(int idAutorizacionEmpresaSRI)\r\n/* 79: */ {\r\n/* 80:122 */ this.idAutorizacionEmpresaSRI = idAutorizacionEmpresaSRI;\r\n/* 81: */ }",
"void assignPainting(int chosenId, Integer id);",
"public void setID(int id){\n this.id=id;\n }",
"public void setId1(int value) {\n this.id1 = value;\n }",
"@SuppressWarnings(\"unused\")\n private void setId(Integer id) {\n this.id = id;\n }",
"public static void resetIdCounter(){\n idCounter = 0;\n }",
"public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}",
"public void setIdpres(int idpres) {\r\n this.idpres = idpres;\r\n }",
"public void storeIntToVariable(int varid) {\n\t\tif (varid <= 3) {\n\t\t\tlines.append(\"istore_\");\n\t\t\tlines.append(varid);\n\t\t} else {\n\t\t\tlines.append(\"istore \");\n\t\t\tlines.append(varid);\n\t\t}\n\t\tlines.append(\"\\n\");\n\t}",
"private void initializePIDValues()\n {\n /* Generate number fields on SmartDashboard for PID values to be input into. */\n // SmartDashboard.putNumber(\"F Value\", 0.0);\n // SmartDashboard.putNumber(\"P Value\", 0.0);\n // SmartDashboard.putNumber(\"I Value\", 0.0);\n // SmartDashboard.putNumber(\"D Value\", 0.0);\n\n // SmartDashboard.putNumber(\"Cruise Velocity Value\", 0);\n // SmartDashboard.putNumber(\"Acceleration Value\", 0);\n \n /**\n * Create button for when pressed on SmartDashboard will configure the PID of\n * the hard coded TalonSRX/TalonFX. Get TalonSRX/TalonFX with get method written\n * in each subsystem for each TalonSRX/TalonFX. When desiring to set the PID\n * values for another TalonSRX/TalonFX, you must hard code in the new parameters\n * for the SetPIDValues command then re-deploy.\n * \n * SetPIDValues Parameters: TalonSRX object (pass in null if configuring\n * TalonFX). TalonFX object (pass in null if configuring TalonSRX). ControlMode\n * boolean: if true, Motion Magic is being used, if false, Motion Magic is not\n * being used.\n */\n // SmartDashboard.putData(\"Set PID Values\", new SetPIDValues(m_intake.getWheelIntakeTalonSRX(), null, false));\n }",
"public void setId(long id) { this.id = id; }",
"public void setId(long id) { this.id = id; }",
"public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }",
"private void getIds() {\n mBuilder_txv = (TextView) findViewById((R.id.buildman_txv_login));\n mBuilderTech_txv = (TextView) findViewById((R.id.buildmantechnologies_login));\n mVersion_txv = (TextView) findViewById((R.id.version_login));\n mEmail_Edt = (EditText) findViewById((R.id.email_id_edt_login));\n mPassword_Edt = (EditText) findViewById((R.id.password_edt_login));\n mLogin_Btn = (Button) findViewById((R.id.login_btn_login));\n if(userId!=null){\n mEmail_Edt.setText(userId);\n mEmail_Edt.setSelection(mEmail_Edt.getText().toString().length());\n mPassword_Edt.setText(pwd);\n mPassword_Edt.setSelection(mPassword_Edt.getText().toString().length());\n }\n }",
"void setId(int id) {\n this.id = id;\n }",
"private void clearId() {\n \n id_ = 0;\n }",
"public void setId(int param){\r\n \r\n // setting primitive attribute tracker to true\r\n localIdTracker =\r\n param != java.lang.Integer.MIN_VALUE;\r\n \r\n this.localId=param;\r\n \r\n\r\n }",
"public void setId(int id)\n {\n this.id=id;\n }",
"private void buildStageVariableMaps(List<StageVariable> allStageVars) throws IGCConnectivityException, IGCParsingException {\n for (StageVariable stageVar : allStageVars) {\n String rid = stageVar.getId();\n // If the modification details are empty, likely we did not get this from a search but from paging\n // within a stage itself (cache miss), and therefore must retrieve the details of each variable one-by-one\n // as well\n if (stageVar.getModifiedBy() == null) {\n log.debug(\"...... retrieving stage variable by RID: {}\", rid);\n stageVar = igcRestClient.getAssetWithSubsetOfProperties(rid, \"stage_variable\", DataStageConstants.getStageVariableSearchProperties());\n }\n log.debug(\"...... caching RID: {}\", rid);\n varMap.put(rid, stageVar);\n String stageRid = stageVar.getStage().getId();\n Set<String> stageVars = stageToVarsMap.getOrDefault(stageRid, null);\n if (stageVars != null) {\n stageVars.add(rid);\n stageToVarsMap.put(stageRid, stageVars);\n } else {\n log.error(\"Stage variables were null for stage RID: {}\", stageRid);\n }\n }\n }",
"public interface IDs {\n\n static final String SERIES_STANDARD_ID = \"c7fb8441-d5db-4113-8af0-e4ba0c3f51fd\";\n static final String EPISODE_STANDARD_ID = \"a99a8588-93df-4811-8403-fe22c70fa00a\";\n static final String FILE_STANDARD_ID = \"c5919cbf-fbf3-4250-96e6-3fefae51ffc5\";\n static final String RECORDING_STANDARD_ID = \"4a40811d-c067-467f-8ff6-89f37eddb933\";\n static final String ZAP2IT_STANDARD_ID = \"545c4b00-5409-4d92-9cda-59a44f0ec7a9\";\n}",
"public void setId(ID id)\n {\n this.id = id;\n }"
] | [
"0.65311146",
"0.63367474",
"0.6065382",
"0.59793663",
"0.59727377",
"0.5851738",
"0.58426225",
"0.5815096",
"0.58066934",
"0.57766634",
"0.5771195",
"0.57548267",
"0.5733269",
"0.57300746",
"0.5728672",
"0.5713681",
"0.5705859",
"0.5705018",
"0.56890297",
"0.5685713",
"0.5658082",
"0.565104",
"0.5627251",
"0.5625891",
"0.5616777",
"0.55917144",
"0.5581001",
"0.5579917",
"0.553705",
"0.55345166",
"0.5533351",
"0.55116594",
"0.55086017",
"0.54993635",
"0.54912674",
"0.54789805",
"0.547588",
"0.544925",
"0.54347783",
"0.5410549",
"0.5401531",
"0.5395577",
"0.53939307",
"0.5393918",
"0.53921056",
"0.539087",
"0.53774357",
"0.5366022",
"0.53595865",
"0.5336683",
"0.533593",
"0.5334615",
"0.5334328",
"0.532804",
"0.5326742",
"0.5321876",
"0.5321713",
"0.5320694",
"0.5308043",
"0.53060645",
"0.5298656",
"0.5293748",
"0.5293748",
"0.52931935",
"0.529077",
"0.52903193",
"0.52807075",
"0.52807075",
"0.52807075",
"0.52807075",
"0.52807075",
"0.52807075",
"0.52807075",
"0.52745926",
"0.5272495",
"0.5270165",
"0.52689856",
"0.5256437",
"0.52549523",
"0.52474725",
"0.5240941",
"0.5240216",
"0.5236475",
"0.5233601",
"0.52259475",
"0.5216826",
"0.52167463",
"0.5216097",
"0.52142835",
"0.51988864",
"0.51963794",
"0.51963794",
"0.5193542",
"0.5191909",
"0.5181987",
"0.51658195",
"0.51632684",
"0.5153087",
"0.51519096",
"0.5147166",
"0.5144533"
] | 0.0 | -1 |
Assign all id's and listeners to the appropriate EditText fields. | public void setupTextFields(View v) {
other = (EditText) v.findViewById(R.id.eText_Notes);
totalTotes = (EditText) v.findViewById(R.id.eText_NumStacked);
other.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
((ScoutFormActivity) getActivity()).getScoutForm().setENOTES_COLUMN(other.getText().toString());
}
});
totalTotes.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
}
@Override
public void afterTextChanged(Editable s) {
((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOTAL_COLUMN(totalTotes.getText().toString());
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void editableEditTexts() {\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\tetTitle.setKeyListener(titleListener);\n\t\tetDescription.setKeyListener(descriptionListener);\n\t\tetDirections.setKeyListener(directionsListener);\n\n\t\tsetListViewOnClickListener();\n\n\t}",
"private void setupEditTexts() {\n EditText paino = findViewById(R.id.etWeight);\n EditText alaPaine = findViewById(R.id.etLowerBP);\n EditText ylaPaine = findViewById(R.id.etUpperBP);\n\n //Set the input filters\n paino.setFilters(new InputFilter[] { new InputFilterMinMax(0f, 999f)});\n alaPaine.setFilters(new InputFilter[] { new InputFilterMinMax(1, 999)});\n ylaPaine.setFilters(new InputFilter[] { new InputFilterMinMax(1, 999)});\n\n //Set listeners for the edit texts on when the user clicks something else on the screen while typing\n //When clicked outside, the keyboard closes\n paino.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n alaPaine.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n ylaPaine.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }",
"private void setViewListeners() {\n // Set an OnClickListener for each button.\n btnDecrease.setOnClickListener(this);\n btnIncrease.setOnClickListener(this);\n btnOrder.setOnClickListener(this);\n\n // Set an OnTouchListener for each view.\n btnDecrease.setOnTouchListener(touchListener);\n btnIncrease.setOnTouchListener(touchListener);\n etTitle.setOnTouchListener(touchListener);\n etAuthor.setOnTouchListener(touchListener);\n etPrice.setOnTouchListener(touchListener);\n etEditQuantity.setOnTouchListener(touchListener);\n etSupplier.setOnTouchListener(touchListener);\n etPhoneNumber.setOnTouchListener(touchListener);\n\n /* Format the phone number as the user types it.\n Reference: https://stackoverflow.com/a/15647444\n Date: 8/1/18\n */\n etPhoneNumber.addTextChangedListener(new PhoneNumberFormattingTextWatcher());\n // End referenced code.\n }",
"@Override\n\tpublic void inflateViews() {\n\t\t\n\t\tappealOneLineEdit = (EditText) findViewById(R.id.appealOnelineEdit);\n\t\tappealOneLineEdit.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onOneLineEdited(s.toString());\n\t\t\t}\n\t\t});\n\t\tappealFaceEdit1 = (EditText) findViewById(R.id.appealFaceEdit1);\n\t\tappealFaceEdit1.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onFaceEdited(0, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealFaceEdit2 = (EditText) findViewById(R.id.appealFaceEdit2);\n\t\tappealFaceEdit2.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onFaceEdited(1, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealFaceEdit3 = (EditText) findViewById(R.id.appealFaceEdit3);\n\t\tappealFaceEdit3.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onFaceEdited(2, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealHobbyEdit1 = (EditText) findViewById(R.id.appealHobbyEdit1);\n\t\tappealHobbyEdit1.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onHobbyEdited(0, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealHobbyEdit2 = (EditText) findViewById(R.id.appealHobbyEdit2);\n\t\tappealHobbyEdit2.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onHobbyEdited(1, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealHobbyEdit3 = (EditText) findViewById(R.id.appealHobbyEdit3);\n\t\tappealHobbyEdit3.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onHobbyEdited(2, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealIdealTypeEdit1 = (EditText) findViewById(R.id.appealFavoriteEdit1);\n\t\tappealIdealTypeEdit1.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onIdealTypeEdited(0, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealIdealTypeEdit2 = (EditText) findViewById(R.id.appealFavoriteEdit2);\n\t\tappealIdealTypeEdit2.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onIdealTypeEdited(1, s.toString());\n\t\t\t}\n\t\t});\n\t\tappealIdealTypeEdit3 = (EditText) findViewById(R.id.appealFavoriteEdit3);\n\t\tappealIdealTypeEdit3.addTextChangedListener(new SimpleTextWatcher() {\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tcallback.onIdealTypeEdited(2, s.toString());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}",
"private void assignControls()\n {\n \ttaskSpinner = (Spinner) findViewById(R.id.taskSpinner);\n \ttaskName = (EditText) findViewById(R.id.txtTaskName);\n \ttaskDetails = (EditText) findViewById(R.id.txtTaskDetails);\n \ttaskId = (EditText) findViewById(R.id.txtTaskId);\n \ttaskId.setEnabled(false); //This is not an editable field\n }",
"public void readEditTexts() {\n }",
"public void init(){\n nomInscription = (EditText)findViewById(R.id.inscriptionNomEdit);\n prenomInscription = (EditText)findViewById(R.id.inscriptionPrenomEdit);\n mailInscription = (EditText)findViewById(R.id.inscriptionMailEdit);\n telInscription = (EditText)findViewById(R.id.inscriptionGSMEdit);\n mdpInscription = (EditText)findViewById(R.id.inscriptionPSWEdit);\n mdpConfirmation = (EditText)findViewById(R.id.inscriptionConfirmEdit);\n }",
"private void initViews() {\n textViewName = (EditText) findViewById(R.id.inputText_name);\n textViewEmail = (EditText) findViewById(R.id.inputText_email);\n textViewPhone = (EditText) findViewById(R.id.inputText_phone);\n textViewRent = (EditText) findViewById(R.id.inputText_rent);\n textViewChores = (EditText) findViewById(R.id.inputText_chores);\n\n updateUserButton = (Button) findViewById(R.id.button_updateUser);\n //redirectToUsers = (Button) findViewById(R.id.button_updateUser);\n }",
"public void addListeners()\n {\n nameEdit.addTextChangedListener(new TextWatcher()\n {\n @Override\n public void afterTextChanged(Editable arg0)\n {\n boolean isEmpty = nameEdit.getText().toString().isEmpty();\n acceptButton.setEnabled(!isEmpty);\n }\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n });\n\n numStandsEdit.addTextChangedListener(new TextWatcher()\n {\n @Override\n public void afterTextChanged(Editable s)\n {\n acceptButton.setEnabled(checkNumber());\n }\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n });\n }",
"private void findViews() {\n\n FirstName = (EditText) findViewById(R.id.FirstName);\n LastName = (EditText) findViewById(R.id.LastName);\n CreditCard = (EditText) findViewById(R.id.CreditCard);\n EmailAddress = (EditText) findViewById(R.id.EmailAddress);\n PhoneNumber = (EditText) findViewById(R.id.PhoneNumber);\n ID = (EditText) findViewById(R.id.ID);\n Add = (Button) findViewById(R.id.Add);\n Password = (EditText) findViewById(R.id.Password);\n\n Add.setOnClickListener(this);\n }",
"private void populateTextViews() {\n full_name_tv.setText(contact.getFullName());\n school_tv.setText(contact.getSchool());\n department_tv.setText(getDepartmentString());\n email.setText(contact.getEmail());\n number_tv.setText(contact.getNumber());\n }",
"private void registerViews() {\n editTextLogin = (EditText) findViewById(R.id.editText_username);\n editTextLogin.addTextChangedListener(new TextWatcher() {\n // after every change has been made to this editText, we would like to check validity\n public void afterTextChanged(Editable s) {\n Validate.isEmailAddress(editTextLogin, true);\n }\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n });\n\n editTextPassword = (EditText) findViewById(R.id.editText_password);\n editTextPassword.addTextChangedListener(new TextWatcher() {\n // after every change has been made to this editText, we would like to check validity\n public void afterTextChanged(Editable s) {\n Validate.isPassword(editTextPassword, true);\n }\n\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n });\n }",
"private void fieldsInitialization() {\n this.emailEditText = findViewById(R.id.login_email_edit_text);\n this.passwordEditText = findViewById(R.id.login_password_edit_text);\n this.loginButton = findViewById(R.id.login_button_login);\n\n this.emailEditText.setOnFocusChangeListener(this.emailFocusChangingListener);\n this.emailEditText.setOnEditorActionListener(this.emailTextChangingListener);\n this.passwordEditText.setOnFocusChangeListener(this.passwordFocusChangingListener);\n this.passwordEditText.setOnEditorActionListener(this.passwordTextChangingListener);\n this.loginButton.setOnClickListener(this.loginButtonClickListener);\n }",
"private void setupListeners() {\n\n // \"Save\" button\n Button confirmButton = (Button) findViewById(R.id.button_save_report);\n confirmButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setResult(RESULT_OK);\n saveForm();\n finish(); // eventually calls onPause() and onStop()\n }\n });\n\n // \"Cancel\" button\n Button cancelButton = (Button) findViewById(R.id.button_cancel_edit_report);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setResult(RESULT_CANCELED);\n finish(); // eventually calls onPause() and onStop()\n }\n });\n\n TextWatcher onFormChangeListener = new TextWatcher() {\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n mFormChanged = true;\n }\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n };\n\n mValueText.addTextChangedListener(onFormChangeListener);\n }",
"private void assignViews() {\n mTextView = (TextView) findViewById(R.id.textViewForEnterEmail);\n mEdTxtEmail = (EditText) findViewById(R.id.edTxtEmailInForgotPass);\n mButton = (Button) findViewById(R.id.btnSubmit);\n }",
"private void setupUI() {\n bankInput = (EditText) findViewById(R.id.bank_Input);\n startDateInput = (EditText) findViewById(R.id.start_Date_Input);\n endDateInput = (EditText) findViewById(R.id.end_Date_Input);\n amountInput = (EditText) findViewById(R.id.amount_Input);\n annualizedYieldInput = (EditText) findViewById(R.id.annualized_Yield_Input);\n expectedInterestInput = (EditText) findViewById(R.id.expected_Interest_Input);\n\n //Set Text Watcher to update interest\n bankInput.addTextChangedListener(mInterestTextWatcher);\n amountInput.addTextChangedListener(mInterestTextWatcher);\n annualizedYieldInput.addTextChangedListener(mInterestTextWatcher);\n amountInput.setOnFocusChangeListener(mOnFocusChangeListener);\n annualizedYieldInput.setOnFocusChangeListener(mOnFocusChangeListener);\n\n //set date field listener\n startDateInput.setOnFocusChangeListener(new View.OnFocusChangeListener(){\n @Override\n public void onFocusChange (View v, boolean hasFocus){\n Toast.makeText(getApplicationContext(),\"onFocusChange\",Toast.LENGTH_SHORT).show();\n if (hasFocus){\n Toast.makeText(getApplicationContext(),\"onFocusChange\",Toast.LENGTH_SHORT).show();\n showDatePicker((EditText) v, true);\n }\n }\n } );\n startDateInput.setInputType(InputType.TYPE_NULL);\n startDateInput.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n if (v.hasFocus()){\n showDatePicker((EditText)v, true);\n }\n }\n });\n endDateInput.setOnFocusChangeListener(new View.OnFocusChangeListener(){\n @Override\n public void onFocusChange (View v, boolean hasFocus){\n if (hasFocus){\n showDatePicker((EditText) v, false);\n }\n }\n } );\n endDateInput.setInputType(InputType.TYPE_NULL);\n endDateInput.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v){\n if (v.hasFocus()){\n showDatePicker((EditText)v, false);\n }\n }\n });\n\n mSavingsBean = getIntent().getParcelableExtra(Constants.INTENT_EXTRA_SAVINGS_ITEM_PARCEL);\n if (mSavingsBean != null) {\n // set data to UI\n bankInput.setText(mSavingsBean.getBankName());\n startDateInput.setText(Utils.formatDate(mSavingsBean.getStartDate()));\n endDateInput.setText(Utils.formatDate(mSavingsBean.getEndDate()));\n amountInput.setText(Utils.formatFloat(mSavingsBean.getAmount()));\n annualizedYieldInput.setText(Utils.formatFloat(mSavingsBean.getYield()));\n expectedInterestInput.setText(Utils.formatFloat(mSavingsBean.getInterest()));\n\n // update the buttons\n ((Button) findViewById(R.id.save_Button)).setText(R.string.update);\n ((Button) findViewById(R.id.cancel_Button)).setText(R.string.delete);\n\n mEditMode = true;\n // update the data in this screen\n mStartDate = new Date(mSavingsBean.getStartDate());\n mEndDate = new Date(mSavingsBean.getEndDate());\n mAmount = mSavingsBean.getAmount();\n mYield = mSavingsBean.getYield();\n mInterest = mSavingsBean.getInterest();\n Log.d(Constants.LOG_TAG, \"Edit mode, displayed existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n\n }\n }",
"@SuppressLint(\"ClickableViewAccessibility\")\n private void setTouchListeners() {\n mStudentNameEditText.addTextChangedListener(mTextListener);\n mStudentSexSpinner.setOnTouchListener(mTouchListener);\n mStudentBirthdateRelativeLayout.setOnTouchListener(mTouchListener);\n mStudentGradeEditText.addTextChangedListener(mTextListener);\n mAddPhotoView.setOnTouchListener(mTouchListener);\n mStudentAddClassView.setOnTouchListener(mTouchListener);\n mStudentRemoveClassView.setOnTouchListener(mTouchListener);\n }",
"private void initializeViews() {\n mAllEditTexts = new ArrayList<>();\n\n mImagesRecyclerView = findViewById(R.id.images_recycler_view);\n mAddPictureBtn = findViewById(R.id.add_picture_btn);\n\n mSaleStatusImage = findViewById(R.id.sale_status_image);\n mSaleStatusImage.setTag(FOR_SALE_TAG);\n\n mTypeSpinner = findViewById(R.id.type_spinner);\n mBedroomsSpinner = findViewById(R.id.rooms_spinner);\n\n mTypeSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.spinner_item, getResources().getStringArray(R.array.spinner_types)));\n mBedroomsSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.spinner_item, getResources().getStringArray(R.array.spinner_number_of_rooms)));\n\n mSurfaceAreaText = findViewById(R.id.surface_area_text1);\n mPriceEditText = findViewById(R.id.price_edit_text1);\n mAddressPostcodeEditText = findViewById(R.id.address_postcode_et1);\n mAddressNumberEditText = findViewById(R.id.address_number_et1);\n mAddressStreetEditText = findViewById(R.id.address_street_et1);\n mAddressTownEditText = findViewById(R.id.address_town_et1);\n mAddressCountyEditText = findViewById(R.id.address_county_et1);\n mDescriptionEditText = findViewById(R.id.description_edit_text1);\n mBuyOrLetSwitch = findViewById(R.id.buy_or_let);\n\n mSaveButton = findViewById(R.id.savebtn);\n\n mAllEditTexts.add(mSurfaceAreaText);\n mAllEditTexts.add(mPriceEditText);\n mAllEditTexts.add(mAddressPostcodeEditText);\n mAllEditTexts.add(mAddressNumberEditText);\n mAllEditTexts.add(mAddressStreetEditText);\n mAllEditTexts.add(mAddressTownEditText);\n mAllEditTexts.add(mAddressCountyEditText);\n mAllEditTexts.add(mDescriptionEditText);\n\n }",
"public void findUIElements() {\n nameField = (EditText) findViewById(R.id.NAMEFIELD);\n nameField.setHintTextColor(getResources().getColor(R.color.colorPrimary));\n enterButton = (Button) findViewById(R.id.ENTER);\n enterButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String name = nameField.getText().toString();\n if (name.length() > 0) {\n RealmManager.getInstance().createUser(name);\n finish();\n }\n }\n });\n }",
"private void initializeElements() {\n textViewIntroduceEmail = findViewById(R.id.textViewIntroduceEmail);\n textViewIntroduceCode = findViewById(R.id.textViewIntroduceCode);\n editTextChangePasswordEmail = findViewById(R.id.editTextChangePasswordEmail);\n editTextChangePasswordCode = findViewById(R.id.editTextChangePasswordCode);\n buttonEmailNext = findViewById(R.id.buttonEmailNext);\n buttonCodeNext = findViewById(R.id.buttonCodeNext);\n\n buttonEmailNext.setOnClickListener(this);\n buttonCodeNext.setOnClickListener(this);\n }",
"private void initViews(){\n mTitle = (EditText) findViewById(R.id.scheduled_event_title);\n mDescription = (EditText) findViewById(R.id.scheduled_event_description);\n mHour = (EditText) findViewById(R.id.scheduled_event_time_hour);\n mMinute = (EditText) findViewById(R.id.scheduled_event_time_minutes);\n mCategorySpinner = (Spinner) findViewById(R.id.scheduled_spinner_categories);\n mDueDate = (TextView) findViewById(R.id.tv_scheduled_event_due_date);\n mDueTime = (TextView) findViewById(R.id.tv_scheduled_event_due_time);\n }",
"@Override\n\tpublic void setListeners() {\n\t\tet1.setOnClickListener(this);\n\t\tet2.setOnClickListener(this);\n\t\tet3.setOnClickListener(this);\n\t\tet4.setOnClickListener(this);\n\t\tet5.setOnClickListener(this);\n\t\tet6.setOnClickListener(this);\n\t\tet7.setOnClickListener(this);\n\t\tet8.setOnClickListener(this);\n\t\tet9.setOnClickListener(this);\n\t\tet10.setOnClickListener(this);\n\t\tet11.setOnClickListener(this);\n\t\tet12.setOnClickListener(this);\n\t\tet13.setOnClickListener(this);\n\t\tet14.setOnClickListener(this);\n\t}",
"private void setFields() {\n\t\tfirstname.setText(guest.getFirstName());\n\t\tlastname.setText(guest.getLastName());\n\t\tpassport.setText(guest.getPassportNumber());\n\t\ttelephone.setText(guest.getTelephoneNumber());\n\t\tarrival.setText(arrivalDate.toString());\n\t\tdeparture.setText(departureDate.toString());\n\n\t\tif (hotelChoice.getName() != null && hotelChoice.getName() != \"\"\n\t\t\t\t&& !(hotelChoice.getName() == Controller.DEFAULT_HOTEL_CHOICE)) {\n\t\t\thotel.setText(hotelChoice.getName());\n\t\t} else {\n\t\t\thotelChoice = new Hotel();\n\t\t\thotelChoice.setName(\"\");\n\t\t\thotel.clear();\n\t\t}\n\t\tif (roomQualityChoice.getQuality() != null && roomQualityChoice.getQuality() != \"\"\n\t\t\t\t&& !(roomQualityChoice.getQuality() == Controller.DEFAULT_QUALITY_CHOICE)) {\n\t\t\tquality.setText(roomQualityChoice.getQuality());\n\t\t} else {\n\t\t\troomQualityChoice = new RoomQuality();\n\t\t\troomQualityChoice.setQuality(\"\");\n\t\t\tquality.clear();\n\t\t}\n\t\tif (discountChoice > 0) {\n\t\t\tdiscount.setText(\"(-\" + discountChoice + \"%)\");\n\t\t}\n\n\t\tloadAvailableRooms();\n\n\t}",
"protected void CriarComponentes() {\r\n\r\n edtCodigo = (EditText) this.findViewById(R.id.edtCodigo);\r\n\r\n edtNome = (EditText) this.findViewById(R.id.edtNome);\r\n\r\n edtRazaoSocial = (EditText) this.findViewById(R.id.edtRazaoSocial);\r\n\r\n edtEndereco = (EditText) this.findViewById(R.id.edtEndereco);\r\n\r\n edtBairro = (EditText) this.findViewById(R.id.edtBairro);\r\n\r\n edtCep = (EditText) this.findViewById(R.id.edtCep);\r\n\r\n edtCidade = (EditText) this.findViewById(R.id.edtCidade);\r\n\r\n edtTelefone = (EditText) this.findViewById(R.id.edtTelefone);\r\n\r\n edtFax = (EditText) this.findViewById(R.id.edtFax);\r\n\r\n edtCnpj = (EditText) this.findViewById(R.id.edtCnpj);\r\n\r\n edtIE = (EditText) this.findViewById(R.id.edtIE);\r\n\r\n checkBoxRegistroAtivo = (CheckBox) this.findViewById(R.id.checkBoxRegistroAtivo);\r\n\r\n buttonSalvar = (Button) this.findViewById(R.id.buttonSalvar);\r\n\r\n buttonVoltar = (Button) this.findViewById(R.id.buttonVoltar);\r\n\r\n }",
"public void setUpFields() {\n //Assigning each of the warning to relevant TextViews\n warning1 = findViewById(R.id.tvWarning1);\n warning2 = findViewById(R.id.tvWarning2);\n warning3 = findViewById(R.id.tvWarning3);\n warning4 = findViewById(R.id.tvWarning4);\n warning5 = findViewById(R.id.tvWarning5);\n warning6 = findViewById(R.id.tvWarning6);\n warning7 = findViewById(R.id.tvWarning7);\n warning8 = findViewById(R.id.tvWarning8);\n }",
"private void setupAutoComplete() {\n // Map between AutoCompleteTextViews and their Adapters. Some text fields have a custom\n // adapter whose data is updated dynamically (rather than being statically set)\n Map<AutoCompleteTextView, ArrayAdapter<String>> map = new HashMap<>();\n map.put(mBind.layoutWidthEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.layoutHeightEdit, new LayoutDimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.backgroundEdit, new ArrayAdapter<>(this, LAYOUT_DROPDOWN_ITEM, Data.getArrColors()));\n map.put(mBind.maxWidthEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n map.put(mBind.maxHeightEdit, new DimenAutoComplAdapter(this, LAYOUT_DROPDOWN_ITEM));\n\n for (Map.Entry<AutoCompleteTextView, ArrayAdapter<String>> e : map.entrySet()) {\n e.getKey().setAdapter(e.getValue());\n // For the fields with custom adapters, set up listener, so that the data of the adapter\n // is updated on every keystroke (e.g. \"14\" -> {\"14dp\", \"14in\", \"14mm\", \"14px\", \"14sp\"})\n if (e.getValue() instanceof AutoComplAdapter) {\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n // Trigger filtering process on 's', which updates the data of this adapter\n e.getValue().getFilter().filter(s);\n }\n });\n }\n }\n }",
"public void onAddField(View v) {\r\n dynamicEditTexts = new ArrayList<EditText>();//added this\r\n\r\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n final View rowView = inflater.inflate(R.layout.field, null);\r\n // Add the new row before the add field button.\r\n parentLinearLayout.addView(rowView, parentLinearLayout.getChildCount() - 1);\r\n EditText dynamicText = new EditText(this);\r\n dynamicEditTexts.add(dynamicText);\r\n }",
"public void updateTextViews() {\n // Set the inputs according to the initial input from the entry.\n //TextView dateTextView = (TextView) findViewById(R.id.date_textview);\n //dateTextView.setText(DateUtils.formatDateTime(getApplicationContext(), mEntry.getStart(), DateUtils.FORMAT_SHOW_DATE));\n\n EditText dateEdit = (EditText) findViewById(R.id.date_text_edit);\n dateEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR | DateUtils.FORMAT_ABBREV_ALL));\n\n EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n startTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getStart(), DateUtils.FORMAT_SHOW_TIME));\n\n EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n endTimeEdit.setText(DateUtils.formatDateTime(this, mEntry.getEnd(), DateUtils.FORMAT_SHOW_TIME));\n\n\n TextView descriptionView = (TextView) findViewById(R.id.description);\n descriptionView.setText(mEntry.getDescription());\n\n\n enableSendButtonIfPossible();\n }",
"public void loadTextBoxs(){\n txtIndice.setText(String.valueOf(indice));\n txtDni.setText(String.valueOf(dni[indice]));\n txtNombre.setText(nombre[indice]);\n txtApellido.setText(apellido[indice]);\n txtDireccion.setText(direccion[indice]);\n txtTelefono.setText(telefono[indice]);\n txtFechaNacimiento.setText(fNacimiento[indice]);\n }",
"private void setUpReferences()\n {\n namedFields = new HashMap<>(5);\n namedFields.put(\"firstName\", (EditText) findViewById(R.id.signUpFirstNameField));\n namedFields.put(\"surname\", (EditText) findViewById(R.id.signUpSurnameField));\n namedFields.put(\"password\", (EditText) findViewById(R.id.signUpPasswordField));\n namedFields.put(\"confPassword\", (EditText) findViewById(R.id.signUpConfirmPassword));\n namedFields.put(\"email\", (EditText) findViewById(R.id.signUpEmailField));\n formContainer = (ScrollView) findViewById(R.id.signUpFormContainer);\n progressContainer = (RelativeLayout) findViewById(R.id.signUpProgressContainer);\n }",
"private void initListener() {\n View.OnClickListener showDateListener = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final View vv = v;\n\n Calendar now = Calendar.getInstance();\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(UpdateActActivity.this, new DatePickerDialog.OnDateSetListener() {\n @Override\n public void onDateSet(DatePicker view, int year, int monthOfYear, int dayOfMonth) {\n String dateStr = year + \"-\"\n + StaticClass.autoFillZero((monthOfYear + 1), 2) + \"-\"\n + StaticClass.autoFillZero(dayOfMonth, 2);\n if (vv.getId() == R.id.tv_act_start_time_date) {\n mStartTimeDateText.setText(dateStr);\n } else {\n mEndTimeDateText.setText(dateStr);\n }\n }\n }, now.get(Calendar.YEAR),\n now.get(Calendar.MONTH),\n now.get(Calendar.DAY_OF_MONTH));\n\n datePickerDialog.show();\n }\n };\n\n View.OnClickListener showTimeListener = new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n final View vv = v;\n\n Calendar now = Calendar.getInstance();\n\n TimePickerDialog timePickerDialog = new TimePickerDialog(UpdateActActivity.this, new TimePickerDialog.OnTimeSetListener() {\n @Override\n public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n String timeStr = StaticClass.autoFillZero(hourOfDay, 2) + \":\"\n + StaticClass.autoFillZero(minute, 2)\n + \":00\";\n if (vv.getId() == R.id.tv_act_start_time_time) {\n mStartTimeTimeText.setText(timeStr);\n } else {\n mEndTimeTimeText.setText(timeStr);\n }\n }\n }, now.get(Calendar.HOUR_OF_DAY),\n now.get(Calendar.MINUTE),\n true);\n\n timePickerDialog.show();\n }\n };\n\n mStartTimeDateText.setOnClickListener(showDateListener);\n mEndTimeDateText.setOnClickListener(showDateListener);\n\n mStartTimeTimeText.setOnClickListener(showTimeListener);\n mEndTimeTimeText.setOnClickListener(showTimeListener);\n\n mSubmitBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n submitChange();\n }\n });\n }",
"protected void setUp(EditText[] editArray, KeyboardView key){\n\t\tkeyboard = key;\n\t\tfor(EditText eT : editArray){\n\t\t\teT.setOnFocusChangeListener(new OnFocusChangeListener(){\n\t\t\t\t@Override\n\t\t\t\tpublic void onFocusChange(View thisView, boolean focused) {\n\t\t\t\t\tif(focused){\n\t\t\t\t\t\tsetInput((EditText)thisView);\n\t\t\t\t\t\tif(keyboard != null){\n\t\t\t\t\t\t\tkeyboard.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\teT.setOnClickListener(new OnClickListener(){\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View thisView) {\n\t\t\t\t\tsetInput((EditText)thisView);\n\t\t\t\t\tkeyboard.setVisibility(View.VISIBLE);\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\teT.addTextChangedListener(new TextWatcher() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\tupdateValidity();\t\t\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\t\t\t\tint after) {}\n\t\t\t\t@Override\n\t\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\n\t\t\t\t\t\tint count) {}\n\n\t\t\t});\n\t\t}\n\t}",
"private void initViews() {\n inputName = findViewById(R.id.inputGroceryItemName);\n inputQuantityToBuy = findViewById(R.id.inputGroceryItemQuantity);\n inputUnits = findViewById(R.id.inputGroceryItemUnits);\n inputPrice = findViewById(R.id.inputGroceryItemPrice);\n inputCalories = findViewById(R.id.inputGroceryItemCalories);\n\n btnCancel = findViewById(R.id.btnCancelAddGrocery);\n btnAdd = findViewById(R.id.btnAddGroceryItem);\n\n checkEgg = findViewById(R.id.inputCheckGroceryEggs);\n checkFish = findViewById(R.id.inputCheckGroceryFish);\n checkGluten = findViewById(R.id.inputCheckGroceryGluten);\n checkLactose = findViewById(R.id.inputCheckGroceryLactose);\n checkSoy = findViewById(R.id.inputCheckGrocerySoy);\n checkNuts = findViewById(R.id.inputCheckGroceryNuts);\n }",
"public void initObjects() {\n /*\n using findViewById references to the todoTitleEdittext,todoDateEditText,todoDescriptionEditText,saveTodoButton to from layout\n */\n todoTitleEditText = (EditText) findViewById(R.id.editText_todo_title);\n todoDateEditText = (EditText) findViewById(R.id.editText_todo_date);\n todoDescriptionEditText = (EditText) findViewById(R.id.editText_todo_description);\n saveTodoButton = (Button) findViewById(R.id.button_save_todo);\n }",
"private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}",
"private void initViews() {\n textViewRole = findViewById(R.id.textViewAddress);\n recyclerViewUsers = findViewById(R.id.recyclerViewUsers);\n appCompatButtonAddProperty = findViewById(R.id.appCompatButtonAddProperty);\n }",
"private void monitorTextChange() {\n List<TextInputEditText> textInputEditTextList = new ArrayList<>();\n textInputEditTextList.add(tin_perLitrePrice); // first line is selected automatically\n textInputEditTextList.add(tin_fuelQuantityLitres);\n textInputEditTextList.add(tin_totalFuelPrice);\n textInputEditTextList.add(tin_currentKm);\n textInputEditTextList.add(tin_startingKm);\n textInputEditTextList.add(tin_distanceCovered);\n\n for (TextInputEditText item : textInputEditTextList) {\n\n\n item.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.d(TAG, \"afterTextChanged: \");\n fabSaveFuelData.hide(); // hide save button\n tv_calculatedAverage_addEdit.setText(\"--km/l\");\n }\n });\n }\n\n // tv_input_fuel_date is a TextView so we need to add this separately\n tv_input_fuel_date.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }",
"@Override\n\tpublic void initializeView() {\n\t\tsuper.initializeView();\n\t\tet = (EditText)findViewById(R.id.edit_name);\n\t\tsave=(TextView)findViewById(R.id.save);\n\t\tsave.setOnClickListener(this);\n\t}",
"private void initWidgets() {\n\t\tthis.spelling = (EditText) this.findViewById(R.id.EditWord_spelling);\n\t\tthis.cancel = (Button) this.findViewById(R.id.attention_cancel_button);\n\t\tthis.confirm = (Button) this.findViewById(R.id.attention_confirm_button);\n\t\tthis.meanning = (EditText) this.findViewById(R.id.EditWord_meanning);\n\t\tcancel.setOnClickListener(this);\n\t\tconfirm.setOnClickListener(this);\n\t\tif (action.equals(\"edit\")){\n\t\t\tBundle bundle = this.getIntent().getExtras();\n\t\t\tDataAccess data = new DataAccess(this);\n\t\t\tWord word =data.QueryAttention(\"ID ='\"+bundle.getString(\"id\")+\"'\", null).get(0);\n\t\t\tspelling.setText(word.getSpelling());\n\t\t\tmeanning.setText(word.getMeanning());\n\t\t}\n\t}",
"public void setOnClickListeners() {\n // Region Spinner\n regionSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedRegion = regionSpinner.getSelectedItem().toString();\n\n if (!selectedRegion.equals(\"Choose Region...\")) {\n int selectedRegionID = 0;\n for (RegionsResponse.Regions region : regionsList) {\n if (region.getRegionName().equals(selectedRegion))\n selectedRegionID = region.getRegionId();\n }\n districtSpinner.setEnabled(true);\n populateDistricts(selectedRegionID);\n } else {\n populateDistricts(0);\n districtSpinner.setSelection(0);\n districtSpinner.setEnabled(false);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n // District Spinner\n districtSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedDistrict = districtSpinner.getSelectedItem().toString();\n int selectedDistrictID = 0;\n if (!selectedDistrict.equals(\"Choose District...\")) {\n for (RegionsResponse.Regions region : regionsList) {\n if (region.getRegionName().equals(selectedDistrict))\n selectedDistrictID = region.getRegionId();\n }\n suburbSpinner.setEnabled(true);\n populateSuburbs(selectedDistrictID);\n\n } else {\n suburbSpinner.setSelection(0);\n suburbSpinner.setEnabled(false);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n // Method of sale value\n methodOfSaleEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (methodOfSaleSpinner.getSelectedItem().toString().equals(ApplicationConstants.MOS_AUCTIONED))\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n // Method of sale Spinner\n methodOfSaleSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedMethodOfSale = methodOfSaleSpinner.getSelectedItem().toString();\n methodOfSaleEditText.setVisibility(View.VISIBLE);\n switch (selectedMethodOfSale) {\n case ApplicationConstants.MOS_ASKING:\n\n break;\n case ApplicationConstants.MOS_AUCTIONED:\n\n break;\n case ApplicationConstants.MOS_ENQUIRIES:\n\n break;\n case ApplicationConstants.MOS_NEGOTIATION:\n methodOfSaleEditText.setVisibility(View.GONE);\n break;\n default:\n methodOfSaleEditText.setVisibility(View.GONE);\n break;\n }\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n ohDate1.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate2.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate3.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate4.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate5.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n// ohDate3.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n// @Override\n// public void onFocusChange(View v, boolean hasFocus) {\n// if (hasFocus)\n// showDateTimePickerDialog((EditText) v);\n// }\n// });\n\n addPropertyButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n validator.validate();\n }\n });\n\n// addSecurityGuidelinesCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n// @Override\n// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n// if (isChecked)\n// securityGuidelinesLayout.setVisibility(View.VISIBLE);\n// else\n// securityGuidelinesLayout.setVisibility(View.GONE);\n// }\n// });\n }",
"public void setTxtViews(){\n \tupdateTextView(\"Phil Simms\", \"txtPatientName\");\n \tupdateTextView(\"Male\", \"txtPatientGender\");\n \tupdateTextView(\"24\", \"txtPatientAge\");\n \tupdateTextView(\"13\", \"txtPatientRoom\");\n \tupdateTextView(\"Melanoma\", \"txtPatientDiagnosis\");\n \tupdateTextView(\"165\", \"txtPatientWeight\");\n \tupdateTextView(\"10am: Gave tylenol for headache.\", \"txtPatientRecentActions\");\n \tupdateTextView(\"Beach\", \"txtPatientNotes\");\n }",
"private void findViews() {\n\n altura_et = findViewById(R.id.et_altura);\n altura_et.setText(String.valueOf(user.getAltura()));\n\n peso_et = findViewById(R.id.et_peso);\n peso_et.setText(String.valueOf(user.getPeso()));\n\n nombreUO_et = findViewById(R.id.et_uo);\n nombreUO_et.setText(user.getUserID());\n\n email_et = (EditText) findViewById(R.id.editTextEmail);\n email_et.setText(user.getCorreo().toString());\n\n nombre = findViewById(R.id.tv_nombre);\n nombre.setText(user.getNombre().concat(\" \").concat(user.getApellidos()));\n\n fecha = findViewById(R.id.textViewFechaNaci);\n fecha.setText(fecha.getText().toString().concat(\" \").concat(user.getNacimiento()));\n\n email_et.setEnabled(false);\n altura_et.setEnabled(false);\n peso_et.setEnabled(false);\n nombreUO_et.setEnabled(false);\n }",
"private void connectVariablesToViews() {\n emailEditText = (EditText) findViewById(R.id.emailField);\n passwordEditText = (EditText) findViewById(R.id.passwordField);\n signIn = (Button) findViewById(R.id.sign_in);\n }",
"private void initViews() {\n editTextEmail = (EditText) findViewById(R.id.email);\n editTextPassword = (EditText) findViewById(R.id.password);\n textInputLayoutEmail = (TextInputLayout) findViewById(R.id.textInputLayoutEmail);\n textInputLayoutPassword = (TextInputLayout) findViewById(R.id.textInputLayoutPassword);\n buttonLogin = (Button) findViewById(R.id.buttonLogin);\n\n }",
"private void setListeners() {\r\n \t/*----------------------------\r\n\t\t * 1. Buttons\r\n\t\t\t----------------------------*/\r\n\t\t//\r\n \tButton bt_create = (Button) findViewById(R.id.db_manager_btn_create_table);\r\n \tButton bt_drop = (Button) findViewById(R.id.db_manager_btn_drop_table);\r\n \tButton bt_register_patterns = \r\n \t\t\t\t\t\t(Button) findViewById(R.id.db_manager_btn_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 2. Tags\r\n\t\t\t----------------------------*/\r\n \tbt_create.setTag(Methods.ButtonTags.db_manager_activity_create_table);\r\n \tbt_drop.setTag(Methods.ButtonTags.db_manager_activity_drop_table);\r\n \tbt_register_patterns.setTag(Methods.ButtonTags.db_manager_activity_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3. Listeners\r\n\t\t * \t\t1. OnClick\r\n\t\t * \t\t2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t/*----------------------------\r\n\t\t * 3.1. OnClick\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_drop.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_register_patterns.setOnClickListener(new ButtonOnClickListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3.2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_drop.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_register_patterns.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 4. Disenable => \"Create table\"\r\n\t\t\t----------------------------*/\r\n// \tbt_create.setEnabled(false);\r\n \t\r\n\t}",
"private void setOnClickListeners(){\n mDueDate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pickDate(mDueDateCalendar);\n }\n });\n mDueTime.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n pickTime(mDueDateCalendar);\n }\n });\n }",
"private void handleInputs() {\n final EditText startTimeEdit = (EditText) findViewById(R.id.start_time_text_edit);\n final EditText endTimeEdit = (EditText) findViewById(R.id.end_time_text_edit);\n\n startTimeEdit.addTextChangedListener(new TimeTextWatcher(startTimeEdit));\n endTimeEdit.addTextChangedListener(new TimeTextWatcher(endTimeEdit));\n\n final EditText dateEditText = (EditText) findViewById(R.id.date_text_edit);\n\n // Change entry date\n dateEditText.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n DateTimeFormatterBuilder dateTimeFormatterBuilder = new DateTimeFormatterBuilder();\n // specify some fallback formats, too.\n\n DateTimeParser[] parsers = {\n DateTimeFormat.forPattern(\"dd.MM.yyyy\").getParser(),\n DateTimeFormat.forPattern(\"yyyy-MM-dd\").getParser()};\n\n try {\n LocalDate parsedDate = LocalDate.parse(s.toString(), dateTimeFormatterBuilder.append(null, parsers).toFormatter());\n\n mEntry.setStart(mEntry.getStart().withDate(parsedDate.getYear(), parsedDate.getMonthOfYear(), parsedDate.getDayOfMonth()));\n mEntry.setEnd(mEntry.getEnd().withDate(parsedDate.getYear(), parsedDate.getMonthOfYear(), parsedDate.getDayOfMonth()));\n dateEditText.setError(null);\n } catch (IllegalArgumentException e) {\n dateEditText.setError(\"Bitte ein Datum im Format Tag.Monat.Jahr eingeben. Alternativ linken Button klicken.\");\n } finally {\n enableSendButtonIfPossible();\n }\n }\n });\n\n // change entry time (start and end)\n final EditText descriptionEditor = (EditText) findViewById(R.id.description);\n descriptionEditor.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n if (s.length() < 3) {\n descriptionEditor.setError(\"Bitte Mindestens 3 Buchstaben eingeben\");\n } else {\n descriptionEditor.setError(null);\n }\n mEntry.setDescription(s.toString());\n enableSendButtonIfPossible();\n }\n });\n\n // change to duration (sets end to start + input duration\n\n final EditText durationEdit = (EditText) findViewById(R.id.entry_duration_text_edit);\n durationEdit.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n // Parse duration as a time for now.\n\n try {\n LocalTime parsedTime = LocalTime.parse(s.toString(), DateTimeFormat.forPattern(\"HH:mm\"));\n // Need to check if it already is that value to prevent an infinite loop.\n String endTimeText = DateUtils.formatDateTime(TimeTableEntryCreationActivity.this, mEntry.getStart().plus(Duration.millis(parsedTime.getMillisOfDay())), DateUtils.FORMAT_SHOW_TIME);\n if (endDurationFlag && !endTimeEdit.getText().toString().equals(endTimeText)) {\n endDurationFlag = false;\n endTimeEdit.setText(endTimeText);\n }\n durationEdit.setError(null);\n } catch (IllegalArgumentException e) {\n durationEdit.setError(\"Bitte eine Dauer im Format Stunden:Minuten eingeben\");\n }\n }\n });\n\n // Oh boy, I sure wonder what the \"add 15 minutes button\" does...\n findViewById(R.id.entry_add_15_minutes_button).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n mEntry.setEnd(mEntry.getEnd().plusMinutes(15));\n updateTextViews();\n }\n });\n }",
"private void initView() {\n final EditText etName = (EditText) findViewById(R.id.et_name);\r\n final EditText etTel = (EditText) findViewById(R.id.et_tel);\r\n final EditText etAddress = (EditText) findViewById(R.id.et_cell_address);\r\n final EditText etPwd1 = (EditText) findViewById(R.id.et_pwd1);\r\n final EditText etPwd2 = (EditText) findViewById(R.id.et_pwd2);\r\n tvAddress = (TextView) findViewById(R.id.tv_cell_address);\r\n\r\n tvBrand = (TextView) findViewById(R.id.tv_brand);\r\n\r\n tvBrand.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n requestEtBrand();\r\n }\r\n });\r\n\r\n findViewById(R.id.ll_cell_address).setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n requestRunTimePermission(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, new PermissionListener() {\r\n @Override\r\n public void onGranted() {\r\n Intent intent = new Intent(RegisterActivity.this, AddressSelActivity.class);\r\n startActivityForResult(intent, 101);\r\n }\r\n\r\n @Override\r\n public void onDenied(List<String> permission) {\r\n }\r\n });\r\n }\r\n });\r\n\r\n findViewById(R.id.tv_submit).setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n\r\n registerOwner(etName.getText().toString(),\r\n etTel.getText().toString(), etAddress.getText().toString(),\r\n etPwd1.getText().toString(), etPwd2.getText().toString());\r\n }\r\n\r\n });\r\n }",
"private void listenToFields() {\n emailEditText.addTextChangedListener(new TextWatcher() {\n\n /**\n * This is auto-generated method that does something before listened fields' text changed\n * @param s\n * @param start\n * @param count\n * @param after\n */\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n /**\n * This is auto-generated method that does something when listened fields' text changed\n * @param s\n * @param start\n * @param before\n * @param count\n */\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n emailTyped = emailEditText.getText().toString();\n if ((emailTyped.isEmpty()) || (passwordTyped.isEmpty())) {\n signInEnabled = false;\n signIn.setEnabled(signInEnabled);\n } else {\n signInEnabled = true;\n signIn.setEnabled(signInEnabled);\n }\n }\n\n /**\n * This is auto-generated method that does something after listened fields' text changed\n * @param s\n */\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n\n passwordEditText.addTextChangedListener(new TextWatcher() {\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n passwordTyped = passwordEditText.getText().toString();\n if ((emailTyped.isEmpty()) || (passwordTyped.isEmpty())) {\n signInEnabled = false;\n signIn.setEnabled(signInEnabled);\n } else {\n signInEnabled = true;\n signIn.setEnabled(signInEnabled);\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }",
"public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n editButton=(Button)getView().findViewById(R.id.edit_details);\n updateButton=(Button)getView().findViewById(R.id.update_details);\n\n final TextView view_username=(TextView)getView().findViewById(R.id.view_conusrname);\n final TextView view_useremail=(TextView)getView().findViewById(R.id.view_conusremail);\n final TextView view_usermobile=(TextView)getView().findViewById(R.id.view_conusrmobile);\n final TextView view_usercity=(TextView)getView().findViewById(R.id.view_usercity);\n final TextView view_usergender=(TextView) getView().findViewById(R.id.view_gender);\n final TextView view_userdob=(TextView)getView().findViewById(R.id.view_userdob);\n\n view_username.setText(username);\n view_useremail.setText(useremail);\n view_usermobile.setText(userphone);\n view_usercity.setText(\"HYDERABAD\");\n view_usergender.setText(usergender);\n\n final EditText edit_username=(EditText) getView().findViewById(R.id.edit_conusrname);\n final EditText edit_useremail=(EditText) getView().findViewById(R.id.edit_conusremail);\n final EditText edit_usermobile=(EditText) getView().findViewById(R.id.edit_conusrmobile);\n final EditText edit_usercity=(EditText) getView().findViewById(R.id.edit_usercity);\n final EditText edit_usergender=(EditText) getView().findViewById(R.id.edit_gender);\n final EditText edit_userdob=(EditText) getView().findViewById(R.id.edit_userdob);\n\n editButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n try {\n editButton.setVisibility(View.GONE);\n updateButton.setVisibility(View.VISIBLE);\n\n // User Name\n if(view_username.getText().equals(\"Name\"))\n { edit_username.setText(\"\"); }\n else\n { edit_username.setText(view_username.getText()); }\n edit_username.setVisibility(View.VISIBLE);\n\n // User Gender\n edit_usergender.setText(view_usergender.getText());\n edit_usergender.setVisibility(View.VISIBLE);\n\n // User email\n if(view_useremail.getText().equals(\"Email Id\"))\n { edit_useremail.setText(\"\"); }\n else\n { edit_useremail.setText(view_useremail.getText()); }\n edit_useremail.setVisibility(View.VISIBLE);\n\n // User Mobile\n if(view_usermobile.getText().equals(\"Mobile Number\"))\n { edit_usermobile.setText(\"\"); }\n else\n { edit_usermobile.setText(view_usermobile.getText()); }\n edit_usermobile.setVisibility(View.VISIBLE);\n\n\n // User City\n if(view_usercity.getText().equals(\"City\"))\n { edit_usercity.setText(\"\"); }\n else\n { edit_usercity.setText(view_usercity.getText()); }\n edit_usercity.setVisibility(View.VISIBLE);\n\n // User City\n if(view_userdob.getText().equals(\"City\"))\n { edit_userdob.setText(\"\"); }\n else\n { edit_userdob.setText(view_userdob.getText()); }\n edit_userdob.setVisibility(View.VISIBLE);\n\n // Make View Text as invisible\n view_username.setVisibility(View.GONE);\n view_useremail.setVisibility(View.GONE);\n view_usermobile.setVisibility(View.GONE);\n view_usercity.setVisibility(View.GONE);\n view_userdob.setVisibility(View.GONE);\n view_usergender.setVisibility(View.GONE);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n });\n updateButton.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View v) {\n try {\n editButton.setVisibility(View.VISIBLE);\n updateButton.setVisibility(View.GONE);\n // User Name\n if(edit_username.getText().equals(\"Name\"))\n { view_username.setText(\"\"); }\n else\n { view_username.setText(edit_username.getText()); }\n view_username.setVisibility(View.VISIBLE);\n\n edit_username.setVisibility(View.GONE);\n edit_useremail.setVisibility(View.GONE);\n edit_usermobile.setVisibility(View.GONE);\n edit_usercity.setVisibility(View.GONE);\n edit_userdob.setVisibility(View.GONE);\n edit_usergender.setVisibility(View.GONE);\n// view_username.setVisibility(View.VISIBLE);\n view_useremail.setVisibility(View.VISIBLE);\n view_usermobile.setVisibility(View.VISIBLE);\n view_usercity.setVisibility(View.VISIBLE);\n view_userdob.setVisibility(View.VISIBLE);\n view_usergender.setVisibility(View.VISIBLE);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n });\n }",
"private void initTextFields()\n\t{\n\t\talpha_min_textfield.setText(String.valueOf(rangeSliders.get(\"alpha\").getLowValue()));\n\t\talpha_max_textfield.setText(String.valueOf(rangeSliders.get(\"alpha\").getHighValue()));\n\t\teta_min_textfield.setText(String.valueOf(rangeSliders.get(\"eta\").getLowValue()));\n\t\teta_max_textfield.setText(String.valueOf(rangeSliders.get(\"eta\").getHighValue()));\n\t\tkappa_min_textfield.setText(String.valueOf(rangeSliders.get(\"kappa\").getLowValue()));\n\t\tkappa_max_textfield.setText(String.valueOf(rangeSliders.get(\"kappa\").getHighValue()));\n\t\t\n\t\ttry {\n\t\t\t// Add listener for focus changes.\n//\t\t\tnumberOfDatasets_textfield.focusedProperty().addListener(new ChangeListener<Boolean>() {\n//\t\t\t @Override\n//\t\t\t public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue)\n//\t\t\t {\n//\t\t\t updateNumberOfDatasets(null);\n//\t\t\t }\n//\t\t\t});\n//\t\t\tnumberOfDivisions_textfield.focusedProperty().addListener(new ChangeListener<Boolean>() {\n//\t\t\t @Override\n//\t\t\t public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue)\n//\t\t\t {\n//\t\t\t updateNumberOfDivisions(null);\n//\t\t\t }\n//\t\t\t});\n\t\t\t\n\t\t\t// Set initial values.\n\t\t\tnumberOfDatasetsToGenerate\t= Integer.parseInt(numberOfDatasets_textfield.getText());\n\t\t\tnumberOfDivisions\t\t\t= Integer.parseInt(numberOfDivisions_textfield.getText());\n\t\t\t\n\t\t\t// Disable number of divisions by default (since random sampling is enabled by default).\n\t\t\tnumberOfDivisions_textfield.setDisable(true);\n\t\t}\n\t\t\n\t\tcatch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void populateInterfaceElements() {\n usernameTextView.setTypeface(Default.sourceSansProBold);\n userFullNameText.setTypeface(Default.sourceSansProLight);\n userFollowButton.setTypeface(Default.sourceSansProLight);\n\n setupUserProfilePicImageView();\n setupUsernameAndFullNameTextView();\n setupUserFollowButton();\n setupUserRelativeLayout();\n }",
"private void initInstances(View rootView) {\n editText_CompanyAddress = (EditText) rootView.findViewById(R.id.editText_CompanyAddress);\n editText_CompanyName = (EditText) rootView.findViewById(R.id.editText_CompanyName);\n editText_Telephone = (EditText) rootView.findViewById(R.id.editText_Telephone);\n editText_Name_TAXID = (EditText)rootView.findViewById(R.id.editText_Name_TAXID);\n editText_Name_Division = (EditText)rootView.findViewById(R.id.editText_Name_Division);\n editText_Name_RegisterID = (EditText)rootView.findViewById(R.id.editText_Name_RegisterID);\n editText_Name_ENDbillText = (EditText)rootView.findViewById(R.id.editText_Name_ENDbillText);\n editText_Name_VATRate = (EditText)rootView.findViewById(R.id.editText_Name_VATRate);\n btn_UpdateCompany = (ButtonRectangle) rootView.findViewById(R.id.btn_UpdateCompany);\n btn_back = (ImageButton)rootView.findViewById(R.id.btn_back);\n btn_back.setOnClickListener(this);\n btn_UpdateCompany.setOnClickListener(this);\n btn_UpdateCompany.setRippleSpeed(25);\n\n\n }",
"private void initViews() {\n charCounter = (TextView) findViewById(R.id.tv_char_counter);\n tweetInput = (EditText) findViewById(R.id.et_tweet_input);\n btnTweet = (Button) findViewById(R.id.btn_tweet);\n\n tweetInput.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n updateViews();\n }\n });\n }",
"public void setIDsforViews(){\n\n chequingAccountTV = findViewById(R.id.chequingAccountTV);\n savingsAndTaxesTV = findViewById(R.id.savingsAndTaxesTV);\n rainyDayFunTV = findViewById(R.id.rainyDayFunTV);\n travelSavingsTv = findViewById(R.id.travelSavingsTv);\n personalDevelopmentSavingsTV = findViewById(R.id.personalDevelopmentSavingsTV);\n investmentsTV = findViewById(R.id.investmentsTV);\n primaryHomeAmountTV = findViewById(R.id.primaryHomeAmountTV);\n secondaryHomeAmountTV = findViewById(R.id.secondaryHomeAmountTV);\n\n chequingAccount = findViewById(R.id.chequingAccount);\n savingsAndTaxesAmount = findViewById(R.id.savingsAndTaxesAmount);\n rainyDayFund = findViewById(R.id.rainyDayFund);\n travelSavings = findViewById(R.id.travelSavings);\n personalDevelopmentSavings = findViewById(R.id.personalDevelopmentSavings);\n investments = findViewById(R.id.investments);\n primaryHomeAmount = findViewById(R.id.primaryHomeAmount);\n secondaryHomeAmount = findViewById(R.id.secondaryHomeAmount);\n //assetsTable = findViewById(R.id.selectedAssetOrLiabilityTable);\n\n }",
"private void clearErrorsInEdittextFields() {\n\t\tetyourName.setOnFocusChangeListener(new OnFocusChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onFocusChange(View rv, boolean hasFocus) {\n\n\t\t\t\tetyourName.setError(null);\n\t\t\t\tetyourEmail.setError(null);\n\t\t\t\tetyourFeedback.setError(null);\n\t\t\t\tif (hasFocus) {\n\t\t\t\t\tif (etyourName.getText().length() != 0) {\n\n\t\t\t\t\t\tetyourName.setError(null);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\t\tetyourEmail.setOnFocusChangeListener(new OnFocusChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onFocusChange(View rv, boolean hasFocus) {\n\n\t\t\t\tetyourName.setError(null);\n\t\t\t\tetyourEmail.setError(null);\n\t\t\t\tetyourFeedback.setError(null);\n\n\t\t\t}\n\t\t});\n\t\tetyourFeedback.setOnFocusChangeListener(new OnFocusChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onFocusChange(View rv, boolean hasFocus) {\n\n\t\t\t\tetyourName.setError(null);\n\t\t\t\tetyourEmail.setError(null);\n\t\t\t\tetyourFeedback.setError(null);\n\n\t\t\t}\n\t\t});\n\n\t\tetyourName.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tetyourName.setError(null);\n\t\t\t}\n\t\t});\n\t\tetyourEmail.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tetyourEmail.setError(null);\n\t\t\t}\n\t\t});\n\t\tetyourFeedback.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tetyourFeedback.setError(null);\n\t\t\t}\n\t\t});\n\t}",
"private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickListener(this);\r\n\t\tlayout_ssmm.setOnClickListener(this);\r\n\t\ttxt_myredpager.setOnClickListener(this);\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsetContentView(R.layout.setting_myinfo);\n\t\tre_name=(RelativeLayout) findViewById(R.id.layout_name);\n\t\ttext_name=(TextView) findViewById(R.id.text_name);\n\t\ttext_name.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLog.i(\"点击事件\", \"点击事件被执行了\");\n\t\t\t\tfinal EditText localEditText = new EditText(getApplicationContext());\n\t\t\t\tAlertDialog.Builder aDialog=new AlertDialog.Builder(getApplicationContext());\n\t\t\t\taDialog.setTitle(\"请输入名字\")\n\t\t\t\t.setView(localEditText)\n\t\t\t\t.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tLog.i(\"点击事件\", \"编辑框点击事件被执行了\");\n\t\t\t\t\t\tString string=localEditText.getText().toString();\n\n\t\t\t\t\t\tif(string!=null){\n\t\t\t\t\t\t\tMyinfo.this.text_name.setText(string);\n\t\t\t\t\t\t\treturn;\n\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 Toast.makeText(getApplicationContext(), \"请输入ID\", 1000).show();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\t\t\n\t\t\t\t/*setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinal EditText localEditText = new EditText(getApplicationContext());\n\t\t\t\tAlertDialog.Builder aDialog=new AlertDialog.Builder(getApplicationContext());\n\t\t\t\taDialog.setTitle(\"请输入名字\")\n\t\t\t\t.setView(localEditText)\n\t\t\t\t.setPositiveButton(\"确定\", new DialogInterface.OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tString string=localEditText.getText().toString();\n\n\t\t\t\t\t\tif(string!=null){\n\t\t\t\t\t\t\tMyinfo.this.text_name.setText(string);\n\t\t\t\t\t\t\treturn;\n\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 Toast.makeText(getApplicationContext(), \"请输入ID\", 1000).show();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t/*\tnew AlertDialog.Builder(this).setTitle(\"请输入\").setIcon(\n\t\t\t\t\t android.R.drawable.ic_dialog_info).setView(\n\t\t\t\t\t new EditText(this)).setPositiveButton(\"确定\", null)\n\t\t\t\t\t .setNegativeButton(\"取消\", null).show();\n\t\t\t\t\n\t\t\t}\n\t\t});*/\n\t\t\n\t\n\t}",
"public void setTextFields() {\n PlayerName.setText(players.get(playerId).getName());\n PlayerAttack.setText(Integer.toString(players.get(playerId).getAttack()));\n PlayerHealth.setText(Integer.toString(players.get(playerId).getHealth()));\n PlayerDefense.setText(Integer.toString(players.get(playerId).getDefense()));\n PlayerWeapon.setText(players.get(playerId).getWeapon());\n PlayerShield.setText(players.get(playerId).getShield());\n CreatureName.setText(creatures.get(creatureId).getName());\n CreatureHealth.setText(Integer.toString(creatures.get(creatureId).getHealth()));\n CreatureAttack.setText(Integer.toString(creatures.get(creatureId).getAttack()));\n CreatureDefense.setText(Integer.toString(creatures.get(creatureId).getDefense()));\n }",
"private void initComponent() {\n\n mEdit = (EditText) findViewById(R.id.edit_key);\n }",
"private void setContent() {\n\n\t\tsession = new SessionManager(getApplicationContext());\n\n\t\tedt_fname = (EditText) findViewById(R.id.edt_fname);\n\t\tedt_lname = (EditText) findViewById(R.id.edt_lname);\n\t\tedt_contactno = (EditText) findViewById(R.id.edt_contactno);\n\t\tedt_email = (EditText) findViewById(R.id.edt_email);\n\t\tedt_password = (EditText) findViewById(R.id.edt_password);\n\t\tedt_confirmpassword = (EditText) findViewById(R.id.edt_confirmpassword);\n\n\t\tbtn_register = (Button) findViewById(R.id.btn_register);\n\t\t// edt_email.setClickable(false);\n\t}",
"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 onFocusChange(View v, boolean hasFocus) {\n switch (v.getId())\n {\n case R.id.password_edittext1:\n\n break;\n\n case R.id.tekrar_password_edittext:\n\n break;\n case R.id.name_edittext:\n setappirance(edtxt_name,txt_inplayout_name,hasFocus);\n edittext_filter=new Edittext_Filter(this,txt_inplayout_name.getId(),edtxt_name.getId());\n edtxt_name.setFilters(new InputFilter[]{edittext_filter.getInputFilter()});\n if(!hasFocus && edtxt_name.getText().toString()!=null || edtxt_name.getText().toString()!=\"\")\n {moshakhasat_motehkases.setName(edtxt_name.getText().toString());}\n break;\n case R.id.family_edittext:\n setappirance(edtxt_family,txt_inplayout_family,hasFocus);\n edittext_filter=new Edittext_Filter(this,txt_inplayout_family.getId(),edtxt_family.getId());\n edtxt_family.setFilters(new InputFilter[]{edittext_filter.getInputFilter()});\n\n if(!hasFocus && edtxt_family.getText().toString()!=null || edtxt_family.getText().toString()!=\"\")\n {moshakhasat_motehkases.setFamily(edtxt_family.getText().toString());}\n\n break;\n case R.id.codemeli_edittext:\n set_appirance_for_edittext_typeof_number(edtxt_codemeli,txt_inplayout_codemeli,hasFocus);\n if(!hasFocus && edtxt_codemeli.getText().toString()!=null || edtxt_codemeli.getText().toString()!=\"\")\n {moshakhasat_motehkases.setCodemeli(edtxt_codemeli.getText().toString());}\n if(edtxt_codemeli.getText().length()==10 && !hasFocus)\n {\n valley_api.check_kardan_codemeli(edtxt_codemeli.getText().toString());\n Log.i(\"vally_vazeiat_code_meli\",\"start\");\n }\n break;\n case R.id.shomarehamrah_edittext1:\n set_appirance_for_edittext_typeof_number(edtxt_shomarehamrah,txt_inplayout_shomarehamrah,hasFocus);\n if(!hasFocus && edtxt_shomarehamrah.getText().toString()!=null || edtxt_shomarehamrah.getText().toString()!=\"\")\n {moshakhasat_motehkases.setShomare_hamrah(edtxt_shomarehamrah.getText().toString());}\n if(!hasFocus && edtxt_shomarehamrah.getText().length()==11)\n {\n if (Permision_Utility.check_permision(A_Sabtnam.this,\"recive_sms\"))\n {\n valley_api.sms_security(edtxt_shomarehamrah.getText().toString());\n\n showdialog_codepayamaki();\n\n\n }\n else\n {\n Permision_Utility.requst_permision(A_Sabtnam.this,\"recive_sms\");\n }\n }\n\n break;\n\n case R.id.shomaresabet_edittext:\n set_appirance_for_edittext_typeof_number(edtxt_shomarehsabet,txt_inplayout_shomarehsabet,hasFocus);\n if(!hasFocus && edtxt_shomarehsabet.getText().toString()!=null || edtxt_shomarehsabet.getText().toString()!=\"\")\n {moshakhasat_motehkases.setShomare_sabet(edtxt_shomarehsabet.getText().toString());}\n\n break;\n case R.id.edtxt_addressdaghighskonat:\n setappirance(edtxt_adress_daghigh,txt_inplayout_adress_daghigh,hasFocus);\n edittext_filter=new Edittext_Filter(this,txt_inplayout_adress_daghigh.getId(),edtxt_adress_daghigh.getId());\n edtxt_adress_daghigh.setFilters(new InputFilter[]{edittext_filter.getInputFilter()});\n if((!hasFocus )&& (edtxt_adress_daghigh.getText().toString()!=null || edtxt_adress_daghigh.getText().toString()!=\"\"))\n {moshakhasat_motehkases.setAddress_daghigh(edtxt_adress_daghigh.getText().toString());\n\n }\n\n\n break;\n case R.id.jensiat_switch:\n if(!hasFocus)\n moshakhasat_motehkases.setJensiat(swjensiat.getText().toString());\n break;\n case R.id.vazeiatetahol_switch2:\n if(!hasFocus)\n moshakhasat_motehkases.setVazeyat_tahol(swvazeiattahol.getText().toString());\n\n\n\n }\n }",
"private void initViews() {\n nestedScrollView = (NestedScrollView) findViewById(R.id.nestedScrollView);\n nomeLogin = (TextInputEditText) findViewById(R.id.nomeLogin);\n emailLogin = (TextInputEditText) findViewById(R.id.emailLogin);\n senhaLogin = (TextInputEditText) findViewById(R.id.senhaLogin);\n senhaLoginConfirmar = (TextInputEditText) findViewById(R.id.senhaLoginConfirmar);\n btnCadastrar = (Button) findViewById(R.id.btnCadastrar);\n cadastrar = (TextView) findViewById(R.id.cadastrar);\n regEmail = (TextInputLayout) findViewById(R.id.regEmail);\n regNome = (TextInputLayout) findViewById(R.id.regNome);\n regSenha = (TextInputLayout) findViewById(R.id.regSenha);\n regSenhaConfirmar = (TextInputLayout) findViewById(R.id.regSenhaConfirmar);\n }",
"private void initViews() {\r\n etEmail = findViewById(R.id.et_mail);\r\n etVerifyCode = findViewById(R.id.et_l_verifyCode);\r\n etNewPsw = findViewById(R.id.et_new_psw);\r\n etConfirmPsw = findViewById(R.id.et_confirm_psw);\r\n }",
"@Override\n\tpublic void onClick(View v) {\n\t\tint id = v.getId();\n\t\tswitch (id) {\n\t\tcase R.id.et1:\n\t\t\tedit(et1, 1);\n\t\t\tbreak;\n\t\tcase R.id.et2:\n\t\t\tedit(et2, 2);\n\t\t\tbreak;\n\t\tcase R.id.et3:\n\t\t\tedit(et3, 3);\n\t\t\tbreak;\n\t\tcase R.id.et4:\n\t\t\tedit(et4, 4);\n\t\t\tbreak;\n\t\tcase R.id.et5:\n\t\t\tedit(et5, 5);\n\t\t\tbreak;\n\t\tcase R.id.et6:\n\t\t\tedit(et6, 6);\n\t\t\tbreak;\n\t\tcase R.id.et7:\n\t\t\tedit(et7, 7);\n\t\t\tbreak;\n\t\tcase R.id.et8:\n\t\t\tedit(et8, 8);\n\t\t\tbreak;\n\t\tcase R.id.et9:\n\t\t\tedit(et9, 9);\n\t\t\tbreak;\n\t\tcase R.id.et10:\n\t\t\tedit(et10, 10);\n\t\t\tbreak;\n\t\tcase R.id.et11:\n\t\t\tedit(et11, 11);\n\t\t\tbreak;\n\t\tcase R.id.et12:\n\t\t\tedit(et12, 12);\n\t\t\tbreak;\n\t\tcase R.id.et13:\n\t\t\tedit(et13, 13);\n\t\t\tbreak;\n\t\tcase R.id.et14:\n\t\t\tedit(et14, 14);\n\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n protected void initEvent() {\n mBackIBtn.setOnClickListener(this);\r\n mChooseVehicleTypeLL.setOnClickListener(chooseVehicleTypeListener);\r\n mVehicleCodeTV.setOnClickListener(this);\r\n mVehicleFrameHelpIV.setOnClickListener(this);\r\n mVehicleEngineHelpIV.setOnClickListener(this);\r\n mChooseCityLL.setOnClickListener(this);\r\n mQueryBtn.setOnClickListener(this);\r\n mVehiclePlateNumET.addTextChangedListener(new TextWatcher() {\r\n\r\n @Override\r\n public void onTextChanged(CharSequence arg0, int arg1, int arg2,\r\n int arg3) {\r\n // TODO Auto-generated method stub\r\n\r\n }\r\n\r\n @Override\r\n public void beforeTextChanged(CharSequence arg0, int arg1,\r\n int arg2, int arg3) {\r\n // TODO Auto-generated method stub\r\n\r\n }\r\n\r\n @Override\r\n public void afterTextChanged(Editable arg0) {\r\n // TODO Auto-generated method stub\r\n if (mVehicleCode.equals(\"苏\") && arg0.length() > 0\r\n && arg0.toString().substring(0, 1).equals(\"E\")) {\r\n mVehicleFrameNumLL.setVisibility(View.VISIBLE);\r\n mVehicleEngineNumLL.setVisibility(View.GONE);\r\n mVehicleFrameNumET.setHint(\"请输入车架号后7位\");\r\n mVehicleFrameNumET\r\n .setFilters(new InputFilter[]{new InputFilter.LengthFilter(\r\n 7)});\r\n } else if (mVehicleCode.equals(\"苏\") && arg0.length() > 0\r\n && !arg0.toString().substring(0, 1).equals(\"E\")) {\r\n mVehicleEngineNumLL.setVisibility(View.VISIBLE);\r\n mVehicleFrameNumLL.setVisibility(View.GONE);\r\n mVehicleEngineNumET.setHint(\"请输入发动机号后6位\");\r\n mVehicleEngineNumET\r\n .setFilters(new InputFilter[]{new InputFilter.LengthFilter(\r\n 6)});\r\n }\r\n }\r\n });\r\n\r\n showDeclair();\r\n\r\n }",
"private void initializeViewAndControls() {\r\n txtEmail.setText(\"Email - \"+ AppConstants.ADMIN_EMAIL);\r\n txtCustomerCarePhone.setText(\"Customer Care - \"+ AppConstants.CUSTOMER_CARE_NUMBER);\r\n txtTollFreePhone.setText(\"Toll Free - \"+ AppConstants.TOLL_FREE_NUMBER);\r\n }",
"private void setupValidations() {\n for (Map.Entry<EditText, Validator> e : mValidators.entrySet()) {\n // On every keystroke, validate input and make text colour black or red\n e.getKey().addTextChangedListener(new MyTextWatcher() {\n @Override\n public void afterTextChanged(Editable s) {\n if (e.getValue().test(e.getKey().getText().toString()))\n e.getKey().setTextColor(mInputTextColorNormal);\n else\n e.getKey().setTextColor(mInputTextColorInvalid);\n }\n });\n // When the field loses focus, set an error icon if the input is invalid\n e.getKey().setOnFocusChangeListener((v, hasFocus) -> {\n if (hasFocus) return;\n if (!e.getValue().test(e.getKey().getText().toString()))\n e.getKey().setError(e.getValue().getWarnMsg(), e.getValue().getWarnIcon());\n });\n }\n }",
"private void fillTextViews(String title, String description,\n\t\t\tString directions) {\n\t\t// AS: first create the edit text objects\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\t// AS: then set the text views\n\t\tetTitle.setText(title);\n\t\tetDescription.setText(description);\n\t\tetDirections.setText(directions);\n\n\t\t// AS: save the original key listeners\n\t\ttitleListener = etTitle.getKeyListener();\n\t\tdescriptionListener = etDescription.getKeyListener();\n\t\tdirectionsListener = etDirections.getKeyListener();\n\n\t\t// AS: then set them to be uneditable\n\t\tetTitle.setKeyListener(null);\n\t\tetDescription.setKeyListener(null);\n\t\tetDirections.setKeyListener(null);\n\n\t}",
"private void enableAllTextInputEditText() {\n List<TextInputEditText> textInputEditTextList = new ArrayList<>();\n textInputEditTextList.add(tin_perLitrePrice);\n textInputEditTextList.add(tin_fuelQuantityLitres);\n textInputEditTextList.add(tin_totalFuelPrice);\n textInputEditTextList.add(tin_currentKm);\n textInputEditTextList.add(tin_startingKm);\n textInputEditTextList.add(tin_distanceCovered);\n\n for (TextInputEditText item : textInputEditTextList) {\n item.setEnabled(true);\n }\n }",
"private void initUi() {\n\t\tsetContentView(R.layout.add_contact_layout);\n\t\tnameEditText = (EditText) findViewById(R.id.AddContactNameEditText);\n\t\tphoneNumberEditText = (EditText) findViewById(R.id.AddContactNumberEditText);\n\t\tsaveContactButton = (Button) findViewById(R.id.AddContactSaveContactButton);\n\n\t\tIntent intent = getIntent();\n\t\tBundle bundle = intent.getExtras();\n\t\tcontactID = bundle.getInt(\"ContactId\");\n\n\t\tcontactRepository = new ContactRepository(AddEmergencyContactsActivity.this);\n\n\t\tCursor ContactCursor = contactRepository\n\t\t\t\t.SelectContactsByWhere(contactID);\n\n\t\tif (ContactCursor.getCount() > 0) {\n\n\t\t\tContactCursor.moveToFirst();\n\t\t\tint nameIndex = ContactCursor.getColumnIndex(\"name\");\n\t\t\tint phonenumberIndex = ContactCursor.getColumnIndex(\"number\");\n\n\t\t\tString personName = ContactCursor.getString(nameIndex);\n\t\t\tint phoneNumber = ContactCursor.getInt(phonenumberIndex);\n\n\t\t\tnameEditText.setText(personName);\n\t\t\tphoneNumberEditText.setText(phoneNumber + \"\");\n\t\t\tinsertOrUpdate = false;\n\n\t\t}\n\t\tContactCursor.close();\n\t}",
"private void bindViews() {\n txt_home = (TextView) findViewById(R.id.txt_home);\n txt_progress = (TextView) findViewById(R.id.txt_progress);\n txt_community = (TextView) findViewById(R.id.txt_community);\n txt_profile = (TextView) findViewById(R.id.txt_profile);\n\n txt_home.setOnClickListener(this);\n txt_progress.setOnClickListener(this);\n txt_community.setOnClickListener(this);\n txt_profile.setOnClickListener(this);\n }",
"private void readViews() {\n mNameString = mNameEditText.getText().toString().trim();\n mQuantityString = Integer.parseInt(mQuantityTextView.getText().toString().trim());\n mPriceString = Double.parseDouble(mPriceEditText.getText().toString().trim());\n mPhoneString = Integer.parseInt(mPhoneEditText.getText().toString().trim());\n }",
"private void onTextChangeListener()\n {\n final Drawable icon = getResources().getDrawable(R.drawable.icon_done);\n icon.setBounds(0,0,icon.getIntrinsicWidth(),icon.getIntrinsicHeight());\n\n eName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n boolean flag = true;\n if(eName.getText().toString().length()<3||eName.getText().toString().length()>20)\n eName.setError(\"Invalid\");\n else\n {\n for(int i=0;i<eName.length();i++)\n {\n if(((eName.getText().toString().charAt(i)>='a')&&(eName.getText().toString().charAt(i)<='z'))||\n ((eName.getText().toString().charAt(i)>='A')&&(eName.getText().toString().charAt(i)<='Z'))||\n eName.getText().toString().charAt(i)==' '||eName.getText().toString().charAt(i)==':'||eName.getText().toString().charAt(i)=='.'||eName.getText().toString().charAt(i)=='_')\n eName.setError(\"Valid\",icon);\n else flag = false;\n }\n if(!flag)eName.setError(\"Invalid\");\n }\n }\n });\n\n eUserName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(eUserName.getText().toString().length()<5||eUserName.getText().toString().length()>15)\n eUserName.setError(\"invalid\");\n else\n eUserName.setError(\"Valid\",icon);\n }\n });\n\n eEmail.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n boolean flag = true;\n if(!eEmail.getText().toString().contains(\"@\"))\n flag = false;\n else\n {\n String[] email = eEmail.getText().toString().split(\"@\");\n if(email[0].length()<3||email[0].length()>30)\n flag = false;\n }\n\n if(flag)\n eEmail.setError(\"Valid\",icon);\n else\n eEmail.setError(\"invalid\");\n }\n });\n\n\n eAddress.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(eAddress.getText().toString().length()<10||eAddress.getText().toString().length()>30)\n eAddress.setError(\"invalid\");\n else eAddress.setError(\"Valid\",icon);\n }\n });\n\n ePassword.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(ePassword.getText().toString().length()<6||eAddress.getText().toString().length()>15)\n ePassword.setError(\"invalid\");\n else ePassword.setError(\"Valid\",icon);\n if(ePassword.getText().toString().length()>=6&&ePassword.getText().toString().length()<=9)\n txtPassErr.setText(\"Too short\");\n else if(ePassword.getText().toString().length()>=10&&ePassword.getText().toString().length()<=13)\n {\n txtPassErr.setText(\"Medium\");\n txtPassErr.setTextColor(Color.parseColor(\"#00E676\"));\n }\n else if(ePassword.getText().toString().length()>=14&&ePassword.getText().toString().length()<=15)\n {\n txtPassErr.setText(\"Strong\");\n txtPassErr.setTextColor(Color.parseColor(\"#00E676\"));\n }\n }\n });\n\n eFavourite.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(eFavourite.getText().toString().length()<4||eFavourite.getText().toString().length()>15)\n eFavourite.setError(\"invalid\");\n else\n eFavourite.setError(\"Valid\",icon);\n }\n });\n }",
"private void initResourceRefs() {\n\t\tmEdtAddress = (EditText) findViewById(R.id.setup_basics_edt_address);\n\t\tmEdtAddress.addTextChangedListener(this);\n\t\tmEdtPassword = (EditText) findViewById(R.id.setup_basics_edt_password);\n\t\tmEdtPassword.addTextChangedListener(this);\n\t\tmBtnNext = (Button) findViewById(R.id.setup_basics_btn_next);\n\t\t//validateFields();\n\t\tmBtnNext.setOnClickListener(this);\n\t}",
"private void addTextChangeListener()\n {\n final Drawable icon = getResources().getDrawable(R.drawable.icon_done);\n icon.setBounds(0,0,icon.getIntrinsicWidth(),icon.getIntrinsicHeight());\n\n groupName.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(groupName.getText().toString().length()<3||groupName.getText().toString().length()>20)\n groupName.setError(\"Invalid\");\n else\n groupName.setError(\"Valid\",icon);\n\n }\n });\n\n groupId.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(groupId.getText().toString().length()<5||groupId.getText().toString().length()>15)\n groupId.setError(\"Invalid\");\n else\n groupId.setError(\"Valid\",icon);\n }\n });\n\n groupDescription.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(groupDescription.getText().toString().length()<20||groupDescription.getText().toString().length()>200)\n groupDescription.setError(\"Invalid\");\n else groupDescription.setError(\"Valid\",icon);\n }\n });\n\n groupAddress.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n\n @Override\n public void afterTextChanged(Editable s) {\n if(groupAddress.getText().toString().length()<10||groupAddress.getText().toString().length()>30)\n groupAddress.setError(\"Invalid\");\n else groupAddress.setError(\"Valid\",icon);\n }\n });\n }",
"private void initViews() {\n\n //O metodo findViewById() recupera a referencia do EditText que se encontra no XML.\n editTextQuantidade = (EditText) findViewById(R.id.edittext_quantidade);\n imageViewOvos = (ImageView) findViewById(R.id.imageview_ovos);\n textViewTotal = (TextView) findViewById(R.id.textview_total);\n }",
"private void setupListeners()\n\t{\n\t\tfinal String query = \"INSERT INTO\" + \"`\" + table + \"` \" + getFields() + \"VALUES\" + getValues();\n\t\t\n\t\tqueryButton.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent click)\n\t\t\t{\n\t\t\t\tbaseController.getDataController().submitUpdateQuery(query);\n\t\t\t}\n\t\t});\n\t}",
"private void IntializeViewVariables() {\r\n tvDate = (TextView) findViewById(R.id.tvBillDateValue);\r\n tvBillNumber = (EditText) findViewById(R.id.tvBillNumberValue);\r\n\r\n boxDept = (RelativeLayout) findViewById(R.id.boxDept);\r\n boxCat = (RelativeLayout) findViewById(R.id.boxCat);\r\n boxItem = (RelativeLayout) findViewById(R.id.boxItem);\r\n\r\n mItemNameTextView = (TextView) findViewById(R.id.tvColItemName);\r\n mHSNTextView = (TextView) findViewById(R.id.tvColHSN);\r\n mQuantityTextView = (TextView) findViewById(R.id.tvColItemQty);\r\n mRateTextView = (TextView) findViewById(R.id.tvColRate);\r\n mAmountTextView = (TextView) findViewById(R.id.tvColAmount);\r\n mDeleteTextView = (TextView) findViewById(R.id.tvColDelete);\r\n\r\n etCustGSTIN = (EditText) findViewById(R.id.etCustGSTIN);\r\n aTViewSearchItem = (AutoCompleteTextView) findViewById(R.id.aCTVSearchItem);\r\n aTViewSearchMenuCode = (AutoCompleteTextView) findViewById(R.id.aCTVSearchMenuCode);\r\n /*txtSearchItemBarcode = (EditText) findViewById(R.id.etSearchItemBarcode);\r\n txtSearchItemBarcode.setOnKeyListener(Item_Search_Barcode_KeyPressEvent);*/\r\n\r\n spnr_pos = (Spinner) findViewById(R.id.spnr_pos);\r\n\r\n btndepart = (Button) findViewById(R.id.btn_depart);\r\n btncateg = (Button) findViewById(R.id.btn_categ);\r\n btnitem = (Button) findViewById(R.id.btn_item);\r\n btndepart.setOnClickListener(this);\r\n btncateg.setOnClickListener(this);\r\n btnitem.setOnClickListener(this);\r\n\r\n //tvdeptline = (TextView) findViewById(R.id.tvdeptline);\r\n //tvcategline = (TextView) findViewById(R.id.tvcategline);\r\n listViewDept = (ListView) findViewById(R.id.lstDepartmentNames);\r\n listViewDept.setOnItemClickListener(deptClick);\r\n listViewCateg = (ListView) findViewById(R.id.lstCategoryNames);\r\n listViewCateg.setOnItemClickListener(catClick);\r\n\r\n // gridViewItems = (GridView) findViewById(R.id.gridItems);\r\n // gridViewItems.setOnItemClickListener(itemsClick);\r\n\r\n mRecyclerGridView = (RecyclerView) findViewById(R.id.gridItems);\r\n mRecyclerGridView.setHasFixedSize(true);\r\n\r\n edtCustId = (EditText) findViewById(R.id.edtCustId);\r\n edtCustName = (EditText) findViewById(R.id.edtCustName);\r\n edtCustPhoneNo = (EditText) findViewById(R.id.edtCustPhoneNo);\r\n edtCustAddress = (EditText) findViewById(R.id.edtCustAddress);\r\n btnAddCustomer = (Button) findViewById(R.id.btn_DineInAddCustomer);\r\n idd_date = (LinearLayout) findViewById(R.id.idd_date);\r\n tblOrderItems = (TableLayout) findViewById(R.id.tblOrderItems);\r\n\r\n tvSubUdfValue = (EditText) findViewById(R.id.tvSubUdfValue);\r\n tvSubTotal = (TextView) findViewById(R.id.tvSubTotalValue);\r\n tvCGSTValue = (TextView) findViewById(R.id.tvTaxTotalValue);\r\n tvSGSTValue = (TextView) findViewById(R.id.tvServiceTaxValue);\r\n tvBillAmount = (TextView) findViewById(R.id.tvBillTotalValue);\r\n tvcessValue = (TextView) findViewById(R.id.tvcessValue);\r\n tvOthercharges = (TextView) findViewById(R.id.txtOthercharges);\r\n tvDiscountPercentage = (TextView) findViewById(R.id.tvDiscountPercentage);\r\n tvDiscountAmount = (TextView) findViewById(R.id.tvDiscountAmount);\r\n\r\n tvServiceTax_text = (TextView) findViewById(R.id.tvServiceTax);\r\n\r\n btnDeleteBill = (WepButton) findViewById(R.id.btn_DeleteBill);\r\n btnPayBill = (WepButton) findViewById(R.id.btn_PayBill);\r\n btnSaveKOT = (WepButton) findViewById(R.id.btn_SaveKOT);\r\n btnPrintKOT = (WepButton) findViewById(R.id.btn_PrintKOT);\r\n btnPrintBill = (WepButton) findViewById(R.id.btn_PrintBill);\r\n btnClear = (WepButton) findViewById(R.id.btn_Clear);\r\n btnReprint = (WepButton) findViewById(R.id.btn_Reprint);\r\n btn_ViewBill = (WepButton) findViewById(R.id.btn_ViewBill);\r\n btnDeliveryStatus = (WepButton) findViewById(R.id.btn_DeliveryStatus);\r\n\r\n btnAddCustomer.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n AddCustomer(v);\r\n }\r\n });\r\n btnSaveKOT.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n SaveKOT(v);\r\n }\r\n });\r\n btnPrintKOT.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n printKOT(v);\r\n }\r\n });\r\n btnPrintBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n printBILL(v);\r\n }\r\n });\r\n btnPayBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n PayBill(v);\r\n }\r\n });\r\n btnClear.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n Clear(v);\r\n }\r\n });\r\n btnDeleteBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n DeleteBill(v);\r\n }\r\n });\r\n btnReprint.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n ReprintBill(v);\r\n }\r\n });\r\n btn_ViewBill.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n viewBill();\r\n }\r\n });\r\n btnDeliveryStatus.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n KOTStatus(v);\r\n }\r\n });\r\n\r\n\r\n // GST implementation\r\n\r\n tvHSNCode_out = (TextView) findViewById(R.id.tvColHSN);\r\n relative_Interstate = (LinearLayout) findViewById(R.id.relative_interstate);\r\n relative_pos = (LinearLayout) findViewById(R.id.relative_pos);\r\n tvIGSTValue = (TextView) findViewById(R.id.tvIGSTValue);\r\n chk_interstate = (CheckBox) findViewById(R.id.checkbox_interstate);\r\n autoCompleteTextViewSearchItemBarcode = (AutoCompleteTextView) findViewById(R.id.aCTVSearchItemBarcode);\r\n\r\n etCustGSTIN.addTextChangedListener(this);\r\n edtCustName.addTextChangedListener(this);\r\n edtCustPhoneNo.addTextChangedListener(this);\r\n edtCustAddress.addTextChangedListener(this);\r\n aTViewSearchItem.addTextChangedListener(this);\r\n aTViewSearchMenuCode.addTextChangedListener(this);\r\n autoCompleteTextViewSearchItemBarcode.addTextChangedListener(this);\r\n\r\n autoCompleteTextViewSearchItemBarcode.setOnItemClickListener(new AdapterView.OnItemClickListener() {\r\n\r\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\r\n try {\r\n /*Toast.makeText(BillingScreenActivity.this, aTViewSearchMenuCode.getText().toString(),\r\n Toast.LENGTH_SHORT).show();*/\r\n if ((autoCompleteTextViewSearchItemBarcode.getText().toString().equals(\"\"))) {\r\n MsgBox.Show(\"Warning\", \"Scan BarCode\");\r\n } else {\r\n Cursor BarcodeItem = db\r\n .getItemssbyBarCode((autoCompleteTextViewSearchItemBarcode.getText().toString().trim()));\r\n int i =0, added =0;\r\n while (BarcodeItem.moveToNext()) {\r\n if(i!=position)\r\n {\r\n i++;\r\n continue;\r\n }\r\n added =1;\r\n btnClear.setEnabled(true);\r\n AddItemToOrderTable(BarcodeItem);\r\n autoCompleteTextViewSearchItemBarcode.setText(\"\");\r\n // ((EditText)v).setText(\"\");\r\n } if(added==0) {\r\n MsgBox.Show(\"Warning\", \"Item not found for Selected BarCode\");\r\n }\r\n }\r\n } catch (Exception ex) {\r\n Toast.makeText(getApplicationContext(), ex.getMessage(), Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n });\r\n\r\n etOnlineOrderNo = (EditText) findViewById(R.id.et_order_page_content_home_delivery_online_order_no);\r\n tvOnlineOrderNo = (TextView) findViewById(R.id.tv_order_page_content_home_delivery_online_order_no);\r\n etOnlineOrderNo.setVisibility(View.INVISIBLE);\r\n tvOnlineOrderNo.setVisibility(View.INVISIBLE);\r\n }",
"private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }",
"private void initViews() {\n\t\tet_area = (EditText) findViewById(R.id.et_area);\r\n\t\tbtn_search = (Button) findViewById(R.id.btn_search);\r\n\t\tll_main = (LinearLayout) findViewById(R.id.ll_main);\r\n\t}",
"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 findAttributesId() {\r\n\t\tparentActivity = this;\r\n\t\tcontext = this;\r\n\t\temailAddress = (EditText) findViewById(R.id.registrationEmailField);\r\n\t\tfirstName = (EditText) findViewById(R.id.registrationFirstName);\r\n\t\tlastName = (EditText) findViewById(R.id.registrationLastName);\r\n\t\tpassword = (EditText) findViewById(R.id.registrationPasswrod);\r\n\t\tconfirmPassword = (EditText) findViewById(R.id.registrationConfirmPassword);\r\n\t\tcontactNumber = (EditText) findViewById(R.id.registrationCompanyName);\r\n\t\tloadingProgress = (ProgressBar) findViewById(R.id.loadingProgress);\r\n\t}",
"private void setUpClickListerns ()\n\t{\n\t\tLinearLayout temp_layout ;\n\t\tButton temp_button ;\n\t\tfor (int i = 0 ; i<numPad.getChildCount() ; i++)\n\t\t{\n\t\t\ttemp_layout = (LinearLayout) numPad.getChildAt(i);\n\t\t\tfor (int j = 0;j< temp_layout.getChildCount() ; j++)\n\t\t\t{\n\t\t\t\ttemp_button = (Button) temp_layout.getChildAt(j);\n\t\t\t\ttemp_button.setOnClickListener(this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tchangePass.setOnClickListener(this);\n\t\tclear.setOnClickListener(this);\n\t\tpassField.setFocusable(false);\n\t}",
"private void set_autotext_adapters(){\n ArrayAdapter<String> amount_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, amount_autos);\n amount_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_amount);\n amount_text.setAdapter(amount_adapter);\n ArrayAdapter<String> memo_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, memo_autos);\n memo_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_memo);\n memo_text.setAdapter(memo_adapter);\n }",
"private void setupView()\n\t{\n\t\tnameET = (EditText)findViewById(R.id.newPlaceName);\n\t\taddressET = (EditText)findViewById(R.id.placeAddress);\n\t\tcityET = (EditText)findViewById(R.id.cityET);\n\t\t\n\t\tView b = findViewById(R.id.placeBtnCancel);\n\t\tb.setOnTouchListener(TOUCH);\n\t\tb.setOnClickListener(this);\n\n\t\tView b2 = findViewById(R.id.btnAcceptPlace);\n\t\tb2.setOnTouchListener(TOUCH);\n\t\tb2.setOnClickListener(new View.OnClickListener() {\n\t\t @Override\n\t\t public void onClick(View v) {\n\t\t \tplacename = nameET.getText().toString();\n\t\t \tplaceaddress = addressET.getText().toString();\n\t\t \tplacecity = cityET.getText().toString();\n\t\t \tif(placename.equals(\"\") || placeaddress.equals(\"\") || placecity.equals(\"\")){\n\t\t \t\tToast.makeText(context, \"Fill in all fields!\", Toast.LENGTH_SHORT).show();\n\t\t \t\tfinish();\n\t\t \t\treturn;\n\t\t \t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tList<Address> list = gc.getFromLocationName(placeaddress + placecity, 1);\n\t\t\t\t\tif(list.size() == 0){\n\t\t\t \t\tToast.makeText(context, \"Place does not exist!\", Toast.LENGTH_SHORT).show();\n\t\t\t \t\tfinish();\n\t\t\t \t\treturn;\n\t\t\t \t}\n\t\t\t\t\tAddress add = list.get(0);\n\t\t\t\t\tDouble lat = add.getLatitude();\n\t\t\t\t\tDouble lng = add.getLongitude();\n\t\t\t\t\tPlace p = new Place(placename, placeaddress, placecity, ID, String.valueOf(lat), String.valueOf(lng));\n\t\t\t\t\tcurrentMember.addPlace(p);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tnew UpdatePlaceTask(lat, lng).execute().get();\n\t\t\t\t\t\tInputMethodManager imm =(InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\timm.hideSoftInputFromWindow(cityET.getWindowToken(),0);\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\t\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t }\n\t\t});\n\t}",
"public void saveTextBoxs(){\n dni[indice] = Long.parseLong(txtDni.getText());\n nombre[indice] = txtNombre.getText();\n apellido[indice] = txtApellido.getText();\n direccion[indice] = txtDireccion.getText();\n telefono[indice] = txtTelefono.getText();\n fNacimiento[indice] = txtFechaNacimiento.getText();\n loadTextBoxs();\n }",
"@Override\n public void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.part_layout);\n \n editTextforAll();\n setDoneButtonListener();\n setSafetyButtonListener();\n }",
"public void setListeners() {\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n settingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showEditDialog();\n }\n });\n\n cameraButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showChoosePictureDialog();\n }\n });\n }",
"private void initListeners() {\n btnCadastrar.setOnClickListener(this);\n cadastrar.setOnClickListener(this);\n }",
"private void setupClickEvents() {\n btnCreateUser.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n if (edtEnterPin.getText().toString().equals(edtConfirmPin.getText().toString())) {\n if (validate())\n createNewUser();\n } else\n Toast.makeText(CreatePinActivity.this, Constants.ERR_MSG_PIN_MUST_SAME, Toast.LENGTH_SHORT).show();\n }\n });\n\n rgGender.setOnCheckedChangeListener((radioGroup, i) -> {\n selectedGenderId = rgGender.getCheckedRadioButtonId();\n rbGender = findViewById(selectedGenderId);\n });\n\n edtDateOfBirth.setOnClickListener(view -> {\n DTU.showDatePickerDialog(context, DTU.FLAG_OLD_AND_NEW, edtDateOfBirth);\n });\n }",
"private void initView() {\n\t\tself_info.setOnClickListener(this);\r\n\t\twhich_org.setOnClickListener(this);\r\n\t\tmember_information.setOnClickListener(this);\r\n\t}",
"public void setUpdateData() {\n if (updateTypestr.equalsIgnoreCase(\"Family\")) {\n addStudentScreenBinding.familyNameLinear.setVisibility(View.GONE);\n addStudentScreenBinding.addStudentTxt.setText(\"Update Family\");\n addStudentScreenBinding.classTypeGroup.setVisibility(View.GONE);\n addStudentScreenBinding.emailEdt.setVisibility(View.VISIBLE);\n addStudentScreenBinding.emailEdt.setText(eAstr);\n addStudentScreenBinding.emailEdt.setEnabled(false);\n addStudentScreenBinding.phoneNoEdt.setVisibility(View.VISIBLE);\n addStudentScreenBinding.phoneNoEdt.setText(pNstr);\n\n } else {\n addStudentScreenBinding.addStudentTxt.setText(\"Update Contact\");\n addStudentScreenBinding.firstNameEdt.setText(fNstr);\n addStudentScreenBinding.lastNameEdt.setText(lNstr);\n addStudentScreenBinding.familynameTxt.setText(familyNameStr);\n addStudentScreenBinding.dateOfBirthEdt.setText(dobstr);\n if (cnIdstr.equalsIgnoreCase(\"Child\")) {\n addStudentScreenBinding.childChk.setChecked(true);\n } else if (cnIdstr.equalsIgnoreCase(\"Spouse\")) {\n addStudentScreenBinding.spouseChk.setChecked(true);\n }\n addStudentScreenBinding.lastNameEdt.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n @Override\n public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {\n if (i == EditorInfo.IME_ACTION_NEXT) {\n InputMethodManager imm = (InputMethodManager) textView.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(textView.getWindowToken(), 0);\n\n addStudentScreenBinding.dateOfBirthEdt.requestFocus();\n }\n return false;\n }\n });\n }\n addStudentScreenBinding.registerBtn.setText(\"Update\");\n addStudentScreenBinding.firstNameEdt.setText(fNstr);\n addStudentScreenBinding.lastNameEdt.setText(lNstr);\n String[] splitdate = dobstr.split(\"\\\\s+\");\n addStudentScreenBinding.dateOfBirthEdt.setText(splitdate[0]);\n\n if (gIdstr.equalsIgnoreCase(\"1\")) {\n addStudentScreenBinding.maleChk.setChecked(true);\n } else {\n addStudentScreenBinding.femaleChk.setChecked(true);\n }\n }",
"private void setAllFields(){\n Expense retrievedExpense = db.getExpenseWithId(bundle.getInt(EXPENSE_TABLE_COLUMN_ID));\n label.setText(retrievedExpense.getLabel());\n\n // Get adapter from category array\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.expense_category, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Get position where it matches the category name retrieved with the category array\n int spinnerPosition = adapter.getPosition(retrievedExpense.getCategory());\n\n // Set category spinner\n category.setSelection(spinnerPosition);\n\n cost.setText(String.format(\"%.2f \",retrievedExpense.getCost()));\n paid.setChecked(retrievedExpense.isWasItPaid());\n dateDue.setText(retrievedExpense.getDueDate());\n\n }",
"private void setupView() {\n\t\tphoneEditView = (EditText) findViewById(R.id.edit_phone);\n\n\t\tconfirmBtn = (ImageView) findViewById(R.id.btnStart);\n\t\tconfirmBtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tboolean isRegularPhoneNumber = phoneEditView.getText()\n\t\t\t\t\t\t.toString().matches(\"[0-9]{10}\");\n\t\t\t\tphoneCheckRes(isRegularPhoneNumber);\n\t\t\t}\n\t\t});\n\t}",
"private void setupUI() {\n rbMale = findViewById(R.id.rb_male);\n rbFemale = findViewById(R.id.rb_female);\n spnStatus = findViewById(R.id.spn_status_create);\n rgGender = findViewById(R.id.rd_gender_register);\n btnCreateUser = findViewById(R.id.btn_create_user);\n edtLastName = findViewById(R.id.edt_last_name_create);\n edtEnterPin = findViewById(R.id.edt_enter_pin_create);\n edtFirstName = findViewById(R.id.edt_first_name_create);\n spnBloodGroup = findViewById(R.id.spn_blood_group_create);\n edtConfirmPin = findViewById(R.id.edt_confirm_pin_create);\n edtDateOfBirth = findViewById(R.id.edt_date_of_birth_create);\n edtMobileNumber = findViewById(R.id.edt_mobile_number_create);\n }",
"private void initViews() {\n View view = getView();\n if (view != null) {\n edtConfirmPassword = view.findViewById(R.id.edt_reg_confim_password);\n edtConfirmPassword.setTag(\"Confirm Password\");\n edtEmail = view.findViewById(R.id.edt_reg_email);\n edtEmail.setTag(\"Email\");\n edtPhone = view.findViewById(R.id.edt_reg_phone);\n edtPhone.setTag(\"Phone\");\n edtPassword = view.findViewById(R.id.edt_reg_password);\n edtPassword.setTag(\"Password\");\n tv_RegisterSignIn = view.findViewById(R.id.tv_register_sign_in);\n btn_reg_signup = view.findViewById(R.id.btn_reg_signup);\n edtUserName = view.findViewById(R.id.edt_reg_name);\n edtUserName.setTag(\"Name\");\n }\n }",
"@Override\n public void onClick(View v) {\n getActivityDetails(view);\n\n String editDialogDistance = null;\n String editDialogAlt = null;\n String editDialogAvgHR = null;\n String editDialogMaxHR = null;\n\n long editDialogId = Long.parseLong(editId.getText().toString());\n String editDialogTime = editTime.getText().toString();\n String editDialogTotalTime = editTotalTime.getText().toString();\n String editDialogInfo = editInfo.getText().toString();\n String editDialogSport = editSport.getText().toString();\n try {\n editDialogDistance = editDistance.getText().toString();\n editDialogAlt = editAltitude.getText().toString();\n editDialogAvgHR = editAvgHR.getText().toString();\n editDialogMaxHR = editMaxHR.getText().toString();\n } catch (NullPointerException e) {\n\n }\n\n showEditDialog(editDialogId, editDialogTime, editDialogTotalTime, editDialogDistance,\n editDialogInfo, editDialogSport, editDialogAlt, editDialogAvgHR, editDialogMaxHR, _day, _month, _year);\n }",
"@Override\n public void onClick(View v) {\n getActivityDetails(view);\n\n String editDialogDistance = null;\n String editDialogAlt = null;\n String editDialogAvgHR = null;\n String editDialogMaxHR = null;\n\n long editDialogId = Long.parseLong(editId.getText().toString());\n String editDialogTime = editTime.getText().toString();\n String editDialogTotalTime = editTotalTime.getText().toString();\n String editDialogInfo = editInfo.getText().toString();\n String editDialogSport = editSport.getText().toString();\n try {\n editDialogDistance = editDistance.getText().toString();\n editDialogAlt = editAltitude.getText().toString();\n editDialogAvgHR = editAvgHR.getText().toString();\n editDialogMaxHR = editMaxHR.getText().toString();\n } catch (NullPointerException e) {\n\n }\n\n showEditDialog(editDialogId, editDialogTime, editDialogTotalTime, editDialogDistance,\n editDialogInfo, editDialogSport, editDialogAlt, editDialogAvgHR, editDialogMaxHR, _day, _month, _year);\n }"
] | [
"0.74111295",
"0.7213857",
"0.67097723",
"0.66027904",
"0.64898425",
"0.6469464",
"0.64245033",
"0.64192915",
"0.633009",
"0.6327592",
"0.63231546",
"0.6320792",
"0.6302187",
"0.629397",
"0.61935306",
"0.61672044",
"0.61140156",
"0.60681933",
"0.60452676",
"0.6037553",
"0.6019866",
"0.6018763",
"0.59499073",
"0.5936087",
"0.5930864",
"0.593051",
"0.5918821",
"0.59161186",
"0.5915012",
"0.5914593",
"0.5887863",
"0.588249",
"0.5854817",
"0.5846898",
"0.5841622",
"0.5835095",
"0.5833299",
"0.58207005",
"0.58124304",
"0.5805795",
"0.5802894",
"0.57968193",
"0.5796501",
"0.57953113",
"0.57854086",
"0.57825977",
"0.57814133",
"0.5773372",
"0.57569575",
"0.57481223",
"0.57464993",
"0.5742783",
"0.5742379",
"0.5737451",
"0.5736834",
"0.5722657",
"0.5718703",
"0.57143366",
"0.57142323",
"0.5710645",
"0.5710438",
"0.57039124",
"0.5699434",
"0.569523",
"0.56895536",
"0.568922",
"0.56830114",
"0.5675612",
"0.567486",
"0.56737226",
"0.56728697",
"0.56625694",
"0.56620413",
"0.5659631",
"0.5649152",
"0.56474966",
"0.5642927",
"0.56330734",
"0.56251675",
"0.56212085",
"0.5618134",
"0.5616788",
"0.5605031",
"0.56035787",
"0.5599922",
"0.55949634",
"0.556908",
"0.5568386",
"0.5565481",
"0.55616355",
"0.55553615",
"0.55553293",
"0.5550076",
"0.55345994",
"0.55339557",
"0.55295783",
"0.55234087",
"0.55220354",
"0.55180204",
"0.55180204"
] | 0.6933416 | 2 |
Assign all spinners to their respective id from the layout. Also assign the ArrayAdapters to the appropriate spinners. | public View setupSpinners(View v){
// Assign Spinners
spinnerCollect = (Spinner) v.findViewById(R.id.eSpinner_CollectWhat);
// Create an ArrayAdapter using the string array and a default spinner layout
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this.getActivity(),
R.array.eCollectWhat_array, android.R.layout.simple_spinner_item);
// Specify the layout to use when the list of choices appears
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
spinnerCollect.setAdapter(adapter); // Apply the adapter to the spinner
spinnerCollect.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(spinnerCollect.getSelectedItem().toString());
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
return v;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setUpSpinners(){\n spinners = new Spinner[spinnerId.length];\n for(int i = 0; i < spinners.length; i++){\n spinners[i] = (Spinner) findViewById(spinnerId[i]);\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.instruction_qty, R.layout.spinner_item_inst);\n adapter.setDropDownViewResource(R.layout.spinner_list_dropdown_inst);\n spinners[i].setAdapter(adapter);\n spinners[i].setBackgroundColor(Color.WHITE);\n }\n }",
"private void initSpinners() {\n mColourArray = Constants.colours.keySet().toArray(new String[Constants.colours.keySet().size()]);\n mPositonArray = Constants.gravity.keySet().toArray(new String[Constants.gravity.keySet().size()]);\n mScaleArray = Constants.scale.keySet().toArray(new String[Constants.scale.keySet().size()]);\n\n // Init Adapters\n ArrayAdapter<String> colourAdapter = new ArrayAdapter<>(\n this,\n R.layout.adapter_dropdown_menu_item,\n mColourArray);\n\n ArrayAdapter<String> positionAdapter = new ArrayAdapter<>(\n this,\n R.layout.adapter_dropdown_menu_item,\n mPositonArray);\n\n ArrayAdapter<String> scaleAdapter = new ArrayAdapter<>(\n this,\n R.layout.adapter_dropdown_menu_item,\n mScaleArray);\n\n // Set Adapter\n mDataBinding.textColor.setAdapter(colourAdapter);\n mDataBinding.backgroundColor.setAdapter(colourAdapter);\n mDataBinding.position.setAdapter(positionAdapter);\n mDataBinding.imageScale.setAdapter(scaleAdapter);\n\n // Set Listeners\n mDataBinding.textColor.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mTextColour = Constants.colours.get(selectedItemKey);\n });\n\n mDataBinding.backgroundColor.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mBackgroundColour = Constants.colours.get(selectedItemKey);\n });\n\n mDataBinding.position.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mPosition = Constants.gravity.get(selectedItemKey);\n });\n\n mDataBinding.imageScale.setOnItemClickListener((adapterView, view, i, l) -> {\n String selectedItemKey = (String) adapterView.getItemAtPosition(i);\n mScale = Constants.scale.get(selectedItemKey);\n });\n\n // Set defaults\n mDataBinding.textColor.setText(colourAdapter.getItem(1), false);\n mDataBinding.backgroundColor.setText(colourAdapter.getItem(0), false);\n mDataBinding.position.setText(positionAdapter.getItem(0), false);\n mDataBinding.imageScale.setText(scaleAdapter.getItem(0), false);\n mTextColour = colourAdapter.getItem(1);\n mBackgroundColour = colourAdapter.getItem(0);\n mPosition = positionAdapter.getItem(0);\n mScale = scaleAdapter.getItem(0);\n }",
"private void initSpinners() {\r\n Spinner arrivalSpinner = (Spinner)findViewById(R.id.arrival_place);\r\n SpinnerAdapter arrivalSpinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, new LinkedList<>(manager.getAllSights()));\r\n arrivalSpinner.setAdapter(arrivalSpinnerAdapter);\r\n\r\n Spinner departureSpinner = (Spinner)findViewById(R.id.departure_place);\r\n SpinnerAdapter departureSpinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, new LinkedList<>(manager.getAllSights()));\r\n departureSpinner.setAdapter(departureSpinnerAdapter);\r\n\r\n Spinner focusSpinner = (Spinner)findViewById(R.id.focus);\r\n SpinnerAdapter focusSpinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, Category.values());\r\n focusSpinner.setSelection(3);\r\n focusSpinner.setAdapter(focusSpinnerAdapter);\r\n }",
"private void buildSpinners() {\n // assign spinner with resource id\n liquor1 = (Spinner)findViewById(R.id.liquor1);\n liquor2 = (Spinner)findViewById(R.id.liquor2);\n liquor3 = (Spinner)findViewById(R.id.liquor3);\n liquor4 = (Spinner)findViewById(R.id.liquor4);\n liquor5 = (Spinner)findViewById(R.id.liquor5);\n\n // create array of spinners to facilitate associations\n spinnerArrayList.add(liquor1);\n spinnerArrayList.add(liquor2);\n spinnerArrayList.add(liquor3);\n spinnerArrayList.add(liquor4);\n spinnerArrayList.add(liquor5);\n\n // build specific spinners for each type of liquor\n for (int i = 0; i < numLiquors; i++) {\n liquorString[i] = liquorList.get(i);\n assignSpinner(i + 1, liquorString[i]);\n }\n }",
"private void fillSpinners()\r\n {\r\n ArrayList<String> monthList = new ArrayList<String>(12);\r\n ArrayList<String> yearList = new ArrayList<String>(4);\r\n\r\n // Create strings\r\n monthList.add(\"JAN\");\r\n monthList.add(\"FEB\");\r\n monthList.add(\"MAR\");\r\n monthList.add(\"APR\");\r\n monthList.add(\"MAY\");\r\n monthList.add(\"JUN\");\r\n monthList.add(\"JUL\");\r\n monthList.add(\"AUG\");\r\n monthList.add(\"SEP\");\r\n monthList.add(\"OCT\");\r\n monthList.add(\"NOV\");\r\n monthList.add(\"DEC\");\r\n\r\n yearList.add(\"2019\");\r\n yearList.add(\"2020\");\r\n yearList.add(\"2021\");\r\n\r\n // Create adapters\r\n ArrayAdapter<String> monAd = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, monthList);\r\n ArrayAdapter<String> yearAd = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, yearList);\r\n\r\n // Set adapters\r\n Spinner spinMonth = ((Spinner) findViewById(R.id.spinMonth));\r\n Spinner spinYear = ((Spinner) findViewById(R.id.spinYear));\r\n spinMonth.setAdapter(monAd);\r\n spinYear.setAdapter(yearAd);\r\n }",
"private void spinnerFunctions() {\n mTranportSectionAdapter = ArrayAdapter.createFromResource(getContext(), R.array.transport_titles, R.layout.drop_down_spinner_item);\n mTransportSectionSpinner.setAdapter(mTranportSectionAdapter);\n mFuelTypeAdapter = ArrayAdapter.createFromResource(getContext(), R.array.fuel_types, R.layout.drop_down_spinner_item);\n mFuelTypeSpinner.setAdapter(mFuelTypeAdapter);\n mBoxAdapter = ArrayAdapter.createFromResource(getContext(), R.array.box_types, R.layout.drop_down_spinner_item);\n mBoxSpinner.setAdapter(mBoxAdapter);\n }",
"private void assignSpinner(int i, String s) {\n switch (s) {\n case \"Bitters\":\n ArrayAdapter<String> bittersAdapter;\n bittersAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, bitters);\n bittersAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(bittersAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Gin\":\n ArrayAdapter<String> ginAdapter;\n ginAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, gin);\n ginAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(ginAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Rum\":\n ArrayAdapter<String> rumAdapter;\n rumAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, rum);\n rumAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(rumAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Tequila\":\n ArrayAdapter<String> tequilaAdapter;\n tequilaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, tequila);\n tequilaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(tequilaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vodka\":\n ArrayAdapter<String> vodkaAdapter;\n vodkaAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vodkaAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vodkaAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Vermouth\":\n ArrayAdapter<String> vermouthAdapter;\n vermouthAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, vodka);\n vermouthAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(vermouthAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n case \"Whiskey\":\n ArrayAdapter<String> whiskeyAdapter;\n whiskeyAdapter = new ArrayAdapter<>(this, R.layout.support_simple_spinner_dropdown_item, whiskey);\n whiskeyAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinnerArrayList.get(i-1).setAdapter(whiskeyAdapter);\n spinnerArrayList.get(i-1).setVisibility(View.VISIBLE);\n break;\n }\n }",
"private void povoarSpinners() {\n List<String> lista = new ArrayList<>();\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[1]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[2]);\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnNivel.setAdapter(arrayAdapter);\n lista = new ArrayList<>();\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[1]);\n arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnEstado.setAdapter(arrayAdapter);\n }",
"private void createSpinners() {\n\t\tsuper.addSpinner(myResources.getString(\"FishReproduce\"));\n\t\tsuper.addSpinner(myResources.getString(\"SharkDeath\"));\n\t\tsuper.addSpinner(myResources.getString(\"SharkReproduce\"));\n\t}",
"private void setupSpinners() {\n\n ArrayAdapter<String> statesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, states);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n statesAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // Apply the adapter to the spinner\n statesAdapter.notifyDataSetChanged();\n mStateSpinner.setAdapter(statesAdapter);\n\n // Set the integer mSelected to the constant values\n mStateSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n mState = (String) parent.getItemAtPosition(position);\n setUpStatesSpinner(position);\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n // Unknown\n }\n });\n }",
"private void setAdapters() \n\t{\n\t\tArrayAdapter<CharSequence> adapter =\n\t\tArrayAdapter.createFromResource(\n\t\tthis, R.array.languages,\n\t\tandroid.R.layout.simple_spinner_item);\n\t\tadapter.setDropDownViewResource(\n\t\tandroid.R.layout.simple_spinner_dropdown_item);\n\t\tfromSpinner.setAdapter(adapter);\n\t\ttoSpinner.setAdapter(adapter);\n\t\t// Automatically select two spinner items\n\t\tfromSpinner.setSelection(8); // English (en)\n\t\ttoSpinner.setSelection(11); // French (fr)\n\t\torigText.setText(data);\n\t}",
"private void setSpinner(){\n for (String id : activity.getCollectedIDs()){\n if (activity.getCoinsCollection().containsKey(id)) {\n Coin tempCoin = activity.getCoinsCollection().get(id);\n assert tempCoin != null;\n if(!tempCoin.isBanked() && !tempCoin.isTransferred()) {\n spinnerItems.add(tempCoin);\n }\n }\n }\n\n //sort coins on gold value descending\n spinnerItems.sort((a, b) ->\n a.getValue() * activity.getExchangeRates().get(a.getCurrency())\n < b.getValue() * activity.getExchangeRates().get(b.getCurrency()) ? 1 : -1);\n\n ArrayAdapter<Coin> spinnerArrayAdapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), R.layout.spinner_item, spinnerItems);\n spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n spinner.setAdapter(spinnerArrayAdapter);\n }",
"private void initializeSpinner() {\n listClients = appGlobal.listClients;\n listDSRStatuses = appGlobal.listDSRStatuses;\n listLoadingnPoint = appGlobal.listLoadingnPoint;\n listDestinationPoint = appGlobal.listDestinationPoint;\n\n\n if(listClients!=null && listClients.size()>0){\n CompanySelectorAdapter clientCompAdapter = new CompanySelectorAdapter(getActivity(), listClients);\n spinnerListClientComp.setAdapter(clientCompAdapter);\n clientCompAdapter.notifyDataSetChanged();\n }\n else {\n loadClientsList();\n }\n if(listDSRStatuses!=null && listDSRStatuses.size()>0){\n // Remove all value from list\n for (DSRStatusModel model :listDSRStatuses) {\n if(Integer.parseInt(model.dsrStatusID.trim())== -1) {\n listDSRStatuses.remove(model);\n }\n }\n DSRStatusSpinnerAdapter dsrStatusAdapter = new DSRStatusSpinnerAdapter(getActivity(), listDSRStatuses);\n spinnerListStatusDSR.setAdapter(dsrStatusAdapter);\n dsrStatusAdapter.notifyDataSetChanged();\n }else {\n loadDSRStatusList();\n }\n if(listLoadingnPoint!=null && listLoadingnPoint.size()>0) {\n LocationPointAdapter loadingPointAdapter = new LocationPointAdapter(getActivity(), listLoadingnPoint);\n //spinnerListLoadingPoint.setAdapter(loadingPointAdapter);\n autocompleteTVLoadingPoint.setAdapter(loadingPointAdapter);\n loadingPointAdapter.notifyDataSetChanged();\n }\n else {\n loadLoadingPointList();\n }\n if(listDestinationPoint!=null && listDestinationPoint.size()>0) {\n LocationPointAdapter destinationPointAdapter = new LocationPointAdapter(getActivity(), listDestinationPoint);\n //spinnerListDestinationPoint.setAdapter(destinationPointAdapter);\n autocompleteTVDestinationPoint.setAdapter(destinationPointAdapter);\n destinationPointAdapter.notifyDataSetChanged();\n }\n else {\n loadDestinationPointList();\n }\n loadCustomsPoints();\n\n }",
"private void loadSpinner() {\n // Chargement du spinner de la liste des widgets\n widgetAdapter = (WidgetAdapter) DomoUtils.createAdapter(context, VOCAL);\n spinnerWidgets.setAdapter(widgetAdapter);\n\n // Chargement du spinner Box\n BoxAdapter boxAdapter = (BoxAdapter) DomoUtils.createAdapter(context, BOX);\n spinnerBox.setAdapter(boxAdapter);\n }",
"protected abstract void initializeSpinners();",
"public void fillSpinners(View view) {\n CharacterSpinnerAdapter characterAdapter =\n new CharacterSpinnerAdapter(getContext(), characters);\n final Spinner firstCharacterSpinner =\n (Spinner) view.findViewById(R.id.characterspinner1);\n final Spinner seoondCharacterSpinner =\n (Spinner) view.findViewById(R.id.characterspinner2);\n firstCharacterSpinner.setAdapter(characterAdapter);\n seoondCharacterSpinner.setAdapter(characterAdapter);\n }",
"public void setupSpinner()\n {\n if (spinnerAdapter == null)\n {\n spinnerAdapter = new StringSpinnerAdapter(spinner, R.array.graph_period_spinner_values);\n }\n\n spinner.setOnItemSelectedListener(this);\n spinner.setAdapter(spinnerAdapter);\n }",
"public void setIDsforViews(){\n\n chequingAccountTV = findViewById(R.id.chequingAccountTV);\n savingsAndTaxesTV = findViewById(R.id.savingsAndTaxesTV);\n rainyDayFunTV = findViewById(R.id.rainyDayFunTV);\n travelSavingsTv = findViewById(R.id.travelSavingsTv);\n personalDevelopmentSavingsTV = findViewById(R.id.personalDevelopmentSavingsTV);\n investmentsTV = findViewById(R.id.investmentsTV);\n primaryHomeAmountTV = findViewById(R.id.primaryHomeAmountTV);\n secondaryHomeAmountTV = findViewById(R.id.secondaryHomeAmountTV);\n\n chequingAccount = findViewById(R.id.chequingAccount);\n savingsAndTaxesAmount = findViewById(R.id.savingsAndTaxesAmount);\n rainyDayFund = findViewById(R.id.rainyDayFund);\n travelSavings = findViewById(R.id.travelSavings);\n personalDevelopmentSavings = findViewById(R.id.personalDevelopmentSavings);\n investments = findViewById(R.id.investments);\n primaryHomeAmount = findViewById(R.id.primaryHomeAmount);\n secondaryHomeAmount = findViewById(R.id.secondaryHomeAmount);\n //assetsTable = findViewById(R.id.selectedAssetOrLiabilityTable);\n\n }",
"protected abstract void setupSpinners();",
"private void initializeViews() {\n mAllEditTexts = new ArrayList<>();\n\n mImagesRecyclerView = findViewById(R.id.images_recycler_view);\n mAddPictureBtn = findViewById(R.id.add_picture_btn);\n\n mSaleStatusImage = findViewById(R.id.sale_status_image);\n mSaleStatusImage.setTag(FOR_SALE_TAG);\n\n mTypeSpinner = findViewById(R.id.type_spinner);\n mBedroomsSpinner = findViewById(R.id.rooms_spinner);\n\n mTypeSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.spinner_item, getResources().getStringArray(R.array.spinner_types)));\n mBedroomsSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.spinner_item, getResources().getStringArray(R.array.spinner_number_of_rooms)));\n\n mSurfaceAreaText = findViewById(R.id.surface_area_text1);\n mPriceEditText = findViewById(R.id.price_edit_text1);\n mAddressPostcodeEditText = findViewById(R.id.address_postcode_et1);\n mAddressNumberEditText = findViewById(R.id.address_number_et1);\n mAddressStreetEditText = findViewById(R.id.address_street_et1);\n mAddressTownEditText = findViewById(R.id.address_town_et1);\n mAddressCountyEditText = findViewById(R.id.address_county_et1);\n mDescriptionEditText = findViewById(R.id.description_edit_text1);\n mBuyOrLetSwitch = findViewById(R.id.buy_or_let);\n\n mSaveButton = findViewById(R.id.savebtn);\n\n mAllEditTexts.add(mSurfaceAreaText);\n mAllEditTexts.add(mPriceEditText);\n mAllEditTexts.add(mAddressPostcodeEditText);\n mAllEditTexts.add(mAddressNumberEditText);\n mAllEditTexts.add(mAddressStreetEditText);\n mAllEditTexts.add(mAddressTownEditText);\n mAllEditTexts.add(mAddressCountyEditText);\n mAllEditTexts.add(mDescriptionEditText);\n\n }",
"private void loadSpinnerData() {\n\n // Spinner Drop down elements\n areas = dbHendler.getAllAreas();\n for (Area area : areas) {\n String singleitem = area.get_areaName();\n items.add(singleitem);\n }\n\n // Creating adapter for spinnerArea\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinnerArea\n spinner.setAdapter(dataAdapter);\n }",
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_supplier_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n supplierSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mSupplierSpinner.setAdapter(supplierSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mSupplierSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.supplier_one))) {\n mSupplier = BookEntry.SUPPLIER_ONE;\n } else if (selection.equals(getString(R.string.supplier_two))) {\n mSupplier = BookEntry.SUPPLIER_TWO;\n } else {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n });\n }",
"private void setAdapters() {\n buildingInput.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, buildings));\n brandInput.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, brands));\n osInput.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_list_item_1, operatingSystems));\n /*\n If we want to use pre-determined lists\n getResources().getStringArray(R.array.brands);\n getResources().getStringArray(R.array.operating_systems);\n */\n }",
"private void initControlUI() {\n typeAdapter = new SpinnerSimpleAdapter(self, android.R.layout.simple_spinner_item, self.getResources().getStringArray(R.array.arr_feedback_type));\n spnType.setAdapter(typeAdapter);\n }",
"public void initSpinner() {\n }",
"private void initSpinner() {\n\t\tdata1 = new ArrayList<HashMap<String, String>>();\n\t\tdata2 = new ArrayList<HashMap<String, String>>();\n\t\tdata3 = new ArrayList<HashMap<String, String>>();\n\n\t\tadapter1 = new SimpleAdapter(this, data1,\n\t\t\t\tandroid.R.layout.simple_spinner_dropdown_item, from, to);\n\t\tadapter2 = new SimpleAdapter(this, data2,\n\t\t\t\tandroid.R.layout.simple_spinner_dropdown_item, from, to);\n\t\tadapter3 = new SimpleAdapter(this, data3,\n\t\t\t\tandroid.R.layout.simple_spinner_dropdown_item, from, to);\n\n\t\tsp1.setAdapter(adapter1);\n\t\tsp2.setAdapter(adapter2);\n\t\tsp3.setAdapter(adapter3);\n\n\t\tAjaxParams params = new AjaxParams();\n\t\tparams.put(\"op\", \"GetCity\");\n\t\tparams.put(\"levelID\", \"1\");\n\t\tparams.put(\"parentCode\", \"\");\n\t\thttp.get(GlobalVars.url, params, new AjaxCallBack<String>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String t) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onSuccess(t);\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject jsonObject = new JSONObject(t);\n\t\t\t\t\tif (jsonObject.getInt(\"result\") == 1) {\n\t\t\t\t\t\tJSONArray array = jsonObject.getJSONArray(\"list\");\n\t\t\t\t\t\tfor (int i = 0; i < array.length(); i++) {\n\t\t\t\t\t\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\t\t\t\t\tmap.put(\"name\",\n\t\t\t\t\t\t\t\t\tarray.getJSONObject(i).getString(\"name\"));\n\t\t\t\t\t\t\tmap.put(\"code\",\n\t\t\t\t\t\t\t\t\tarray.getJSONObject(i).getString(\"code\"));\n\t\t\t\t\t\t\tdata1.add(map);\n\t\t\t\t\t\t\tif (userInfoPreferences.getString(\"provinceId\", \"\")\n\t\t\t\t\t\t\t\t\t.equals(array.getJSONObject(i).getString(\n\t\t\t\t\t\t\t\t\t\t\t\"code\"))) {\n\t\t\t\t\t\t\t\tdefaultSheng = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tadapter1.notifyDataSetChanged();\n\t\t\t\t\t\tsp1.setSelection(defaultSheng, true);\n\t\t\t\t\t}\n\t\t\t\t} catch (JSONException 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\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable t, int errorNo, String strMsg) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onFailure(t, errorNo, strMsg);\n\t\t\t\tTools.showTextToast(context, \"获取省份列表失败,可能是网络问题\");\n\t\t\t}\n\t\t});\n\n\t}",
"public void bindSpinner() {\n // Create an ArrayAdapter using the string array and a spinner layout\n ArrayAdapter<CharSequence> adapter;\n adapter = ArrayAdapter.createFromResource(getActivity(), R.array.kind_of_reaction, R.layout.item_spinner_healthbook);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(R.layout.item_spinner_healthbook_dropdown);\n // Apply the adapter to the spinner\n kindOfReactionSpinner.setAdapter(adapter);\n }",
"private void initSpinnerSelectionChamps() {\n\n //preparation de l'URL, recuperation de tous les champs dispo. dans la BDD\n final String url = WebService.buildUrlForRequest(Metier.DOMAIN, Metier.NOM_MODELE_CATEGORIES, WebService.ACTION_LIST, null);\n\n //preparation et execution de la requete en asynchrone\n asyncHttpClient.get(getActivity(), url, new AsyncHttpResponseHandler() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {\n //recuperation des donnees et parsing en JSONArray\n String response = null;\n try {\n response = new String(responseBody, ENCODING);\n JSONArray jsonArray = new JSONArray(response);\n Log.e(\"JSONARRAY\", jsonArray.toString(1));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n new AlertDialog.Builder(getActivity()).setMessage(getString(R.string.error_msg_fail_retrieve_data) + statusCode).show();\n }\n });\n/*\n try {\n JSONObject json = JsonUtils.loadJSONFromResources(getActivity(), R.raw.champs);\n this.spinnerChampAdapter = new ChampAdapter(getActivity(), JsonUtils.getJsonObjects(json, new ArrayList<JSONObject>()));\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }",
"public void setOnClickListeners() {\n // Region Spinner\n regionSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedRegion = regionSpinner.getSelectedItem().toString();\n\n if (!selectedRegion.equals(\"Choose Region...\")) {\n int selectedRegionID = 0;\n for (RegionsResponse.Regions region : regionsList) {\n if (region.getRegionName().equals(selectedRegion))\n selectedRegionID = region.getRegionId();\n }\n districtSpinner.setEnabled(true);\n populateDistricts(selectedRegionID);\n } else {\n populateDistricts(0);\n districtSpinner.setSelection(0);\n districtSpinner.setEnabled(false);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n // District Spinner\n districtSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedDistrict = districtSpinner.getSelectedItem().toString();\n int selectedDistrictID = 0;\n if (!selectedDistrict.equals(\"Choose District...\")) {\n for (RegionsResponse.Regions region : regionsList) {\n if (region.getRegionName().equals(selectedDistrict))\n selectedDistrictID = region.getRegionId();\n }\n suburbSpinner.setEnabled(true);\n populateSuburbs(selectedDistrictID);\n\n } else {\n suburbSpinner.setSelection(0);\n suburbSpinner.setEnabled(false);\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n // Method of sale value\n methodOfSaleEditText.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (methodOfSaleSpinner.getSelectedItem().toString().equals(ApplicationConstants.MOS_AUCTIONED))\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n // Method of sale Spinner\n methodOfSaleSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedMethodOfSale = methodOfSaleSpinner.getSelectedItem().toString();\n methodOfSaleEditText.setVisibility(View.VISIBLE);\n switch (selectedMethodOfSale) {\n case ApplicationConstants.MOS_ASKING:\n\n break;\n case ApplicationConstants.MOS_AUCTIONED:\n\n break;\n case ApplicationConstants.MOS_ENQUIRIES:\n\n break;\n case ApplicationConstants.MOS_NEGOTIATION:\n methodOfSaleEditText.setVisibility(View.GONE);\n break;\n default:\n methodOfSaleEditText.setVisibility(View.GONE);\n break;\n }\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n ohDate1.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate2.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate3.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate4.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n ohDate5.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if (hasFocus)\n showDateTimePickerDialog((EditText) v);\n }\n });\n\n// ohDate3.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n// @Override\n// public void onFocusChange(View v, boolean hasFocus) {\n// if (hasFocus)\n// showDateTimePickerDialog((EditText) v);\n// }\n// });\n\n addPropertyButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n validator.validate();\n }\n });\n\n// addSecurityGuidelinesCheckbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n// @Override\n// public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n// if (isChecked)\n// securityGuidelinesLayout.setVisibility(View.VISIBLE);\n// else\n// securityGuidelinesLayout.setVisibility(View.GONE);\n// }\n// });\n }",
"@Override\r\n protected void initData(Bundle savedInstanceState) {\r\n mControl = new IPsetControl(this);\r\n mControl.getMainIp();\r\n// Resources res = getResources();\r\n// String[] stringArray = res.getStringArray(R.array.IpsetSpinner1);\r\n// data1.clear();\r\n// data2.clear();\r\n// for (int i = 0; i < stringArray.length; i++) {\r\n// data1.add(stringArray[i]);\r\n// }\r\n// Resources res1 = getResources();\r\n// String[] stringArray1 = res1.getStringArray(R.array.IpsetSpinner2);\r\n// for (int i = 0; i < stringArray1.length; i++) {\r\n// data2.add(stringArray1[i]);\r\n//\r\n// }\r\n// adapter1 = new SpinnerAdapter(data1, this);\r\n// adapter2 = new SpinnerAdapter(data2, this);\r\n// mTerminalipSp3.setAdapter(adapter1);\r\n// mTerminalipSp5.setAdapter(adapter2);\r\n }",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n setSpinnerData(holder.spinner1, this.mMerk);\n setSpinnerData(holder.spinner2, this.mTipe);\n setSpinnerData(holder.spinner3, this.mUkuran);\n setSpinnerData(holder.spinner4, this.mBahan);\n }",
"private void initViews() {\n mCancelButton.setOnClickListener(view -> getDialog().dismiss());\n\n mSaveButton.setOnClickListener(view -> {\n //Check if callback is attached or not\n if (mCallback != null) {\n mCallback.onOptionsFiltered(SELECTED_TIME_OPTION);\n }\n getDialog().dismiss();\n });\n\n //Initialize Spinner adapter\n ArrayAdapter<String> adapter = new ArrayAdapter<>(getActivity(), android.R.layout.simple_spinner_item, Constants.TIME_OPTIONS);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mTimeOptionsSpinner.setAdapter(adapter);\n\n mTimeOptionsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n SELECTED_TIME_OPTION = i;\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n SELECTED_TIME_OPTION = 0;\n }\n });\n\n mTimeOptionsSpinner.setSelection(SELECTED_TIME_OPTION);\n }",
"public void initializers() {\n\t\taccidentSpinner = (Spinner) findViewById(R.id.accidentSpinner);\n\t\tdesc = (EditText) findViewById(R.id.descriptionEt);\n\t\timView = (ImageView) findViewById(R.id.image1);\n\t\timView2 = (ImageView) findViewById(R.id.image2);\n\t\timView.setOnClickListener(this);\n\t\timView2.setOnClickListener(this);\n\t\tsubmit = (Button) findViewById(R.id.reportBtn);\n\t\tsubmit.setOnClickListener(this);\n\n\t\ttry {\n\t\t\tArrayAdapter<String> adapter_state = new ArrayAdapter<String>(this,\n\t\t\t\t\tandroid.R.layout.simple_spinner_item, accidentType);\n\t\t\tadapter_state\n\t\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\t\taccidentSpinner.setAdapter(adapter_state);\n\t\t} catch (Exception ex) {\n\t\t\tToast.makeText(this, \"Something happen\", Toast.LENGTH_SHORT).show();\n\t\t}\n\n\t}",
"public void setSpinner(){\n SpinnerModel spinnerModelA = new SpinnerNumberModel\n (date.getYear()+1900, date.getYear() -1800, date.getYear() +2000, 1);\n spinA.setModel(spinnerModelA);\n\n SpinnerModel spinnerModelM = new SpinnerNumberModel\n (date.getMonth()+1, 1,12,1 );\n spinM.setModel(spinnerModelM);\n\n SpinnerModel spinnerModelG = new SpinnerNumberModel\n (date.getDate(), 1, 31,1);\n spinG.setModel(spinnerModelG);\n }",
"void addToSpinnerCity()\n {\n Collections.sort(listSpinner);\n Spinner spinner=(Spinner)findViewById(R.id.gSpinnerCity);\n // Adapter for spinner\n ArrayAdapter<String> adapter=new ArrayAdapter<String>(this,R.layout.custom_blood_spinner,R.id.textSpinner,listSpinner);\n spinner.setAdapter(adapter);\n }",
"private void loadSpinnerData() {\n List<String> patientList = db.getAllPatient();\n\n // Creating adapter for spinner\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, patientList);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n patientIdSpn.setAdapter(dataAdapter);\n }",
"void setupSpinner() {\n\n Spinner spinner = (Spinner) findViewById(R.id.language_spinner);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.language_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n\n }",
"private void createSpinner(Spinner spinner, int array) {\n //create an array adapter using the pre-defined spinner layout in android\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n array,\n android.R.layout.simple_spinner_item);\n //init\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n }",
"public void onItemSelected(AdapterView<?> parent, View view,\n int pos, long id) {\n\n Spinner spinner = (Spinner) parent;\n Integer tag = (Integer) spinner.getTag();\n int tagValue = tag.intValue();\n switch (tagValue)\n {\n case VIEWED_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByViewed))\n {\n bChange = true;\n }\n if (pos == 0)\n {\n orderByViewed = \"album_name ASC\";\n }\n else\n {\n orderByViewed = \"album_name DESC\";\n }\n if (bChange) {\n orderBy = orderByViewed;\n }\n }\n break;\n\n case PRICE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByPrice))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByPrice = \"price DESC\";\n }\n else\n {\n orderByPrice = \"price ASC\";\n }\n if (bChange) {\n orderBy = orderByPrice;\n }\n }\n break;\n\n case RATINGS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByRatings))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByRatings = \"ratings DESC\";\n }\n else\n {\n orderByRatings = \"ratings ASC\";\n }\n if (bChange) {\n orderBy = orderByRatings;\n }\n }\n break;\n\n case YEAR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByYear))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByYear = \"year DESC\";\n }\n else\n {\n orderByYear = \"year ASC\";\n }\n if (bChange) {\n orderBy = orderByYear;\n }\n }\n break;\n\n case BEDS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBeds))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBeds = \"beds DESC\";\n }\n else\n {\n orderByBeds = \"beds ASC\";\n }\n if (bChange) {\n orderBy = orderByBeds;\n }\n }\n break;\n\n case BATHS_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByBaths))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByBaths = \"baths DESC\";\n }\n else\n {\n orderByBaths = \"baths ASC\";\n }\n if (bChange) {\n orderBy = orderByBaths;\n }\n }\n break;\n\n case AREA_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByArea))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByArea = \"area DESC\";\n }\n else\n {\n orderByArea = \"area ASC\";\n }\n if (bChange) {\n orderBy = orderByArea;\n }\n }\n break;\n\n case MAKE_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByMake))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByMake = \"make ASC\";\n }\n else\n {\n orderByMake = \"make DESC\";\n }\n if (bChange) {\n orderBy = orderByMake;\n }\n }\n break;\n\n case MODEL_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByModel))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByModel = \"model ASC\";\n }\n else\n {\n orderByModel = \"model DESC\";\n }\n if (bChange) {\n orderBy = orderByModel;\n }\n }\n break;\n\n case COLOR_SPINNER_ID:\n {\n boolean bChange =false;\n if (orderBy.equals(orderByColor))\n {\n bChange = true;\n }\n if (pos == 0) {\n orderByColor = \"color ASC\";\n }\n else\n {\n orderByColor = \"color DESC\";\n }\n if (bChange) {\n orderBy = orderByColor;\n }\n }\n break;\n\n\n\n default:\n break;\n }\n\n }",
"private void fillAdapter() {\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<String> recipesListLoader = loaderManager.getLoader(RECIPES_LIST_LOADER);\n if(recipesListLoader == null) {\n loaderManager.initLoader(RECIPES_LIST_LOADER, null, this);\n } else {\n loaderManager.restartLoader(RECIPES_LIST_LOADER, null, this);\n }\n }",
"private void assignControls()\n {\n \ttaskSpinner = (Spinner) findViewById(R.id.taskSpinner);\n \ttaskName = (EditText) findViewById(R.id.txtTaskName);\n \ttaskDetails = (EditText) findViewById(R.id.txtTaskDetails);\n \ttaskId = (EditText) findViewById(R.id.txtTaskId);\n \ttaskId.setEnabled(false); //This is not an editable field\n }",
"private void updateSpinners()\n {\n\n ownersDropDown =(Spinner)findViewById(R.id.ownerSpinner);\n dogsDropDown = (Spinner)findViewById(R.id.dogSpinner);\n\n ownerNames = new ArrayList<String>();\n ownerID = new ArrayList<String>();\n\n dogNames = new ArrayList<String>();\n dogID = new ArrayList<String>();\n\n // -----------\n // HUMAN REQUEST\n // -----------\n\n mOkHttpClient = new OkHttpClient();\n\n HttpUrl reqURL = HttpUrl.parse(\"https://final-project-saldanaj.appspot.com/humans\");\n\n Request request = new Request.Builder()\n .url(reqURL)\n .build();\n\n mOkHttpClient.newCall(request).enqueue(new Callback(){\n\n @Override\n public void onFailure(Call call, IOException e)\n {\n e.printStackTrace();\n } // end of the onFailure() function\n\n @Override\n public void onResponse(Call call, Response response) throws IOException\n {\n String r = response.body().string();\n\n try\n {\n JSONArray j = new JSONArray(r);\n\n for(int i = 0; i < j.length(); i++)\n {\n /*\n HashMap<String, String> ownersHashMap = new HashMap<String, String>();\n ownersHashMap.put(\"name\", j.getJSONObject(i).getString(\"name\"));\n ownersHashMap.put(\"human_id\", j.getJSONObject(i).getString(\"human_id\"));\n ownerPosts.add(ownersHashMap);\n */\n\n ownerNames.add(j.getJSONObject(i).getString(\"name\"));\n ownerID.add(j.getJSONObject(i).getString(\"human_id\"));\n }\n\n adapter = new ArrayAdapter<String>(linkDogToOwner.this , android.R.layout.simple_spinner_dropdown_item, ownerNames);\n\n runOnUiThread(new Runnable(){\n\n @Override\n public void run()\n {\n ownersDropDown.setAdapter(adapter);\n }\n\n\n }); // end of runOnUIThread() callback\n\n }\n catch (JSONException e1)\n {\n e1.printStackTrace();\n }\n } // end of the onResponse() function\n\n }); // end of newCall.enqueue() function callback\n\n\n /*\n\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this,\n android.R.layout.simple_spinner_dropdown_item,\n ownerNames);\n */\n\n\n // -----------\n // DOG REQUEST\n // -----------\n\n mOkHttpClient = new OkHttpClient();\n\n HttpUrl reqURL2 = HttpUrl.parse(\"https://final-project-saldanaj.appspot.com/dogs\");\n\n Request request2 = new Request.Builder()\n .url(reqURL2)\n .build();\n\n mOkHttpClient.newCall(request2).enqueue(new Callback(){\n\n @Override\n public void onFailure(Call call, IOException e)\n {\n e.printStackTrace();\n } // end of the onFailure() function\n\n @Override\n public void onResponse(Call call, Response response) throws IOException\n {\n String r2 = response.body().string();\n\n try\n {\n JSONArray j2 = new JSONArray(r2);\n\n\n for(int i = 0; i < j2.length(); i++)\n {\n /*\n HashMap<String, String> dogsHashMap = new HashMap<String, String>();\n dogsHashMap.put(\"name\", j2.getJSONObject(i).getString(\"name\"));\n dogsHashMap.put(\"dog_id\", j2.getJSONObject(i).getString(\"dog_id\"));\n dogPosts.add(dogsHashMap);\n */\n\n dogNames.add(j2.getJSONObject(i).getString(\"name\"));\n dogID.add(j2.getJSONObject(i).getString(\"dog_id\"));\n\n }\n\n adapter2 = new ArrayAdapter<String>(linkDogToOwner.this , android.R.layout.simple_spinner_dropdown_item, dogNames);\n\n runOnUiThread(new Runnable(){\n\n @Override\n public void run()\n {\n dogsDropDown.setAdapter(adapter2);\n }\n\n });\n\n }\n catch (JSONException e1)\n {\n e1.printStackTrace();\n }\n\n } // end of the onResponse() function\n\n });\n\n }",
"public void setSpinners(){\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"HH:mm\");\n LocalTime startHr = setBusinessHoursToLocalHours(8);\n LocalTime endHr = setBusinessHoursToLocalHours(22);\n\n SpinnerValueFactory<LocalTime> startFactory = new SpinnerValueFactory<LocalTime>() {\n {\n setConverter(new LocalTimeStringConverter(formatter,null));\n }\n @Override\n public void decrement(int steps) {\n steps = 15;\n if (getValue() == null)\n setValue(LocalTime.now());\n else {\n LocalTime time = (LocalTime) getValue();\n if(time.equals(startHr)){\n return;\n }\n setValue(time.minusMinutes(steps));\n }\n }\n\n @Override\n public void increment(int steps) {\n steps = 15;\n if (this.getValue() == null)\n setValue(LocalTime.now());\n else {\n LocalTime time = (LocalTime) getValue();\n if(time.equals(endHr)){\n return;\n }\n setValue(time.plusMinutes(steps));\n }\n }\n };\n\n SpinnerValueFactory<LocalTime> endFactory = new SpinnerValueFactory<LocalTime>() {\n {\n setConverter(new LocalTimeStringConverter(formatter,null));\n }\n @Override\n public void decrement(int steps) {\n steps = 15;\n if (getValue() == null)\n setValue(LocalTime.now());\n else {\n LocalTime time = (LocalTime) getValue();\n if(time.equals(startHr)){\n return;\n }\n setValue(time.minusMinutes(steps));\n }\n }\n\n @Override\n public void increment(int steps) {\n steps = 15;\n if (this.getValue() == null)\n setValue(LocalTime.now());\n else {\n LocalTime time = (LocalTime) getValue();\n if(time.equals(endHr)){\n return;\n }\n setValue(time.plusMinutes(steps));\n }\n }\n };\n\n if(setPrevSpinner){\n startFactory.setValue(startLDT.toLocalTime());\n endFactory.setValue(endLDT.toLocalTime());\n } else {\n startFactory.setValue(startHr);\n endFactory.setValue(startHr);\n }\n startSpinner.setValueFactory(startFactory);\n endSpinner.setValueFactory(endFactory);\n\n }",
"private void init(){\n //Selected value in Spinner\n String selectedSubj= getActivity().getIntent().getStringExtra(\"subj\");\n String selectedPoten= getActivity().getIntent().getStringExtra(\"prob\");\n String selectedInst= getActivity().getIntent().getStringExtra(\"inst\");\n String selectedY= getActivity().getIntent().getStringExtra(\"peri\");\n\n if(selectedY.equals(\"2015~2017\")){\n String yList[]= {\"2015\", \"2016\", \"2017\"};\n selectedY= yList[new Random().nextInt(yList.length)];\n }\n\n String e_inst= QuestionUtil.create_eInst(selectedY, selectedInst);\n String k_inst= QuestionUtil.create_kInst(e_inst);\n String m= QuestionUtil.createPeriodM(selectedY, e_inst);\n\n QuestionNameBuilder.inst= new QuestionNameBuilder(selectedY, m, k_inst, selectedSubj, QuestionNameBuilder.UNDEFINED\n , QuestionNameBuilder.UNDEFINED, QuestionNameBuilder.TYPE_KOR);\n qnBuilder= QuestionNameBuilder.inst;\n\n //Potential Load\n loadPotentials(selectedPoten);\n }",
"private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_page_course);\n\n Spinner mySpinner1 = (Spinner) findViewById(R.id.spinner1);\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<String> myAdapter1 = new ArrayAdapter<String>(PageCourse.this,\n android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.names1));\n myAdapter1.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinner1.setAdapter(myAdapter1);\n\n Spinner mySpinner2 = (Spinner) findViewById(R.id.spinner2);\n\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<String> myAdapter2 = new ArrayAdapter<String>(PageCourse.this,\n android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.names2));\n myAdapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinner2.setAdapter(myAdapter2);\n\n Spinner mySpinner3 = (Spinner) findViewById(R.id.spinner3);\n\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<String> myAdapter3 = new ArrayAdapter<String>(PageCourse.this,\n android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.names3));\n myAdapter3.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinner3.setAdapter(myAdapter3);\n\n Spinner mySpinner4 = (Spinner) findViewById(R.id.spinner4);\n\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<String> myAdapter4 = new ArrayAdapter<String>(PageCourse.this,\n android.R.layout.simple_list_item_1, getResources().getStringArray(R.array.names4));\n myAdapter4.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinner4.setAdapter(myAdapter4);\n\n mySpinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent1, View view1, int position1, long id) {\n\n String s1=((TextView)view1).getText().toString();\n switch(s1) {\n case (\"Level 1\") : // for item 1\n Intent i = new Intent(PageCourse.this,PageQuiz.class);\n startActivity(i);\n break;\n case (\"Level 2\") :\n /*startActivity(new Intent(view.getContext(),PageLogin.class));*/\n break;\n /* you can have any number of case statements */\n default :\n }\n }\n public void onNothingSelected(AdapterView<?> parent1) {\n // TODO Auto-generated method stub\n }\n });\n\n mySpinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent2, View view2, int position2, long id) {\n\n String s2=((TextView)view2).getText().toString();\n switch(s2) {\n case (\"Level 4\") : // for item 1\n Intent i = new Intent(PageCourse.this,PageSchedule.class);\n startActivity(i);\n break;\n case (\"Level 5\") :\n /*startActivity(new Intent(view.getContext(),PageLogin.class));*/\n break;\n /* you can have any number of case statements */\n default :\n }\n }\n public void onNothingSelected(AdapterView<?> parent2) {\n // TODO Auto-generated method stub\n }\n });\n /*mySpinner2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n String s=((TextView)view).getText().toString();\n if(s.equals(\"Level 4\"))\n startActivity(new Intent(view.getContext(),PageLogin.class));\n if(s.equals(\"Level 5\"))\n startActivity(new Intent(view.getContext(),PageCourse.class));\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n\n }\n\n\n });*/\n }",
"private void setUpSpinner(){\n //instantiates a new CategoryAdapter with the categories from the database\n CategorySpinnerAdapter mCategorySpinnerAdapter = new CategorySpinnerAdapter(this, mCategories);\n mCategorySpinner.setAdapter(mCategorySpinnerAdapter);\n //callback for when an item is selected\n mCategorySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n }\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n }",
"@Override\r\n protected void initListener() {\r\n backiv.setOnClickListener(this);\r\n mSetMainbtn.setOnClickListener(this);\r\n// mSetTerminalBtn.setOnClickListener(this);\r\n// mTerminalipSp3.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner3Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n// mTerminalipSp5.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\r\n// @Override\r\n// public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\r\n// mSpinner5Data = i;\r\n// }\r\n//\r\n// @Override\r\n// public void onNothingSelected(AdapterView<?> adapterView) {\r\n//\r\n// }\r\n// });\r\n }",
"private void setupSchoolSpinner(){\n //region Used to set up the school spinner\n\n schools = new ArrayList<>(SchoolManager.getListOfAllSchools());\n\n ArrayAdapter<School> schoolAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, schools);\n schoolAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n schoolSpinner.setAdapter(schoolAdapter);\n schoolSpinner.setOnItemSelectedListener(this);\n\n //endregion End code for school spinner\n }",
"private void startSpinnerValues(Spinner spinner, ArrayList<String> valores, ArrayAdapter<String> adapter)\n {\n //Inicializamos el adaptador y lo agregamos al Spinner\n adapter=new ArrayAdapter<String>(this, R.layout.support_simple_spinner_dropdown_item,valores);\n spinner.setAdapter(adapter);\n }",
"public void addItemsOnSpinner() {\n Data dataset = new Data(getApplicationContext());\n List<String> list = new ArrayList<String>();\n list = dataset.getClasses();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(dataAdapter);\n }",
"public void onItemSelected(AdapterView<?> spinner, View arg1, int position, long row_id) {\n switch (spinner.getId()) {\n case R.id.spin1: {\n if(position == 0) numbersOfTotalSets = 5;\n else numbersOfTotalSets = 3;\n break;\n }\n case R.id.spin2: {\n if(position == 0) setFinishingScore = 25;\n else setFinishingScore = 15;\n break;\n }\n case R.id.spin3: {\n if(position == 0) tieBreakerScore = 15;\n else tieBreakerScore = 25;\n break;\n }\n }\n }",
"private void setUpSocialSpinner() {\n socialSpinner = mView.findViewById(R.id.social_spinner);\n\n // Get list of social conditions setup in strings.xml\n conditionsArray = new ArrayList<>(Arrays.asList(getResources().getStringArray(R.array.social_conditions)));\n conditionsArray.add(getResources().getString(R.string.spinner_empty)); //filter_empty is \"None\"\n\n // Convert ArrayList to array, so that it can be passed to SocialArrayAdapter\n String[] spinnerObject = new String[conditionsArray.size()];\n spinnerObject = conditionsArray.toArray(spinnerObject);\n\n // Create string ArrayAdapter that will be used for filterSpinner\n ArrayAdapter<String> spinnerAdapter = new SocialArrayAdapter(mActivity,\n R.layout.spinner_item, spinnerObject);\n socialSpinner.setAdapter(spinnerAdapter);\n\n // Set default selection to None\n int defaultIndex = conditionsArray.indexOf(getResources().getString(R.string.spinner_empty));\n socialSpinner.setSelection(defaultIndex);\n }",
"public void addItemsOnSpinner2() {\n }",
"private void initialiseNumberPickers() {\n\n ViewGroup pickerElements = (ViewGroup) findViewById(R.id.pickerLayout);\n for (int j = 0; j < pickerElements.getChildCount(); j++) {\n View grandchild = pickerElements.getChildAt(j);\n if (grandchild instanceof NumberPicker) {\n\n ((NumberPicker) grandchild).setMaxValue(9);\n ((NumberPicker) grandchild).setMinValue(0);\n if (grandchild.getId() == R.id.tenSecondPicker) {\n ((NumberPicker) grandchild).setMaxValue(5);\n }\n }\n }\n }",
"private void init(){\n\n //Load component in the good variables\n spin_day = (Spinner)findViewById(R.id.spinner_day_hospa);\n spin_start = (Spinner)findViewById(R.id.spinner_start_hospa);\n spin_end = (Spinner)findViewById(R.id.spinner_end_hospa);\n spin_service = (Spinner)findViewById(R.id.spinner_service_hospa);\n\n btn_Appointment = (Button)findViewById(R.id.btn_app_hospa);\n\n lv_availability = (ListView)findViewById(R.id.lv_availability_hospa);\n lv_Appointment = (ListView)findViewById(R.id.lv_Appointment_hospa);\n\n tv_main = (TextView)findViewById(R.id.tv_main_hospa);\n\n tv_main.setText(\"Create Appointment with\\n\" + this.companyName);\n\n //Load the days\n loadDays();\n loadHours();\n loadSpinnerDays();\n loadSpinnerHours();\n callEventListener();\n loadListView();\n loadAppointmentList();\n loadSpinnerFromDB();\n }",
"private void loadSpinnerData() {\n rows = db.getPumpDetails();\n\n // Creating adapter for spinner\n dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, rows);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n spinner.setAdapter(dataAdapter);\n }",
"public void setupPrioritySpinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(),\n R.array.prirority_level_list, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mPriority.setAdapter(adapter);\n mPriority.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n removeFocusFromEditText();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }",
"private void initialize(){\n options[0] = R.id.radio1;\n options[1] = R.id.radio2;\n options[2] = R.id.radio3;\n options[3] = R.id.radio4;\n }",
"void setValueFromSpinner(@IdRes int spinnerId, T newItem);",
"private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.field_spinner_field, this);\n }",
"private void applySpinner(final String[] taglist, Spinner sp_name, String tag_string) {\n AddContactActivity.spinnerAdapter adapterRepeateDaily = new AddContactActivity.spinnerAdapter(getActivity(), android.R.layout.simple_list_item_1);\r\n adapterRepeateDaily.add(tag_string);\r\n adapterRepeateDaily.addAll(taglist);\r\n adapterRepeateDaily.add(tag_string);\r\n sp_name.setAdapter(adapterRepeateDaily);\r\n sp_name.setSelection(adapterRepeateDaily.getCount());\r\n sp_name.setEnabled(true);\r\n }",
"private void initViews() {\n removeAllViews();\n this.setOrientation(HORIZONTAL);\n this.setOnTouchListener(this);\n\n TextView textView;\n ImageView imageView;\n for (PickerItem pickerItem : items) {\n if (pickerItem.hasDrawable()) {\n imageView = new ImageView(getContext());\n imageView.setImageResource(pickerItem.getDrawable());\n imageView.setScaleType(ImageView.ScaleType.CENTER_INSIDE);\n initStyle(imageView);\n this.addView(imageView);\n } else {\n if (pickerItem.getText() != null) {\n textView = new TextView(getContext());\n textView.setGravity(Gravity.CENTER);\n textView.setText(pickerItem.getText());\n initStyle(textView);\n this.addView(textView);\n }\n }\n }\n }",
"private void UpdateDataForSpinner(Spinner spinner){\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.serviceQuantity, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n // Apply the adapter to the spinner\n spinner.setAdapter(adapter);\n }",
"private void init(){\n\t\t\n\t\tpurchasePrice = (EditText)findViewById(R.id.purchasePrice);\n\t\tpurchasePrice.setFilters(new InputFilter[] { new CurrencyFormatInputFilter()});\n\t\t\n\t\tdownPaymentSpinner = (Spinner)findViewById(R.id.inputTypeSpinner);\n\t\tArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n\t\t\t\tR.array.inputTypes, android.R.layout.simple_spinner_item);\n\t\tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tdownPaymentSpinner.setAdapter(adapter);\n\t\t\n\t\tsellerSpinner = (Spinner)findViewById(R.id.inputTypeSpinnerSeller);\n\t\tArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource(this,\n\t\t\t\tR.array.inputTypes, android.R.layout.simple_spinner_item);\n\t\tadapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tsellerSpinner.setAdapter(adapter2);\t\n\t}",
"private void initEnemiesSpinner(View view)\n {\n\n theEnemiesSpinner = (Spinner) view.findViewById(R.id.theEnemiesSpinner);\n theEnemiesSpinner.setAdapter(null);\n }",
"@SuppressLint(\"ValidFragment\")\n\n\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_eval1_p3, container, false);\n\n spP6sp1 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp1);\n spP6sp2 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp2);\n spP6sp3 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp3);\n spP6sp4 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp4);\n spP6sp5 = (Spinner) rootView.findViewById(R.id.eval1_p6_sp5);\n\n\n return rootView;\n }",
"private void SpinnerInitialize() {\n try{\n Spinner dropdownto = findViewById(R.id.tonumbercountrycode);\n\n//create an adapter to describe how the items are displayed, adapters are used in several places in android.\n//There are multiple variations of this, but this is the basic variant.\n ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, countrycodes);\n//set the spinners adapter to the previously created one.\n\n dropdownto.setAdapter(adapter);\n dropdownto.setSelection(0,true);\n\n Spinner dropdownfrom = findViewById(R.id.fromnumbercountrycode);\n\n//create an adapter to describe how the items are displayed, adapters are used in several places in android.\n//There are multiple variations of this, but this is the basic variant.\n // ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, countrycodes);\n//set the spinners adapter to the previously created one.\n\n dropdownfrom.setAdapter(adapter);\n dropdownfrom.setSelection(0,true);\n }\n catch (Exception ex){\n Toast.makeText(InsertDb.this, ex.getMessage().toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n\n }",
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter colourSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.phone_colour_array, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n colourSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mColourSpinner.setAdapter(colourSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mColourSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.phone_colour_black))) {\n mColour = PhoneEntry.COLOUR_BLACK;\n } else if (selection.equals(getString(R.string.phone_colour_white))) {\n mColour = PhoneEntry.COLOUR_WHITE;\n } else if (selection.equals(getString(R.string.phone_colour_grey))){\n mColour = PhoneEntry.COLOUR_GREY;\n }\n else {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n });\n\n }",
"private void setAllFields(){\n Expense retrievedExpense = db.getExpenseWithId(bundle.getInt(EXPENSE_TABLE_COLUMN_ID));\n label.setText(retrievedExpense.getLabel());\n\n // Get adapter from category array\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.expense_category, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Get position where it matches the category name retrieved with the category array\n int spinnerPosition = adapter.getPosition(retrievedExpense.getCategory());\n\n // Set category spinner\n category.setSelection(spinnerPosition);\n\n cost.setText(String.format(\"%.2f \",retrievedExpense.getCost()));\n paid.setChecked(retrievedExpense.isWasItPaid());\n dateDue.setText(retrievedExpense.getDueDate());\n\n }",
"private void set_autotext_adapters(){\n ArrayAdapter<String> amount_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, amount_autos);\n amount_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_amount);\n amount_text.setAdapter(amount_adapter);\n ArrayAdapter<String> memo_adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_dropdown_item_1line, memo_autos);\n memo_text = (AutoCompleteTextView)\n findViewById(R.id.add_group_transaction_memo);\n memo_text.setAdapter(memo_adapter);\n }",
"private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }",
"public void spn_adaptor(){\n final String[] sem = getResources().getStringArray(R.array.Semester);\n\n //Creating an instance of ArrayAdaptor\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this, android.R.layout.simple_spinner_item, sem);\n\n //Setting the view which will be used in the spinner\n adapter.setDropDownViewResource(\n simple_spinner_dropdown_item\n );\n\n //Assigning the adaptor1 to the spinner\n spn_semester.setAdapter(adapter);\n }",
"private void initWidgets() {\n\t\tspots = new ImageButton[MAX_SPOTS];\n\t\t\n\t\tfor(int i=0; i<MAX_SPOTS; i++) {\n\t\t\tfinal int temp = i;\n\t\t\tspots[i] = (ImageButton) findViewById(R.id.stamp01 + i);\n\t\t\tspots[i].setOnClickListener(new OnClickListener() {\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\ttoSpotActivity(temp);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"private void loadSpinnerCurrData(int tour_id) {\n\n db = new DatabaseHandler(getApplicationContext());\n currencySpinnerAdapter = new CurrencySpinnerAdapter(getApplicationContext(), db.getAllCurrencies(tour_id));\n db.closeDB();\n spinner_curr.setAdapter(currencySpinnerAdapter);\n }",
"private void initElements() {\n uploadingProgressBar = (ProgressBar) findViewById(R.id.scanning_result_uploading_bar);\n scanningBlurScoreProgressBarContainer = (RelativeLayout) findViewById(R.id.scanning_blur_score_progress_container);\n resultImgAndLoadingLayout = (RelativeLayout) findViewById(R.id.scaning_result_img_and_loading);\n fpResultImg = (ImageView) resultImgAndLoadingLayout.findViewById(R.id.scanning_result_img);\n scanningThumb = (ImageView) findViewById(R.id.scanning_progressbar_thumb);\n jumpMsg = (TextView) findViewById(R.id.scanning_status_msg);\n }",
"private void setAdapter() {\n\n\t\tathleteCheckInAdapter = new AthleteStickyHeaderCheckInAdapter(getActivity(), athleteAttendanceList);\n\n\t}",
"private void setUpSpinner(){\n ArrayAdapter paymentSpinnerAdapter =ArrayAdapter.createFromResource(this,R.array.array_gender_option,android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line, then apply adapter to the spinner\n paymentSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n mPaymentSpinner.setAdapter(paymentSpinnerAdapter);\n\n // To set the spinner to the selected payment method by the user when clicked from cursor adapter.\n if (payMode != null) {\n if (payMode.equalsIgnoreCase(\"COD\")) {\n mPaymentSpinner.setSelection(0);\n } else {\n mPaymentSpinner.setSelection(1);\n }\n mPaymentSpinner.setOnTouchListener(mTouchListener);\n }\n\n mPaymentSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedPayment = (String)parent.getItemAtPosition(position);\n if(!selectedPayment.isEmpty()){\n if(selectedPayment.equals(getString(R.string.payment_cod))){\n mPaymentMode = clientContract.ClientInfo.PAYMENT_COD; // COD = 1\n }else{\n\n mPaymentMode = clientContract.ClientInfo.PAYMENT_ONLINE; // ONLINE = 0\n }\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n }",
"private void initializeDrinkSpinner() {\n // Extracting and storing drink names and prices\n alDrinkNames = extractColumn(\"Drink\", 1);\n alDrinkPrices = extractColumn(\"Drink\", 2);\n spDrink.setAdapter(getAdapter(alDrinkNames));\n\n // Display price of selected drink item\n spDrink.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n drinkPrice = (i > 0) ? Double.parseDouble(alDrinkPrices.get(i)) : Double.parseDouble(\"0.00\");\n edtTxtDrinkPrice.setText(String.format(\"$%.2f\", drinkPrice));\n\n updateSubtotal();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n edtTxtDrinkPrice.setText(\"0.00\");\n }\n });\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n {\n View v = inflater.inflate(R.layout.fragment_customer_information, container, false);\n\n mtypeadapter= ArrayAdapter.createFromResource(getActivity(),\n R.array.mtype_array, android.R.layout.simple_spinner_item);\n mtypeadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mtrtypespinner=(Spinner)v.findViewById(R.id.mtype_spinner);\n mtrtypespinner.setAdapter(mtypeadapter);\n\n ctratioadapter= ArrayAdapter.createFromResource(getActivity(),\n R.array.cct_ratio_array, android.R.layout.simple_spinner_item);\n ctratioadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n ctratiospinner=(Spinner)v.findViewById(R.id.ctratio_spinner);\n ctratiospinner.setAdapter(ctratioadapter);\n\n cttypeadapter= ArrayAdapter.createFromResource(getActivity(),\n R.array.type_array, android.R.layout.simple_spinner_item);\n cttypeadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n cttypespinner=(Spinner)v.findViewById(R.id.type_spinner);\n cttypespinner.setAdapter(cttypeadapter);\n\n cctratioadapter= ArrayAdapter.createFromResource(getActivity(),\n R.array.cct_ratio_array, android.R.layout.simple_spinner_item);\n cctratioadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n cctratiospinner=(Spinner)v.findViewById(R.id.cct_ratio_spinner);\n cctratiospinner.setAdapter(cctratioadapter);\n\n change=(Button)v.findViewById(R.id.change);\n change.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View arg0)\n {\n openAlert(change);\n }\n });\n\n ctratiolinear=(LinearLayout)v.findViewById(R.id.ctratiolinear);\n ctdetailslayout=(LinearLayout)v.findViewById(R.id.ctdetailslayout);\n typelinear=(LinearLayout)v.findViewById(R.id.typelinear);\n cctratiolinear=(LinearLayout)v.findViewById(R.id.cctratiolinear);\n makelinear=(LinearLayout)v.findViewById(R.id.makelinear);\n\n mtrtypespinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()\n {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n\n selectionPosition= mtypeadapter.getPosition(mtrtypespinner.getSelectedItem().toString());\n\n if (mtrtypespinner.getSelectedItem().toString().equals(\"WHOLE\"))\n {\n ctratiolinear.setVisibility(LinearLayout.GONE);\n ctdetailslayout.setVisibility(LinearLayout.GONE);\n typelinear.setVisibility(LinearLayout.GONE);\n cctratiolinear.setVisibility(LinearLayout.GONE);\n makelinear.setVisibility(LinearLayout.GONE);\n }\n else if(mtrtypespinner.getSelectedItem().toString().equals(\"Select\"))\n {\n ctratiolinear.setVisibility(LinearLayout.GONE);\n ctdetailslayout.setVisibility(LinearLayout.GONE);\n typelinear.setVisibility(LinearLayout.GONE);\n cctratiolinear.setVisibility(LinearLayout.GONE);\n makelinear.setVisibility(LinearLayout.GONE);\n }\n else\n {\n ctratiolinear.setVisibility(View.VISIBLE);\n ctdetailslayout.setVisibility(View.VISIBLE);\n typelinear.setVisibility(View.VISIBLE);\n cctratiolinear.setVisibility(View.VISIBLE);\n makelinear.setVisibility(View.VISIBLE);\n }\n String metertypespinner = mtrtypespinner.getSelectedItem().toString();\n PageConsumerEntity.setMeterType(metertypespinner);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView)\n {\n }\n });\n\n ctratiospinner= (Spinner) v.findViewById(R.id.ctratio_spinner);\n ctratiospinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String ctrationspinner = ctratiospinner.getSelectedItem().toString();\n PageConsumerEntity.setCTRatio(ctrationspinner);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n PageConsumerEntity.setCTRatio(\" \");\n }\n });\n\n cttypespinner= (Spinner) v.findViewById(R.id.type_spinner);\n cttypespinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String typespinner = cttypespinner.getSelectedItem().toString();\n PageConsumerEntity.setCTType(typespinner);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n PageConsumerEntity.setCTType(\" \");\n }\n });\n\n cctratiospinner= (Spinner) v.findViewById(R.id.cct_ratio_spinner);\n cctratiospinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\n @Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String cctrtospinner = cctratiospinner.getSelectedItem().toString();\n PageConsumerEntity.setCCTRatio(cctrtospinner);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n // TODO Auto-generated method stub\n PageConsumerEntity.setCCTRatio(\" \");\n }\n });\n\n nxtbtn=(Button)v.findViewById(R.id.nextbtn);\n nxtbtn.setOnClickListener(this);\n\n PageConsumerEntity = ((ConsumerInfo) getActivity().getApplicationContext()).getConsumerDetails();\n\n cnsmrno= (EditText) v.findViewById(R.id.cnsmrno);\n cnsmrno.setText(new String(PageConsumerEntity.getCustomerNo()));\n\n cnsmrname= (EditText) v.findViewById(R.id.cnsmrname);\n cnsmrname.setText(new String(PageConsumerEntity.getCustomerName()));\n\n aliasname= (EditText) v.findViewById(R.id.aliasname);\n aliasname.setText(new String(PageConsumerEntity.getAliasName()));\n\n cntctno1= (EditText) v.findViewById(R.id.cntcno1);\n cntctno1.setText(new String(PageConsumerEntity.getContactNo1()));\n\n cntctno2= (EditText) v.findViewById(R.id.cntcno2);\n if(PageConsumerEntity.getContactNo2() == null)\n {\n cntctno2.setText(\"\");\n }\n else\n {\n cntctno2.setText(new String(PageConsumerEntity.getContactNo2()));\n }\n\n cntctno3= (EditText) v.findViewById(R.id.cntcno3);\n if(PageConsumerEntity.getContactNo3() == null)\n {\n cntctno3.setText(\"\");\n }\n else\n {\n cntctno3.setText(new String(PageConsumerEntity.getContactNo3()));\n }\n\n cntctprsn= (EditText) v.findViewById(R.id.cntcprsn);\n if(PageConsumerEntity.getContactPerson() == null)\n {\n cntctprsn.setText(\"\");\n }\n else\n {\n cntctprsn.setText(new String(PageConsumerEntity.getContactPerson()));\n }\n\n email= (EditText) v.findViewById(R.id.email);\n if(PageConsumerEntity.getEmail() == null)\n {\n email.setText(\"\");\n }\n else\n {\n email.setText(new String(PageConsumerEntity.getEmail()));\n }\n\n location= (EditText) v.findViewById(R.id.location);\n location.setText(new String(PageConsumerEntity.getLandmark()));\n\n mno= (EditText) v.findViewById(R.id.mno);\n mno.setText(new String(PageConsumerEntity.getPreMNO()));\n\n make= (EditText) v.findViewById(R.id.make);\n make.setText(new String(PageConsumerEntity.getPreMake()));\n\n String meterTypeValue = PageConsumerEntity.getMeterType();\n if (!meterTypeValue.equals(null)) {\n int spinnerPosition = mtypeadapter.getPosition(meterTypeValue);\n mtrtypespinner.setSelection(spinnerPosition);\n }\n\n String ctRatioValue = PageConsumerEntity.getCTRatio();\n if (ctRatioValue == null)\n {\n ctratiospinner.setSelection(0);\n }\n else\n {\n if (!ctRatioValue.equals(null))\n {\n int spinnerPosition = ctratioadapter.getPosition(ctRatioValue);\n ctratiospinner.setSelection(spinnerPosition);\n }\n }\n\n String ctTypeValue = PageConsumerEntity.getCTType();\n if (ctTypeValue == null)\n {\n cttypespinner.setSelection(0);\n }\n else\n {\n if (!ctTypeValue.equals(null))\n {\n int spinnerPosition = cttypeadapter.getPosition(ctTypeValue);\n cttypespinner.setSelection(spinnerPosition);\n }\n }\n\n String cctRatioValue = PageConsumerEntity.getCCTRatio();\n if (cctRatioValue == null)\n {\n cctratiospinner.setSelection(0);\n }\n else\n {\n if (!cctRatioValue.equals(null))\n {\n int spinnerPosition = cctratioadapter.getPosition(cctRatioValue);\n cctratiospinner.setSelection(spinnerPosition);\n }\n }\n\n ctmake= (EditText) v.findViewById(R.id.make1);\n if(PageConsumerEntity.getCTMake() == null)\n {\n ctmake.setText(\"\");\n }\n else\n {\n ctmake.setText(new String(PageConsumerEntity.getCTMake()));\n }\n\n l1c= (EditText) v.findViewById(R.id.l1c);\n if(PageConsumerEntity.getL1C() == null)\n {\n l1c.setText(\"\");\n }\n else\n {\n l1c.setText(new String(PageConsumerEntity.getL1C()));\n }\n\n l1d= (EditText) v.findViewById(R.id.l1d);\n if(PageConsumerEntity.getL1D() == null)\n {\n l1d.setText(\"\");\n }\n else\n {\n l1d.setText(new String(PageConsumerEntity.getL1D()));\n }\n\n l2c= (EditText) v.findViewById(R.id.l2c);\n if(PageConsumerEntity.getL2C() == null)\n {\n l2c.setText(\"\");\n }\n else\n {\n l2c.setText(new String(PageConsumerEntity.getL2C()));\n }\n\n l2d= (EditText) v.findViewById(R.id.l2d);\n if(PageConsumerEntity.getL2D() == null)\n {\n l2d.setText(\"\");\n }\n else\n {\n l2d.setText(new String(PageConsumerEntity.getL2D()));\n }\n\n l3c= (EditText) v.findViewById(R.id.l3c);\n if(PageConsumerEntity.getL3C() == null)\n {\n l3c.setText(\"\");\n }\n else\n {\n l3c.setText(new String(PageConsumerEntity.getL3C()));\n }\n\n l3d= (EditText) v.findViewById(R.id.l3d);\n if(PageConsumerEntity.getL3D() == null)\n {\n l3d.setText(\"\");\n }\n else\n {\n l3d.setText(new String(PageConsumerEntity.getL3D()));\n }\n\n if(back == 1)\n {\n// String meterTypeValue = PageConsumerEntity.getMeterType();\n if (!meterTypeValue.equals(null)) {\n int spinnerPosition = mtypeadapter.getPosition(meterTypeValue);\n mtrtypespinner.setSelection(spinnerPosition);\n }\n\n // String ctRatioValue = PageConsumerEntity.getCTRatio();\n if (!ctRatioValue.equals(null)) {\n int spinnerPosition = ctratioadapter.getPosition(ctRatioValue);\n ctratiospinner.setSelection(spinnerPosition);\n }\n\n // String ctTypeValue = PageConsumerEntity.getCTType();\n if (!ctTypeValue.equals(null)) {\n int spinnerPosition = cttypeadapter.getPosition(ctTypeValue);\n cttypespinner.setSelection(spinnerPosition);\n }\n\n // String cctRatioValue = PageConsumerEntity.getCCTRatio();\n if (!cctRatioValue.equals(null)) {\n int spinnerPosition = cctratioadapter.getPosition(cctRatioValue);\n cctratiospinner.setSelection(spinnerPosition);\n }\n\n ctmake.setText(new String(PageConsumerEntity.getCTMake()));\n\n l1c.setText(new String(PageConsumerEntity.getL1C()));\n\n l1d.setText(new String(PageConsumerEntity.getL1D()));\n\n l2c.setText(new String(PageConsumerEntity.getL2C()));\n\n l2d.setText(new String(PageConsumerEntity.getL2D()));\n\n l3c.setText(new String(PageConsumerEntity.getL3C()));\n\n l3d.setText(new String(PageConsumerEntity.getL3D()));\n }\n\n return v;\n }",
"public void initSpinner(Spinner spinner, String[] stringArray) {\n ArrayAdapter<String> aAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, stringArray);\n aAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(aAdapter);\n spinner.setOnItemSelectedListener(this);\n }",
"public void initProjectSpinner(){\n projectSpinner = findViewById(R.id.spinner_project);\n projectList = Arrays.asList(gson.fromJson(myRequestHandler.getJsonStringProjects(), Project[].class)); //The jsonString with Projects is already initialized to prevent null pointers\n ArrayAdapter<Project> projectAdapter = new ArrayAdapter<Project>(this,\n android.R.layout.simple_spinner_item, projectList);\n projectAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n projectSpinner.setAdapter(projectAdapter);\n projectSpinner.setOnItemSelectedListener(this);\n\n }",
"public void setAdapter() {\n\t\tactivityAdapter = new ActivitiesAdapter(getActivity(), List,\n\t\t\t\ttotalmintxt);\n\t\tSystem.out.println(\"listsize=\" + List.size());\n\t\tif (List.size() > 0) {\n\t\t\tint totalmin = 0, totalcal = 0;\n\t\t\tfor (int i = 0; i < List.size(); i++) {\n\t\t\t\ttotalmin += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.total_time_minutes));\n\t\t\t\ttotalcal += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.calories_burned));\n\n\t\t\t}\n\t\t\ttotalmintxt.setText(\"\" + totalmin + \" min\");// calories_burned\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calories_burned\n\t\t\ttotalcaltxt.setText(\"\" + totalcal + \" cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\n\t\t\tcom.fitmi.utils.Constants.totalcal = totalcal;\n\n\t\t\tHomeFragment tosetCalory = new HomeFragment();\n\t\t\tNotificationCaloryBurn callBack = (NotificationCaloryBurn) tosetCalory;\n\n\t\t\tcallBack.setTotalCaloryBurn(com.fitmi.utils.Constants.totalcal);\n\t\t} else {\n\n\t\t\ttotalcaltxt.setText(\"0 cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\t\t}\n\n\t\tsetActivitySpinner();\n\t}",
"public void setAdapter() {\n binding.RvwalletAmount.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n binding.RvwalletAmount.setHasFixedSize(true);\n WalletAdapter kyCuploadAdapter = new WalletAdapter(getActivity(), getListWallet(), this);\n binding.RvwalletAmount.setAdapter(kyCuploadAdapter);\n }",
"private void initViews() {\n\n if (blockListAdapter != null) {\n blockListAdapter = null;\n }\n\n swipeRefreshLayout.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n rv_swipe_refresh_tv.setColorSchemeResources(\n R.color.witkey_orange,\n R.color.witkey_orange,\n R.color.witkey_orange);\n\n rv_swipe_refresh_tv.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n firstNetworkCall();\n }\n });\n\n noResultRefreshTextView.setOnClickListener(this);\n\n if (swipeRefreshLayout != null) {\n swipeRefreshLayout.post(new Runnable() {\n @Override\n public void run() {\n swipeRefreshLayout.setRefreshing(true);\n firstNetworkCall();\n }\n });\n }\n\n btnBack.setOnClickListener(this);\n }",
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter fruitSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_fruit_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n fruitSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mTypeSpinner.setAdapter(fruitSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.apple))) {\n mFruit = FruitEntry.TYPE_APPLE;\n } else if (selection.equals(getString(R.string.banana))) {\n mFruit = FruitEntry.TYPE_BANANA;\n } else if (selection.equals(getString(R.string.peach))) {\n mFruit = FruitEntry.TYPE_PEACH;\n } else if (selection.equals(getString(R.string.pineapple))) {\n mFruit = FruitEntry.TYPE_PINEAPPLE;\n } else if (selection.equals(getString(R.string.strawberry))) {\n mFruit = FruitEntry.TYPE_STRAWBERRY;\n } else if (selection.equals(getString(R.string.watermelon))) {\n mFruit = FruitEntry.TYPE_WATERMELON;\n } else {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n });\n }",
"private void initialise() {\n spinnerIntervals = (AppCompatSpinner) findViewById(R.id.spinnerIntervals);\n spinnerWordsPerDay = (AppCompatSpinner) findViewById(R.id.spinnerWordsPerDay);\n spinnerStartLesson = (AppCompatSpinner) findViewById(R.id.spinnerStartLesson);\n btnStartTime = (Button) findViewById(R.id.btnStartTime);\n\n chkSa = (CheckBox) findViewById(R.id.chkSa);\n chkSu = (CheckBox) findViewById(R.id.chkSu);\n chkMo = (CheckBox) findViewById(R.id.chkMo);\n chkTu = (CheckBox) findViewById(R.id.chkTu);\n chkWe = (CheckBox) findViewById(R.id.chkWe);\n chkTh = (CheckBox) findViewById(R.id.chkTh);\n chkFr = (CheckBox) findViewById(R.id.chkFr);\n\n btnStop = (Button) findViewById(R.id.btnStop);\n btnStart = (Button) findViewById(R.id.btnStart);\n btnPause = (Button) findViewById(R.id.btnPause);\n btnRestart = (Button) findViewById(R.id.btnRestart);\n layoutRingtone = (LinearLayout) findViewById(R.id.layoutRingtone);\n btnSelectTone = (Button) findViewById(R.id.btnSelectTone);\n txtStatus = (TextView) findViewById(R.id.txtStatus);\n\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {\n layoutRingtone.setVisibility(View.GONE);\n }\n\n bind();\n btnStart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n start();\n setViewsStatus();\n }\n });\n\n btnPause.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ReminderManager.pause();\n bind();\n setViewsStatus();\n }\n });\n\n btnStop.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ReminderManager.stop();\n bind();\n setViewsStatus();\n }\n });\n\n btnRestart.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n start();\n setViewsStatus();\n }\n });\n\n btnStartTime.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (btnStartTime.getText().length() > 0) {\n int hour = Integer.valueOf(btnStartTime.getText().toString().substring(0, 2));\n int minute = Integer.valueOf(btnStartTime.getText().toString().substring(3, 5));\n DialogManager.showTimePickerDialog(App.currentActivity, \"\", hour, minute, new Runnable() {\n @Override\n public void run() {\n btnStartTime.setText(DialogManager.timeResult);\n }\n });\n } else {\n DialogManager.showTimePickerDialog(App.currentActivity, \"\", 12, 0, new Runnable() {\n @Override\n public void run() {\n btnStartTime.setText(DialogManager.timeResult);\n }\n });\n }\n }\n });\n\n btnSelectTone.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_NOTIFICATION);\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, \"Select Tone\");\n intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri) null);\n startActivityForResult(intent, 5);\n }\n });\n\n setViewsStatus();\n }",
"private void setAdaptersForDataToShow() {\n LinearLayoutManager linearLayoutManager_SectionOfDays = new LinearLayoutManager(this);\n linearLayoutManager_SectionOfDays.setOrientation(LinearLayoutManager.HORIZONTAL);\n recyclerView_sectionOfDays.setLayoutManager(linearLayoutManager_SectionOfDays);\n recyclerView_sectionOfDays.setAdapter(new SectionOfDays_RecyclerViewAdapter(this, daysArray, this));\n\n /**\n * Vertical Recycler View showing List Of Trains\n */\n LinearLayoutManager linearLayoutManager_ListOfTrains = new LinearLayoutManager(this);\n linearLayoutManager_ListOfTrains.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView_listOfTrains.setLayoutManager(linearLayoutManager_ListOfTrains);\n setAdapter_ListOfTrains_Vertical_RecyclerView(0);\n }",
"private void initSpinnerTypeExam()\n {\n Spinner spinner = findViewById(R.id.iTypeExam);\n\n // Adapt\n final ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this,\n R.layout.support_simple_spinner_dropdown_item\n );\n spinner.setAdapter(adapter);\n\n // ajout des types d'examens\n for(TypeExamen t : TypeExamen.values())\n {\n adapter.add(t.toString());\n }\n }",
"public void preencheSpinnerTemas(ArrayList temas){\n ArrayAdapter<Tema> spinnerArrayAdapter = new ArrayAdapter<Tema>(\n this, android.R.layout.simple_spinner_item, temas);\n temaAtividade.setAdapter(spinnerArrayAdapter);\n }",
"public void addItemsToSpinner(){\n spinner = (Spinner) findViewById(R.id.newEvent_spinner_notification);\n spinner.setOnItemSelectedListener(new SpinnerActivity());\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.arrray_notification, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n }",
"private void Init() {\n\t\tnumPick1 = (NumberPicker) findViewById(R.id.lottoNumPicker1);\n\t\tnumPick2 = (NumberPicker) findViewById(R.id.lottoNumPicker2);\n\t\tnumPick3 = (NumberPicker) findViewById(R.id.lottoNumPicker3);\n\t\tnumPick4 = (NumberPicker) findViewById(R.id.lottoNumPicker4);\n\t\tnumPick5 = (NumberPicker) findViewById(R.id.lottoNumPicker5);\n\t\tnumPick6 = (NumberPicker) findViewById(R.id.lottoNumPicker6);\n\t\tgridView = (GridView) findViewById(R.id.lottoGridView);\n\t\ttvFix = (TextView) findViewById(R.id.lottoTvFix);\n\t\tgo = (Button) findViewById(R.id.lottoGo);\n\n\t\tfor (int i = 0; i < 49; i++) {\n\t\t\tnumbers[i] = Integer.toString(i + 1);\n\t\t}\n\t}",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n quanHuyens = sqLite_quanHuyen.getDSQH(arrTinhTP.get(position).getId());\n adapterRecyclerViewChonQuan = new AdapterRecyclerViewChonQuan(quanHuyens, getApplicationContext());\n recycleQH.setAdapter(adapterRecyclerViewChonQuan);\n\n //spinnerQuanHuyen_adapter = new SpinnerQuanHuyen_Adapter(getApplicationContext(), arrQuanHuyen);\n //spinnerQuanHuyen_adapter.notifyDataSetChanged();\n //spinnerQuanHuyen.setAdapter(spinnerQuanHuyen_adapter);\n\n }",
"private void setData() {\n ArrayAdapter<State> adapter = new ArrayAdapter<State>(this, android.R.layout.simple_spinner_dropdown_item, StaticData.getStates());\n stateSpinner.setAdapter(adapter);\n stateSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n selectedState = (State) parent.getSelectedItem();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }",
"public void initViews() {\n et_overrideTeamNum = findViewById(R.id.et_overrideTeamNum);\n\n rb_red = findViewById(R.id.red);\n rb_blue = findViewById(R.id.blue);\n }",
"private void initAcountSetView() {\n\t\tmAcountSetView = mInflater.inflate(R.layout.accout_set_view, null);\r\n\t\tmAccountBtn = (Button) mAcountSetView.findViewById(R.id.acount_set_btn);\r\n\t\tmAccountBtn.setOnClickListener(this);\r\n\t\tmNickEt = (EditText) mAcountSetView.findViewById(R.id.nick_ed);\r\n\t\tmHeadWheel = (WheelView) mAcountSetView.findViewById(R.id.acount_head);\r\n\t\tmSexWheel = (WheelView) mAcountSetView.findViewById(R.id.acount_sex);\r\n\t\tmHeadWheel.setViewAdapter(new HeadAdapter(getActivity()));\r\n\t\tmSexWheel.setViewAdapter(new SexAdapter(getActivity()));\r\n\t}",
"private void courseSpinnerSetup(){\r\n\t\tSpinner spinner = (Spinner) findViewById(R.id.CourseSpinner);\r\n \t\r\n \tArrayAdapter<String> adapter = new ArrayAdapter<String>(Statistics.this, android.R.layout.simple_spinner_item, courses);\r\n \tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n \tspinner.setAdapter(adapter);\r\n \t\r\n \tspinner.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n \t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\r\n \t\t\t//\\todo allow for other players besides the default player (pos=0)\r\n calculateCourseStats(pos, 0);\r\n \t\t\t\r\n \t\t\tcourseSpinnerPosition = pos;\r\n \t\t}\r\n\r\n \t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n \t\t}\r\n \t}); \t\r\n\t}",
"private void bindAllViewElements() {\n\t\tseatingInfoList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_seating_info_list);\n\t\tqrCodeButton = (Button) findViewById(R.id.ticket_detail_view_view_qr_code_btn);\n\t\tpdfButton = (Button) findViewById(R.id.ticket_detail_view_view_pdf_btn);\n\n\t\tdnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_reference_number_value);\n\t\tpnrNumberValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_resevation_code_value);\n\t\t//paymentMethod = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_TextView);\n\t\t//paymentMethodValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_payment_method_value);\n\t\ttotalPriceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_total_price_value);\n\t\tinsurance = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_TextView);\n\t\tinsuranceValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_insurance_value);\n\t\ttariffValue = (TextView) findViewById(R.id.ticket_detail_view_booking_detail_tariff_value);\n\n\t\ttariffDetail = (TextView) findViewById(R.id.ticket_detail_view_tariff_details_TextView);\n\n\t\tdeliveryMethodValue = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_value);\n\t\tdeliveryMethodInfo = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_TextView);\n\t\tdeliveryMethodInfoDetail1 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail1_TextView);\n\t\tdeliveryMethodInfoDetail2 = (TextView) findViewById(R.id.ticket_detail_view_delivery_method_info_detail2_TextView);\n\n\t\texchangeButton = (Button) findViewById(R.id.ticket_detail_view_view_exchange_btn);\n\t\tcancelButton = (Button) findViewById(R.id.ticket_detail_view_view_cancel_btn);\n\n\t\ttitle = (TextView) findViewById(R.id.ticket_detail_view_title);\n\n\t\tstationList = (LinearLayoutForListView) findViewById(R.id.ticket_detail_view_station_list);\n\t\trooView = findViewById(R.id.ticket_detail_root_view);\n\t\trooView.setVisibility(View.VISIBLE);\n\t\tprogressBar = (LinearLayout)findViewById(R.id.tickets_detail_view_progressBarLayout);\n\t\terrorLayout = (LinearLayout) findViewById(R.id.tickets_detail_view_service_error_Layout);\n\t\t\n\t\terrorTextview = (TextView) findViewById(R.id.tickets_detail_view_retrieving_real_time_service_error_textview);\n\t\t\n\t\trunProgressBar();\n\t\t\n\t\tbindAllListeners();\n\t}",
"private void addAccountsToSpinner(){\n ArrayAdapter<String> dataAdaptor = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, customer.getAccountNameList());\n dataAdaptor.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n acctSpinner.setAdapter(dataAdaptor);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_basic, container, false);\n\n Spinner heightSpinner = view.findViewById(R.id.heightSpinner);\n Spinner profileCreatedBySpinner = view.findViewById(R.id.profileCreatedBySpinner);\n Spinner profileCreatedForSpinner = view.findViewById(R.id.profileCreatedForSpinner);\n Spinner motherTongueSpinner = view.findViewById(R.id.motherTongueSpinner);\n Spinner martialStatusSpinner = view.findViewById(R.id.martialStatusSpinner);\n Spinner physicalStatusSpinner = view.findViewById(R.id.physicalStatusSpinner);\n\n heightSpinner.setOnItemSelectedListener(this);\n profileCreatedBySpinner.setOnItemSelectedListener(this);\n profileCreatedForSpinner.setOnItemSelectedListener(this);\n motherTongueSpinner.setOnItemSelectedListener(this);\n martialStatusSpinner.setOnItemSelectedListener(this);\n physicalStatusSpinner.setOnItemSelectedListener(this);\n\n\n ArrayAdapter heightAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item, heights);\n heightAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n heightSpinner.setAdapter(heightAdapter);\n\n ArrayAdapter profileCreatedByAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item, profileCreatedByList);\n profileCreatedByAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n profileCreatedBySpinner.setAdapter(profileCreatedByAdapter);\n\n ArrayAdapter profileCreatedForAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item, profileCreatedForList);\n profileCreatedForAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n profileCreatedForSpinner.setAdapter(profileCreatedForAdapter);\n\n ArrayAdapter motherTongueAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item, motherTongueList);\n motherTongueAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n motherTongueSpinner.setAdapter(motherTongueAdapter);\n\n ArrayAdapter martialStatusAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item, martialStatusList);\n martialStatusAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n martialStatusSpinner.setAdapter(martialStatusAdapter);\n\n ArrayAdapter physicalStatusAdapter = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item, physicalStatusList);\n physicalStatusAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n physicalStatusSpinner.setAdapter(physicalStatusAdapter);\n\n final EditText fname, sname, email, hght, dob;\n fname = view.findViewById(R.id.firstName);\n sname = view.findViewById(R.id.surname);\n email = view.findViewById(R.id.email);\n hght = view.findViewById(R.id.height);\n dob = view.findViewById(R.id.dateOfBirth);\n\n Button submit = view.findViewById(R.id.submit);\n submit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Log.i(\"Basic Details\", fname.getText().toString());\n Log.i(\"Basic Details\", sname.getText().toString());\n Log.i(\"Basic Details\", email.getText().toString());\n Log.i(\"Basic Details\", hght.getText().toString());\n Log.i(\"Basic Details\", dob.getText().toString());\n String basic = fname.getText().toString() + \" : \" + sname.getText().toString() + \" : \" + email.getText().toString() + \" : \" + hght.getText().toString() + \" : \" + dob.getText().toString();\n\n Log.i(\"Basic Details\", basic);\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.fragmentLayout, new ProfessionalInfoFragment());\n fragmentTransaction.commit();\n }\n });\n\n return view;\n }"
] | [
"0.7730713",
"0.74189585",
"0.7038264",
"0.69408125",
"0.6762367",
"0.6666909",
"0.6625606",
"0.6566676",
"0.6361816",
"0.6352748",
"0.6351269",
"0.63430226",
"0.62782955",
"0.62694705",
"0.6225629",
"0.62217057",
"0.6156655",
"0.6097938",
"0.6087185",
"0.60487723",
"0.59674054",
"0.59333163",
"0.59076107",
"0.5893059",
"0.5892695",
"0.5871199",
"0.5864512",
"0.58502764",
"0.5840104",
"0.58159935",
"0.58122444",
"0.5796052",
"0.57883525",
"0.57863533",
"0.5779098",
"0.5776639",
"0.576895",
"0.57445365",
"0.5721887",
"0.57212555",
"0.57101524",
"0.57047504",
"0.5681688",
"0.567123",
"0.5666508",
"0.5663698",
"0.5650408",
"0.5639693",
"0.5639156",
"0.563695",
"0.5634613",
"0.56192726",
"0.5595039",
"0.55926186",
"0.5592465",
"0.55816835",
"0.5578428",
"0.55707914",
"0.5555395",
"0.5546938",
"0.5540214",
"0.5536149",
"0.55073327",
"0.55009043",
"0.54864633",
"0.54712254",
"0.5463669",
"0.54589015",
"0.54576904",
"0.5456274",
"0.5456116",
"0.54473424",
"0.54443777",
"0.54374397",
"0.5435683",
"0.5426609",
"0.54250896",
"0.54184437",
"0.54174715",
"0.5404641",
"0.5403671",
"0.5401039",
"0.54003763",
"0.5396944",
"0.5381466",
"0.53660417",
"0.5363689",
"0.53540915",
"0.53502125",
"0.53454477",
"0.534394",
"0.53425384",
"0.5335718",
"0.5319745",
"0.5309554",
"0.5309542",
"0.5300857",
"0.5300253",
"0.5291131",
"0.52880305"
] | 0.5894427 | 23 |
Event handler for all checkbox events located in the End Game tab. Check boxes checked = 1; Unchecked boxes = 0 Source: | public void onCheckboxClicked(View view, ScoutFormData sfd) {
// Is the view now checked?
boolean checked = ((CheckBox) view).isChecked();
// Check which checkbox was clicked
switch(view.getId()) {
case R.id.eCheck_StackYellow:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSYELLOW_COLUMN("1");
sfd.setEBONUSYELLOW_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSYELLOW_COLUMN("0");
sfd.setEBONUSYELLOW_COLUMN("0");
}
break;
case R.id.eCheck_StackTop:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOP_COLUMN("1");
sfd.setEBONUSTOP_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOP_COLUMN("0");
sfd.setEBONUSTOP_COLUMN("0");
}
break;
case R.id.eCheck_StackBottom:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSBOTTOM_COLUMN("1");
sfd.setEBONUSBOTTOM_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSBOTTOM_COLUMN("0");
sfd.setEBONUSBOTTOM_COLUMN("0");
}
break;
case R.id.eCheck_AbleCollect:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN("1");
sfd.setEHPCOLLECT_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN("0");
sfd.setEHPCOLLECT_COLUMN("0");
}
break;
case R.id.eCheck_Stacker:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPSTACKER_COLUMN("1");
sfd.setEHPSTACKER_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPSTACKER_COLUMN("0");
sfd.setEHPSTACKER_COLUMN("0");
}
break;
case R.id.eCheck_Herder:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPHERDER_COLUMN("1");
sfd.setEHPHERDER_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPHERDER_COLUMN("0");
sfd.setEHPHERDER_COLUMN("0");
}
break;
case R.id.eCheck_BinSpecialist:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPBIN_COLUMN("1");
sfd.setEHPBIN_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPBIN_COLUMN("0");
sfd.setEHPBIN_COLUMN("0");
}
break;
case R.id.eCheck_NoodleSpecialist:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPNOODLE_COLUMN("1");
sfd.setEHPNOODLE_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPNOODLE_COLUMN("0");
sfd.setEHPNOODLE_COLUMN("0");
}
break;
case R.id.eCheck_Inbound:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPINBOUND_COLUMN("1");
sfd.setEHPINBOUND_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPINBOUND_COLUMN("0");
sfd.setEHPINBOUND_COLUMN("0");
}
break;
case R.id.eCheck_Other:
if (checked) {
Log.i("Stack Yellow", "Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPOTHER_COLUMN("1");
sfd.setEHPOTHER_COLUMN("1");
}
else {
Log.i("Stack Yellow", "Un-Checked");
//((ScoutFormActivity) getActivity()).getScoutForm().setEHPOTHER_COLUMN("0");
sfd.setEHPOTHER_COLUMN("0");
}
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void itemStateChanged(ItemEvent check) {\r\n\r\n // Process the reaction class checkboxes. First\r\n // get the components of the relevant panels\r\n // and store in Component arrays (Note: the method\r\n // getComponents() is inherited from the Container\r\n // class by the subclass Panel).\r\n\r\n Component [] components4 = panel4.getComponents();\r\n Component [] components5 = panel5.getComponents();\r\n\r\n // Now process these components that are checkboxes\r\n // (only the first element of each array is). First cast the\r\n // Component to a Checkbox. Then use the getState()\r\n // method of Checkbox to return boolean true if\r\n // checked and false otherwise.\r\n\r\n Checkbox cb4 = (Checkbox)components4[0]; // Checkbox for panel4\r\n Checkbox cb5 = (Checkbox)components5[0]; // Checkbox for panel5\r\n\r\n // Then use the getState() method of Checkbox to\r\n // return boolean true if checked and false otherwise.\r\n // Use this logic to disable one or the other sets of\r\n // choices for temperature and density input.\r\n\r\n if( cb4.getState() ) {\r\n checkBox[1].setState(false); // Seems needed despite CheckBoxGroup\r\n rho.disable();\r\n rho.setBackground(disablebgColor);\r\n rhoL.setForeground(disablefgColor);\r\n T9.disable();\r\n T9.setBackground(disablebgColor);\r\n T9L.setForeground(disablefgColor);\r\n profile.enable();\r\n profile.setBackground(panelBackColor);\r\n profileL.setForeground(panelForeColor);\r\n } else if ( cb5.getState() ) {\r\n checkBox[0].setState(false);\r\n rho.enable();\r\n rho.setBackground(panelBackColor);\r\n rhoL.setForeground(panelForeColor);\r\n T9.enable();\r\n T9.setBackground(panelBackColor);\r\n T9L.setForeground(panelForeColor);\r\n profile.disable();\r\n profile.setBackground(disablebgColor);\r\n profileL.setForeground(disablefgColor);\r\n }\r\n }",
"@Override\n \t\t\tpublic void checkStateChanged(CheckStateChangedEvent event) {\n \t\t\t\tEntityDefinition eventSource = (EntityDefinition) event.getElement();\n \t\t\t\tif (event.getChecked())\n \t\t\t\t\tselection.add(eventSource);\n \t\t\t\telse\n \t\t\t\t\tselection.remove(eventSource);\n \t\t\t}",
"@FXML\n private void handleCheckBoxAction(ActionEvent e)\n {\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n if (!checkBoxesHaveBeenClicked)\n {\n checkBoxesHaveBeenClicked = true;\n System.out.println(\"have check boxes been cliked: \" + checkBoxesHaveBeenClicked);\n }\n \n //ArrayList that will hold all the filtered events based on the selection of what terms are visible\n ArrayList<String> termsToFilter = new ArrayList();\n \n //Check each of the checkboxes and call the appropiate queries to\n //show only the events that belong to the term(s) the user selects\n \n //vaccance\n if (fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is selected\");\n termsToFilter.add(\"vaccance\");\n }\n \n if (!fallSemCheckBox.isSelected())\n {\n System.out.println(\"vaccance checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"vaccance\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n //travail\n if (springSemCheckBox.isSelected())\n {\n System.out.println(\"travail Sem checkbox is selected\");\n termsToFilter.add(\"travail\");\n }\n if (!springSemCheckBox.isSelected())\n {\n System.out.println(\"travail checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"travail\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //annivessaire\n if (summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is selected\");\n termsToFilter.add(\"annivessaire\");\n }\n if (!summerSemCheckBox.isSelected())\n {\n System.out.println(\"annivessaire checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"annivessaire\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n //formation\n if (allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is selected\");\n termsToFilter.add(\"formation\");\n }\n if (!allQtrCheckBox.isSelected())\n {\n System.out.println(\"formation checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"formation\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // certif\n if (allHalfCheckBox.isSelected())\n {\n System.out.println(\"certif checkbox is selected\");\n termsToFilter.add(\"certif\");\n }\n if (!allHalfCheckBox.isSelected())\n {\n System.out.println(\"importantcheckbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"certif\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n // imporatnt\n if (allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is selected\");\n termsToFilter.add(\"\");\n }\n if (!allCampusCheckBox.isSelected())\n {\n System.out.println(\"important checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"important\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n \n // urgent\n if (allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is selected\");\n termsToFilter.add(\"urgent\");\n }\n if (!allHolidayCheckBox.isSelected())\n {\n System.out.println(\"urgent checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"urgent\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n \n// // workshop\n if (allMbaCheckBox.isSelected())\n {\n System.out.println(\"Workshop checkbox is selected\");\n termsToFilter.add(\"workshop\");\n }\n if (!allMbaCheckBox.isSelected())\n {\n System.out.println(\"workshop checkbox is now deselected\");\n int auxIndex = termsToFilter.indexOf(\"workshop\");\n if (auxIndex != -1)\n {\n termsToFilter.remove(auxIndex);\n }\n }\n// \n// // All TRA/TRB\n// if (allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All TRA/TRB checkbox is selected\");\n// termsToFilter.add(\"TRA\");\n// termsToFilter.add(\"TRB\");\n// }\n// if (!allTraTrbCheckBox.isSelected())\n// {\n// System.out.println(\"All Holiday checkbox is now deselected\");\n// int auxIndex = termsToFilter.indexOf(\"TRA\");\n// int auxIndex2 = termsToFilter.indexOf(\"TRB\");\n// if (auxIndex != -1)\n// {\n// termsToFilter.remove(auxIndex);\n// }\n// if (auxIndex2 != -1)\n// {\n// termsToFilter.remove(auxIndex2);\n// }\n// }\n// \n \n System.out.println(\"terms to filter list: \" + termsToFilter);\n \n //Get name of the current calendar that the user is working on\n String calName = Model.getInstance().calendar_name;\n \n System.out.println(\"and calendarName is: \" + calName);\n \n if (termsToFilter.isEmpty())\n {\n System.out.println(\"terms are not selected. No events have to appear on calendar. Just call loadCalendarLabels method in the RepaintView method\");\n selectAllCheckBox.setSelected(false);\n loadCalendarLabels();\n }\n else\n {\n System.out.println(\"Call the appropiate function to populate the month with the filtered events\");\n //Get List of Filtered Events and store all events in an ArrayList variable\n ArrayList<String> filteredEventsList = databaseHandler.getFilteredEvents(termsToFilter, calName);\n \n System.out.println(\"List of Filtered events is: \" + filteredEventsList);\n \n //Repaint or reload the events based on the selected terms\n showFilteredEventsInMonth(filteredEventsList);\n }\n \n \n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent evt) {\n\t\t\t\tcheckboxsActionPerformed(evt);\n\t\t\t}",
"void onCheckedTriStateChanged(TriStateCheckBox triStateCheckBox, State state);",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"@Override\n public void onCheck(boolean isChecked) {\n Log.e(\"isChecked\", \"onCheck: isChecked=\" + isChecked);\n }",
"public void start(Stage myStage) { \n \n // Give the stage a title. \n myStage.setTitle(\"Demonstrate Check Boxes\"); \n \n // Use a vertical FlowPane for the root node. In this case, \n // vertical and horizontal gaps of 10. \n FlowPane rootNode = new FlowPane(Orientation.VERTICAL, 10, 10); \n \n // Center the controls in the scene. \n rootNode.setAlignment(Pos.CENTER); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 230, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n Label heading = new Label(\"What Computers Do You Own?\"); \n \n // Create a label that will report the state change of a check box. \n response = new Label(\"\"); \n \n // Create a label that will report all selected check boxes. \n selected = new Label(\"\"); \n \n // Create the check boxes. \n cbSmartphone = new CheckBox(\"Smartphone\"); \n cbTablet = new CheckBox(\"Tablet\"); \n cbNotebook = new CheckBox(\"Notebook\"); \n cbDesktop = new CheckBox(\"Desktop\"); \n \n // Handle action events for the check boxes. \n cbSmartphone.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbSmartphone.isSelected()) \n response.setText(\"Smartphone was just selected.\"); \n else \n response.setText(\"Smartphone was just cleared.\"); \n \n showAll(); \n } \n }); \n \n cbTablet.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbTablet.isSelected()) \n response.setText(\"Tablet was just selected.\"); \n else \n response.setText(\"Tablet was just cleared.\"); \n \n showAll(); \n } \n }); \n \n cbNotebook.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbNotebook.isSelected()) \n response.setText(\"Notebook was just selected.\"); \n else \n response.setText(\"Notebook was just cleared.\"); \n \n showAll(); \n } \n }); \n \n cbDesktop.setOnAction(new EventHandler<ActionEvent>() { \n public void handle(ActionEvent ae) { \n if(cbDesktop.isSelected()) \n response.setText(\"Desktop was just selected.\"); \n else \n response.setText(\"Desktop was just cleared.\"); \n \n showAll(); \n } \n }); \n \n // Add controls to the scene graph. \n rootNode.getChildren().addAll(heading, cbSmartphone, cbTablet, \n cbNotebook, cbDesktop, response, selected); \n \n // Show the stage and its scene. \n myStage.show(); \n \n showAll(); \n }",
"@FXML\n public void dmcEvent() {\n emulator.dmcEvent(dmcCheckbox.isSelected());\n }",
"final void refreshCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"refreshCheckBoxes\");\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n this.chkMsdtSelection.get(msdt).setSelected(false);\r\n } else {\r\n this.chkMsdtSelection.get(msdt).setSelected(true);\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"refreshCheckBoxes\");\r\n }",
"public void finalcheckbox() {\n\t\tthis.finalcheckbox.click();\n\t}",
"@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\t\t\n\t}",
"void onCheckedChanged(Chip chip, boolean isChecked);",
"@Override\n\tpublic void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n\n\t}",
"private void addHandlersToCheckBox() {\n\t\tmyMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tallMeasuresCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyMeasuresCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmyLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tallLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t} else {\n\t\t\t\t\tallLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tallLibrariesCheckBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void onValueChange(ValueChangeEvent<Boolean> event) {\n\t\t\t\tif (event.getValue()) {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(false);\n\t\t\t\t\tsetSelectedFilter(ALL);\n\t\t\t\t} else {\n\t\t\t\t\tmyLibrariesCheckBox.setValue(true);\n\t\t\t\t\tsetSelectedFilter(MY);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n }",
"public void itemStateChanged(ItemEvent e) {\n\t\tJCheckBox checkBoxSource = (JCheckBox) e.getSource();\n\n\t\tPLayer currLayer = null;\n\n\t\tif (checkBoxSource == edgesCheckBox) {\n\t\t\tif (vd.getCurrentEdgeLayer() != null) {\n\t\t\t\tcurrLayer = vd.getCurrentEdgeLayer();\n\t\t\t} else {\n\t\t\t\tcurrLayer = pvc.getLayer(PVisualizationCanvas.EDGE_LAYER_NAME);\n\t\t\t}\n\t\t} else if (checkBoxSource == eventsCheckBox) {\n\t\t\tcurrLayer = pvc.getLayer(PVisualizationCanvas.EVENT_LAYER_NAME);\n\t\t} else if (checkBoxSource == labelsCheckBox) {\n\t\t\tcurrLayer = pvc.getLayer(PVisualizationCanvas.LABEL_LAYER_NAME);\n\t\t}\n\n\t\tif (e.getStateChange() == ItemEvent.SELECTED) {\n\t\t\tcurrLayer.setVisible(true);\n\t\t} else {\n\t\t\tcurrLayer.setVisible(false);\n\t\t}\n\t}",
"public interface OnCheckedListener {\n void onCheck(boolean isChecked);\n}",
"public interface OnCheckListener {\r\n\t\t\r\n\t\tvoid onChecked(View v);\r\n\r\n\t}",
"@FXML\n public void triangleEvent() {\n emulator.triangleEvent(triangleCheckbox.isSelected());\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n RowData data = (RowData) viewHolder.chkBox.getTag();\n if (isChecked) {\n\n checkBoxState.set(data.position, true);\n Log.i(tag, \"cursor.getPosition(true) with onChecked Listener : \" + data.position);\n }\n else {\n checkBoxState.set(data.position, false);\n Log.i(tag, \"cursor.getPosition(false) with onChecked Listener : \" + data.position);\n }\n }",
"@FXML\n\tprivate void botChecked(MouseEvent event) {\n\t\tuserList.setVisible(false);\n\t\tchatView.setText(\"\");\n\t\tif (\tsassiBot) {\n\t\t\tfor (ArrayList <String> conversation : this.conversations) {\n\t\t\t\tif (this.currentConversation.equals(String.join(\", \", conversation))) {\n\t\t\t\t\tclient.updateGroup(conversation);\n\t\t\t\t}\n\t\t\t}\n\t\t\tsassiBot = false;\n\t\t\tuserList.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\tsassiBot = true;\n\t\tthis.conversantName.setText(\"SASSIBOT\");\n\t\tthis.conversantImage.setVisible(true);\n\t\tthis.greenCircle.setVisible(false);\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton toggleButton, boolean isChecked) {\n if (!isChecked) {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_off));\n state[0] = 0;\n } else {\n viewHolder.state_endpoint_in_scene_text_view.setText(context.getResources().getString(R.string.label_on));\n state[0] = 255;\n }\n // If the values are modified while the user does not check/unckeck the checkbox, then we update the value from the controller.\n int exist = mode.getPayload().indexOf(c);\n if (exist != -1) {\n mode.getPayload().get(exist).setV(state[0]);\n }\n }",
"private void onCheckBoxTeilungRechts()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}",
"public void DisableCheckBox(ActionEvent event) throws Exception {\n\n if (!SavingRB.isSelected()) {//if savings is not selected than disable specials acc check box\n SpecialSavingAccCB.setSelected(false);\n SpecialSavingAccCB.setDisable(true);\n } else SpecialSavingAccCB.setDisable(false);\n\n if (!CheckingRB.isSelected()) {//if checkings is not selected than disable direct deposit check boc\n DirectDepositCheckingsCB.setSelected(false);\n DirectDepositCheckingsCB.setDisable(true);\n } else DirectDepositCheckingsCB.setDisable(false);\n\n if (CloseAccRB.isSelected()) {//if and else if to disable textfields based on bank options\n AmountInput.setDisable(true);\n DateInput.setDisable(true);\n } else if (DepositRB.isSelected() || WithdrawAccRB.isSelected()) {\n AmountInput.setDisable(false);\n DateInput.setDisable(true);\n } else {\n AmountInput.setDisable(false);\n DateInput.setDisable(false);\n }\n\n\n }",
"public void checkbox() {\r\n\t\tcheckBox.click();\r\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n li.setChecked(false);\n }\n //do something else\n kgButton = true;\n }",
"@Override\n public void onCheckedChanged(CompoundButton arg0, boolean arg1) {\n if (arg1 == true) {\n }\n { //Do something\n kc.setChecked(false);\n }\n //do something else\n lbButton = true;\n\n }",
"public final void entryRuleCheckbox() throws RecognitionException {\n try {\n // InternalBrowser.g:479:1: ( ruleCheckbox EOF )\n // InternalBrowser.g:480:1: ruleCheckbox EOF\n {\n before(grammarAccess.getCheckboxRule()); \n pushFollow(FOLLOW_1);\n ruleCheckbox();\n\n state._fsp--;\n\n after(grammarAccess.getCheckboxRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"@Override\n public void onCheckStocksRaised() {\n if (coffeeStock <= 0) {\n coffeeButton.setEnabled(false);\n }\n if (espressoStock <= 0) {\n espressoButton.setEnabled(false);\n }\n if (teaStock <= 0) {\n teaButton.setEnabled(false);\n }\n if (soupStock <= 0) {\n soupButton.setEnabled(false);\n }\n if (icedTeaStock <= 0) {\n icedTeaButton.setEnabled(false);\n }\n if (syrupStock <= 0) {\n optionSugar.setEnabled(false);\n }\n if (vanillaStock <= 0) {\n optionIceCream.setEnabled(false);\n }\n if (milkStock <= 0) {\n optionMilk.setEnabled(false);\n }\n if (breadStock <= 0) {\n optionBread.setEnabled(false);\n }\n if (sugarStock <= 4) {\n sugarSlider.setMaximum(sugarStock);\n }\n }",
"boolean getCheckState();",
"public void actionPerformed(ActionEvent e)\n {\n JCheckBoxMenuItem item = (JCheckBoxMenuItem)e.getSource();\n \n if (item.getName().equals(\"typingNotifications\"))\n { \n ConfigurationManager.setSendTypingNotifications(item.isSelected());\n }\n else if (item.getName().equals(\"sendingMessageCommand\"))\n { \n chatWindow.getCurrentChatPanel().getChatWritePanel()\n .changeSendCommand(!item.isSelected());\n \n if(!item.isSelected())\n ConfigurationManager.setSendMessageCommand(\n ConfigurationManager.ENTER_COMMAND);\n else\n ConfigurationManager.setSendMessageCommand(\n ConfigurationManager.CTRL_ENTER_COMMAND);\n }\n else if (item.getName().equals(\"autopopup\"))\n {\n ConfigurationManager.setAutoPopupNewMessage(item.isSelected());\n }\n }",
"public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox_1.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox.setSelected(false);\r\n // disable the combox box drop down\r\n comboBox.setEnabled(false);\r\n // enable the textfield for the user input\r\n textField_3.setEnabled(true);\r\n textField_3.setText(\"\");\r\n // disable the refresh rooms button\r\n btnNewButton.setEnabled(false);\r\n }\r\n }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\n\t}",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\n\t}",
"protected void setCheckedBoxes() {\n checkBoxIfInPreference(findViewById(R.id.concordiaShuttle));\n checkBoxIfInPreference(findViewById(R.id.elevators));\n checkBoxIfInPreference(findViewById(R.id.escalators));\n checkBoxIfInPreference(findViewById(R.id.stairs));\n checkBoxIfInPreference(findViewById(R.id.accessibilityInfo));\n checkBoxIfInPreference(findViewById(R.id.stepFreeTrips));\n }",
"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}",
"private void drawCheck(Graphics2D g2, boolean enabled, int x, int y, int width, int height)\r\n/* 97: */ {\r\n/* 98:140 */ g2.setColor(enabled ? UIManager.getColor(\"CheckBox.check\") : MetalLookAndFeel.getControlDisabled());\r\n/* 99: */ \r\n/* 100: */ \r\n/* 101:143 */ int right = x + width;\r\n/* 102:144 */ int bottom = y + height;\r\n/* 103:145 */ int startY = y + height / 3;\r\n/* 104:146 */ int turnX = x + width / 2 - 2;\r\n/* 105:147 */ g2.drawLine(x, startY, turnX, bottom - 3);\r\n/* 106:148 */ g2.drawLine(x, startY + 1, turnX, bottom - 2);\r\n/* 107:149 */ g2.drawLine(x, startY + 2, turnX, bottom - 1);\r\n/* 108:150 */ g2.drawLine(turnX + 1, bottom - 2, right, y);\r\n/* 109:151 */ g2.drawLine(turnX + 1, bottom - 1, right, y + 1);\r\n/* 110:152 */ g2.drawLine(turnX + 1, bottom, right, y + 2);\r\n/* 111: */ }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }",
"private void countsCheckActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_countsCheckActionPerformed\n if(wantsCounts){\n wantsCounts = false;\n }\n else{\n wantsCounts = true;\n }\n }",
"final void initializeCheckBoxes() {\r\n\r\n logger.entering(this.getClass().getName(), \"initializeCheckBoxes\");\r\n\r\n this.chkMsdtSelection = new HashMap < MicroSensorDataType, JCheckBox >();\r\n\r\n for (MicroSensorDataType msdt : this.msdtFilterMap.keySet()) {\r\n if (this.msdtFilterMap.get(msdt) == Boolean.TRUE) {\r\n\t\t\t\tthis.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n false));\r\n } else {\r\n this.chkMsdtSelection.put(msdt, new JCheckBox(msdt.getName(),\r\n true));\r\n }\r\n\r\n }\r\n\r\n logger.exiting(this.getClass().getName(), \"initializeCheckBoxes\");\r\n }",
"private void enableCheckChange() {\n this.tree.addListener(Events.CheckChange, new GPCheckListener(visitorDisplay));\n }",
"public void actionPerformed(ActionEvent arg0) {\n if (chckbxNewCheckBox.isSelected() == true) {\r\n // set the other checkbox to unchecked\r\n chckbxNewCheckBox_1.setSelected(false);\r\n // enable the combox box drop down\r\n comboBox.setEnabled(true);\r\n // disable the textfield for the user input\r\n textField_3.setEnabled(false);\r\n textField_3.setText(\"\");\r\n // enable the refresh rooms button\r\n btnNewButton.setEnabled(true);\r\n }\r\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n\n\n\n }",
"private void checkTickListener()\n\t{\n\t}",
"private void setCheckBoxChecked() {\n grupoRespuestasUnoMagnitudes.check(radioChecked[0]);\n grupoRespuestasDosMagnitudes.check(radioChecked[1]);\n grupoRespuestasTresMagnitudes.check(radioChecked[2]);\n grupoRespuestasCuatroMagnitudes.check(radioChecked[3]);\n grupoRespuestasCincoMagnitudes.check(radioChecked[4]);\n grupoRespuestasSeisMagnitudes.check(radioChecked[5]);\n grupoRespuestasSieteMagnitudes.check(radioChecked[6]);\n grupoRespuestasOchoMagnitudes.check(radioChecked[7]);\n grupoRespuestasNueveMagnitudes.check(radioChecked[8]);\n grupoRespuestasDiezMagnitudes.check(radioChecked[9]);\n }",
"public void tickCheckBox() {\r\n\t\tcheckBox = driver.findElement(checkBoxSelector);\r\n\t\tcheckBox.click();\r\n\t\t\r\n\t}",
"@Override\n\tpublic void onClick(ClickEvent event) {\n\t\tif (event.getSource() == select) {\n\t\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\t\tif (cb == null) {Window.alert(\"select \" + row);}\n\t\t\t\tcb.setValue(true);\n\t\t\t}\n\t\t}\n\t\telse if (event.getSource() == remove) {\n\t\t\tfor (int row = 0; row < field.getRowCount(); row++) {\n\t\t\t\tCheckBox cb = (CheckBox) field.getWidget(row, 2);\n\t\t\t\tif (cb == null) {Window.alert(\"remove \" + row);}\n\t\t\t\tcb.setValue(false);\n\t\t\t}\t\t\t\n\t\t}\n\t\telse if (isEnabled()) {\n\t\t\tHTMLTable.Cell cell = field.getCellForEvent(event);\n\t\t\tint selectedRow = cell.getRowIndex();\n\t\t\tCheckBox cb = (CheckBox) field.getWidget(selectedRow, 2);\n\t\t\tcb.setValue (!cb.getValue());\n\t\t\tfireChange(this);\n\t\t}\n\t}",
"void onCheck(Chess.Color inCheckColor);",
"@Override\n protected void listenToUi(UiWatcher watcher) {\n Logger.debug(\"Listening to the checkbox\");\n watcher.listenTo(theCheckBox);\n }",
"interface GamePanelBooleanChangedListener {\n public void OnMyBooleanChanged();\n}",
"private void eventoSumergido(){\n s1.setChecked(false);\n s2.setChecked(false);\n s3.setChecked(true);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np1));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SUMERGIDO);\n }",
"@Override\n\npublic void mouseExited(MouseEvent e){\n\n for(int i=0;i<10;i++){\n\n for(int j=0;j<15;j++){\n\n if(this.grille.checkEffacer[i][j]==false) this.grille.setFalse(this.grille.checkSurvoler);\n\n }\n\n }\n\n\n\n this.frame.repaint();\n\n }",
"protected void do_chckbxOther_actionPerformed(ActionEvent arg0) {\n\t\tif(chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(true);\n\t\telse if(! chckbxOther.isSelected())\n\t\t\tcheckOtherTF.setVisible(false);\n\t\t\t\n\t}",
"@Override\r\n public void onClick(View view){\r\n int actualClicked = view.getId();\r\n\r\n for(SpecialPoint box: allCheckBoxes){\r\n int tempId = box.getCheckBox().getId();\r\n CheckBox currentBox = box.getCheckBox();\r\n\r\n if(tempId == actualClicked && currentBox.isChecked()){\r\n currentBox.setChecked(true);\r\n }else{\r\n currentBox.setChecked(false);\r\n }\r\n }\r\n }",
"public final EObject entryRuleCheckBox() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCheckBox = null;\n\n\n try {\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1873:2: (iv_ruleCheckBox= ruleCheckBox EOF )\n // ../org.xtext.example.browser/src-gen/org/xtext/example/browser/parser/antlr/internal/InternalBrowser.g:1874:2: iv_ruleCheckBox= ruleCheckBox EOF\n {\n newCompositeNode(grammarAccess.getCheckBoxRule()); \n pushFollow(FOLLOW_ruleCheckBox_in_entryRuleCheckBox3705);\n iv_ruleCheckBox=ruleCheckBox();\n\n state._fsp--;\n\n current =iv_ruleCheckBox; \n match(input,EOF,FOLLOW_EOF_in_entryRuleCheckBox3715); \n\n }\n\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public void onAssetCheckboxClicked(View view) {\n\n boolean assetBoxChecked = ((CheckBox) view).isChecked(); // variable to check if the checkbox is checked or not\n\n switch (view.getId()){\n\n case R.id.checkbox_chequing:\n checkedAsset = findViewById(R.id.checkbox_chequing);\n chequingAccountAsset = chequingAccount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset, assetBoxChecked,chequingAccountTV.getText().toString(), chequingAccountAsset);\n break;\n\n case R.id.checkbox_savings:\n checkedAsset = findViewById(R.id.checkbox_savings);\n savingsAndTaxesAsset = savingsAndTaxesAmount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,savingsAndTaxesTV.getText().toString(), savingsAndTaxesAsset);\n break;\n\n case R.id.checkbox_rainydayFund:\n checkedAsset = findViewById(R.id.checkbox_rainydayFund);\n rainyDayFundAsset = rainyDayFund.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,rainyDayFunTV.getText().toString(), rainyDayFundAsset);\n break;\n\n case R.id.checkbox_pdSavings:\n checkedAsset = findViewById(R.id.checkbox_pdSavings);\n personalDevelopmentSavingsAsset = personalDevelopmentSavings.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,personalDevelopmentSavingsTV.getText().toString(), personalDevelopmentSavingsAsset);\n break;\n\n case R.id.checkbox_travelSavings:\n checkedAsset = findViewById(R.id.checkbox_travelSavings);\n travelSavingsAsset = travelSavings.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,travelSavingsTv.getText().toString(), travelSavingsAsset);\n break;\n\n case R.id.checkbox_investments:\n checkedAsset = findViewById(R.id.checkbox_investments);\n investmentsAsset = investments.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,investmentsTV.getText().toString(), investmentsAsset);\n break;\n\n case R.id.checkbox_primeHome:\n checkedAsset = findViewById(R.id.checkbox_primeHome);\n primaryHomeAsset = primaryHomeAmount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,primaryHomeAmountTV.getText().toString(), primaryHomeAsset);\n break;\n\n case R.id.checkbox_secHome:\n checkedAsset = findViewById(R.id.checkbox_secHome);\n secondaryHomeAsset = secondaryHomeAmount.getText().toString();\n addOrRemoveAssetInMaps(checkedAsset,assetBoxChecked,secondaryHomeAmountTV.getText().toString(), secondaryHomeAsset);\n break;\n\n\n }\n }",
"public final void entryRuleCheckCheckbox() throws RecognitionException {\n try {\n // InternalBrowser.g:879:1: ( ruleCheckCheckbox EOF )\n // InternalBrowser.g:880:1: ruleCheckCheckbox EOF\n {\n before(grammarAccess.getCheckCheckboxRule()); \n pushFollow(FOLLOW_1);\n ruleCheckCheckbox();\n\n state._fsp--;\n\n after(grammarAccess.getCheckCheckboxRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }",
"private void UpdateChecboxes()\r\n\t{\n\t\tfor (Iterator<CheckBox> iterator = this.CBlist.iterator(); iterator.hasNext();) \r\n\t\t{\r\n\t\t\t// for the next CheckBox\r\n\t\t\tCheckBox currChBox = iterator.next();\r\n\t\t\t\r\n\t\t\t// if the matching tag is true - \r\n\t\t\tif (this.hmTags.get(currChBox.getText()) == true)\r\n\t\t\t{\r\n\t\t\t\t// Check it\r\n\t\t\t\tcurrChBox.setChecked(true);\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"public void actionPerformed(ActionEvent arg0)\n {\n userAlert = chkAlert.getState();\n }",
"boolean getVisible(ActionEvent event) {\n JCheckBox box = (JCheckBox) event.getSource();\n return box.isSelected();\n }",
"private void onCheckBoxTeilungLinks()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\t\t\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel7 = new javax.swing.JLabel();\n jCheckBox2 = new javax.swing.JCheckBox();\n jCheckBox1 = new javax.swing.JCheckBox();\n jLabel6 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jTextField1 = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n btn_begin = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 51));\n jLabel7.setText(\"BEGIN\");\n getContentPane().add(jLabel7);\n jLabel7.setBounds(890, 420, 110, 50);\n\n jCheckBox2.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox2.setText(\"READY..??\");\n jCheckBox2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox2ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox2);\n jCheckBox2.setBounds(1550, 540, 150, 30);\n\n jCheckBox1.setFont(new java.awt.Font(\"Tahoma\", 0, 24)); // NOI18N\n jCheckBox1.setText(\"READY..??\");\n jCheckBox1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jCheckBox1ActionPerformed(evt);\n }\n });\n getContentPane().add(jCheckBox1);\n jCheckBox1.setBounds(300, 480, 140, 30);\n\n jLabel6.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 51, 0));\n jLabel6.setText(\"PLAYER-2\");\n getContentPane().add(jLabel6);\n jLabel6.setBounds(1570, 140, 190, 110);\n\n jLabel5.setFont(new java.awt.Font(\"Tempus Sans ITC\", 3, 36)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 51, 0));\n jLabel5.setText(\"PLAYER-1\");\n getContentPane().add(jLabel5);\n jLabel5.setBounds(200, 140, 190, 110);\n\n jLabel4.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel4.setForeground(new java.awt.Color(0, 0, 204));\n jLabel4.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel4);\n jLabel4.setBounds(1320, 380, 290, 60);\n\n jTextField2.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField2.setText(\"PLAYER2\");\n jTextField2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField2ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField2);\n jTextField2.setBounds(1600, 390, 280, 40);\n\n jTextField1.setFont(new java.awt.Font(\"Segoe Script\", 0, 24)); // NOI18N\n jTextField1.setText(\"PLAYER1\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n getContentPane().add(jTextField1);\n jTextField1.setBounds(290, 380, 280, 40);\n\n jLabel3.setFont(new java.awt.Font(\"Viner Hand ITC\", 3, 24)); // NOI18N\n jLabel3.setForeground(new java.awt.Color(255, 51, 0));\n jLabel3.setText(\"ENTER YOUR NAME :\");\n getContentPane().add(jLabel3);\n jLabel3.setBounds(10, 370, 290, 60);\n\n jLabel2.setFont(new java.awt.Font(\"Segoe Script\", 3, 24)); // NOI18N\n jLabel2.setForeground(new java.awt.Color(51, 204, 255));\n jLabel2.setText(\"WELCOME TO POKE WORLD\");\n getContentPane().add(jLabel2);\n jLabel2.setBounds(770, 20, 400, 50);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/Images/login.jpg\"))); // NOI18N\n getContentPane().add(jLabel1);\n jLabel1.setBounds(0, 0, 1920, 1080);\n\n btn_begin.setText(\"jButton2\");\n btn_begin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btn_beginActionPerformed(evt);\n }\n });\n getContentPane().add(btn_begin);\n btn_begin.setBounds(870, 390, 150, 100);\n\n pack();\n }",
"@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n }",
"private void onCheckBoxTeilungMitte()\n\t{\n\t\tif (istBeimTaktLaden)\n\t\t\treturn;\n\n\t\tistBeimTaktLaden = true;\n\n\t\tif (getJCheckBoxTeilungMitte().isSelected())\n\t\t{\n\t\t\tgetJCheckBoxTeilungLinks().setEnabled(true);\n\t\t\tgetJCheckBoxTeilungRechts().setEnabled(true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tgetJCheckBoxTeilungLinks().setEnabled(false);\n\t\t\tgetJCheckBoxTeilungRechts().setEnabled(false);\n\t\t\tgetJCheckBoxTeilungLinks().setSelected(false);\n\t\t\tgetJCheckBoxTeilungRechts().setSelected(false);\n\t\t}\n\t\thandleTeilung(getJCheckBoxTeilungLinks().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungMitte().isSelected(),\n\t\t\t\t\t\tgetJCheckBoxTeilungRechts().isSelected());\n\t\t\t\t\t\t\n\t\tistBeimTaktLaden = false;\n\t}",
"public void setCheckBoxes() {\n\t\tdeliveredCheckBox.setSelected(order.isDelivered());\n\t\tif (deliveredCheckBox.isSelected() || (!order.isPrepared())) {\n\t\t\tdeliveredCheckBox.setDisable(true);\n\t\t}\n\t}",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n switch (buttonView.getId()){\n case R.id.retina_fd:\n FaceDetectManager.setRetinaFD(isChecked);\n mRetina_FD.setChecked(FaceConstants.RETINA_FD);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_RETINA_FD, FaceConstants.RETINA_FD).commit();\n break;\n\n case R.id.remove_unnormal_switch:\n ConfigLib.isRemoveUnnormalFace = isChecked;\n mRemoveUnnormal.setChecked(ConfigLib.isRemoveUnnormalFace);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_REMOVE_UNNORMAL_FACE, ConfigLib.isRemoveUnnormalFace).commit();\n break;\n\n case R.id.mullive_switch:\n ConfigLib.detectWithLivenessModeUseMul = isChecked;\n mMulLiveness.setChecked(ConfigLib.detectWithLivenessModeUseMul);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_MULIVENESSSS, ConfigLib.detectWithLivenessModeUseMul).commit();\n break;\n\n case R.id.mulassist_switch:\n ConfigLib.detectWithLivenessWithMulAssist = isChecked;\n mMulAssist.setChecked(ConfigLib.detectWithLivenessWithMulAssist);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_MULASSISTSS, ConfigLib.detectWithLivenessWithMulAssist).commit();\n break;\n\n case R.id.cov_switch:\n ConfigLib.detectWithCovStatus = isChecked;\n mCov_switch.setChecked(ConfigLib.detectWithCovStatus);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_COVERMODE, ConfigLib.detectWithCovStatus).commit();\n break;\n\n case R.id.enhance_switch:\n ConfigLib.enhanceMode = isChecked;\n mEnhance_switch.setChecked(ConfigLib.enhanceMode);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_ENHANCEMODE,ConfigLib.enhanceMode).commit();\n break;\n\n case R.id.use_new_switch:\n// Log.d(TAG, \"onCheckedChanged: use_new_switch = \" + isChecked);\n ConfigLib.detectWithLivenessModeUseNew = isChecked;\n mUseNewLiveVersion_switch.setChecked(ConfigLib.detectWithLivenessModeUseNew);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_USENEWLIVEVERSION,ConfigLib.detectWithLivenessModeUseNew).commit();\n break;\n\n case R.id.use_fix_switch:\n ConfigLib.detectWithLivenessModeUseMix = isChecked;\n mUseFixLiveVersion_switch.setChecked(ConfigLib.detectWithLivenessModeUseMix);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_USEFIXLIVEVERSION,ConfigLib.detectWithLivenessModeUseMix).commit();\n break;\n\n case R.id.use_AWRGB_switch:\n ConfigLib.detectWithAwRGBLiveness = isChecked;\n mUseAWRGBLiveVersion_switch.setChecked(ConfigLib.detectWithAwRGBLiveness);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_USEAWRGBLIVEVERSION,ConfigLib.detectWithAwRGBLiveness).commit();\n break;\n\n\n case R.id.infrared_switch:\n ConfigLib.detectWithInfraredLiveness = isChecked;\n mInfrared_switch.setChecked(ConfigLib.detectWithInfraredLiveness);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_DETECTINFRARED,ConfigLib.detectWithInfraredLiveness).commit();\n ToastUtils.showShort(getResources().getString(R.string.reopen));\n break;\n\n case R.id.saveinfrared_switch:\n mSaveInfrared_switch.setChecked(isChecked);\n FaceDetectManager.setInfraredDebugPicsState(isChecked);\n break;\n\n case R.id.saveinfraredlive_switch:\n Constants.DEBUG_SAVE_INFRARED_LIVE = isChecked;\n mSaveInfraredLive_switch.setChecked(Constants.DEBUG_SAVE_INFRARED_LIVE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVEINFRAREDLIVE,Constants.DEBUG_SAVE_INFRARED_LIVE).commit();\n break;\n\n case R.id.saveinfraredfake_switch:\n Constants.DEBUG_SAVE_INFRARED_FAKE = isChecked;\n mSaveInfraredFake_switch.setChecked(Constants.DEBUG_SAVE_INFRARED_FAKE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVEINFRAREDFAKE,Constants.DEBUG_SAVE_INFRARED_FAKE).commit();\n break;\n\n case R.id.saveblur_switch:\n Constants.DEBUG_SAVE_BLUR = isChecked;\n mSaveBlur_switch.setChecked(Constants.DEBUG_SAVE_BLUR);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVEBLURDATA,Constants.DEBUG_SAVE_BLUR).commit();\n break;\n\n case R.id.savenoface_switch:\n Constants.DEBUG_SAVE_NOFACE = isChecked;\n mSaveNoFace_switch.setChecked(Constants.DEBUG_SAVE_NOFACE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVENOFACEDATA,Constants.DEBUG_SAVE_NOFACE).commit();\n break;\n\n case R.id.savess_switch:\n Constants.DEBUG_SAVE_SIMILARITY_SMALL = isChecked;\n mSaveSS_switch.setChecked(Constants.DEBUG_SAVE_SIMILARITY_SMALL);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SAVESSDATA,Constants.DEBUG_SAVE_SIMILARITY_SMALL).commit();\n break;\n\n case R.id.debug_switch:\n AttConstants.DEBUG = isChecked;\n mDebug_switch.setChecked(AttConstants.DEBUG);\n refreshDebug();\n FaceDetectManager.setDebug(AttConstants.DEBUG);\n AiwinnManager.getInstance().setDebug(AttConstants.DEBUG);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_DEBUG,AttConstants.DEBUG).commit();\n break;\n\n case R.id.info_switch:\n AttConstants.DEBUG_SHOW_FACEINFO = isChecked;\n mInfo_switch.setChecked(AttConstants.DEBUG_SHOW_FACEINFO);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_INOFO,AttConstants.DEBUG_SHOW_FACEINFO).commit();\n break;\n\n case R.id.savefake_switch:\n Constants.DEBUG_SAVE_FAKE = isChecked;\n mSaveF_switch.setChecked(Constants.DEBUG_SAVE_FAKE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_FAKE,Constants.DEBUG_SAVE_FAKE).commit();\n break;\n\n case R.id.savelive_switch:\n Constants.DEBUG_SAVE_LIVE = isChecked;\n mSaveL_switch.setChecked(Constants.DEBUG_SAVE_LIVE);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_LIVE,Constants.DEBUG_SAVE_LIVE).commit();\n break;\n\n case R.id.savet_switch:\n Constants.DEBUG_SAVE_TRACKER = isChecked;\n mSaveTracker_switch.setChecked(Constants.DEBUG_SAVE_TRACKER);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_TRACKER,Constants.DEBUG_SAVE_TRACKER).commit();\n break;\n\n case R.id.savetan_switch:\n Constants.DEBUG_SAVE_LIVEPIC_SDK = isChecked;\n mSaveTan_switch.setChecked(Constants.DEBUG_SAVE_LIVEPIC_SDK);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_ST,Constants.DEBUG_SAVE_LIVEPIC_SDK).commit();\n break;\n\n case R.id.saveerror_switch:\n Constants.DEBUG_SAVE_ERROR = isChecked;\n mSaveError_switch.setChecked(Constants.DEBUG_SAVE_ERROR);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SE,Constants.DEBUG_SAVE_ERROR).commit();\n break;\n\n case R.id.savecov_switch:\n ConfigLib.mouthDebug = isChecked;\n mSaveCov_switch.setChecked(ConfigLib.mouthDebug);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SC,ConfigLib.mouthDebug).commit();\n break;\n case R.id.similarity_filter_switch:\n ConfigLib.similarityFilter = isChecked;\n mSimilarityFilter_switch.setChecked(ConfigLib.similarityFilter);\n AttApp.sp.edit().putBoolean(AttConstants.PREFS_SIMILARITY_FILTER, ConfigLib.similarityFilter).commit();\n break;\n }\n }",
"private void enableAutosaveCheckboxItemStateChanged(java.awt.event.ItemEvent evt)\n {\n if (!autosave.isLoadingDialog())\n {\n enableDisableComponents();\n }\n }",
"private void removeListeners()\n {\n // Enable LDAP Checkbox\n removeDirtyListener( enableLdapCheckbox );\n removeSelectionListener( enableLdapCheckbox, enableLdapCheckboxListener );\n\n // LDAP Port Text\n removeDirtyListener( ldapPortText );\n removeModifyListener( ldapPortText, ldapPortTextListener );\n\n // LDAP Address Text\n removeDirtyListener( ldapAddressText );\n removeModifyListener( ldapAddressText, ldapAddressTextListener );\n\n // LDAP NbThreads Text\n removeDirtyListener( ldapNbThreadsText );\n removeModifyListener( ldapNbThreadsText, ldapNbThreadsTextListener );\n\n // LDAP BackLogSize Text\n removeDirtyListener( ldapBackLogSizeText );\n removeModifyListener( ldapBackLogSizeText, ldapBackLogSizeTextListener );\n\n // Enable LDAPS Checkbox\n removeDirtyListener( enableLdapsCheckbox );\n removeSelectionListener( enableLdapsCheckbox, enableLdapsCheckboxListener );\n\n // LDAPS Port Text\n removeDirtyListener( ldapsPortText );\n removeModifyListener( ldapsPortText, ldapsPortTextListener );\n\n // LDAPS Address Text\n removeDirtyListener( ldapsAddressText );\n removeModifyListener( ldapsAddressText, ldapsAddressTextListener );\n\n // LDAPS NbThreads Text\n removeDirtyListener( ldapsNbThreadsText );\n removeModifyListener( ldapsNbThreadsText, ldapsNbThreadsTextListener );\n\n // LDAPS BackLogSize Text\n removeDirtyListener( ldapsBackLogSizeText );\n removeModifyListener( ldapsBackLogSizeText, ldapsBackLogSizeTextListener );\n \n // Enable wantClientAuth Checkbox\n removeDirtyListener( wantClientAuthCheckbox );\n removeSelectionListener( wantClientAuthCheckbox, wantClientAuthListener );\n\n // Enable needClientAuth Checkbox\n removeDirtyListener( needClientAuthCheckbox );\n removeSelectionListener( needClientAuthCheckbox, needClientAuthListener );\n\n // Auth Mechanisms Simple Checkbox\n removeDirtyListener( authMechSimpleCheckbox );\n removeSelectionListener( authMechSimpleCheckbox, authMechSimpleCheckboxListener );\n\n // Auth Mechanisms CRAM-MD5 Checkbox\n removeDirtyListener( authMechCramMd5Checkbox );\n removeSelectionListener( authMechCramMd5Checkbox, authMechCramMd5CheckboxListener );\n\n // Auth Mechanisms DIGEST-MD5 Checkbox\n removeDirtyListener( authMechDigestMd5Checkbox );\n removeSelectionListener( authMechDigestMd5Checkbox, authMechDigestMd5CheckboxListener );\n\n // Auth Mechanisms GSSAPI Checkbox\n removeDirtyListener( authMechGssapiCheckbox );\n removeSelectionListener( authMechGssapiCheckbox, authMechGssapiCheckboxListener );\n\n // Auth Mechanisms NTLM Checkbox\n removeDirtyListener( authMechNtlmCheckbox );\n removeSelectionListener( authMechNtlmCheckbox, authMechNtlmCheckboxListener );\n removeModifyListener( authMechNtlmText, authMechNtlmTextListener );\n\n // Auth Mechanisms NTLM Text\n removeDirtyListener( authMechNtlmText );\n removeModifyListener( authMechNtlmText, authMechNtlmTextListener );\n\n // Auth Mechanisms GSS SPNEGO Checkbox\n removeDirtyListener( authMechGssSpnegoCheckbox );\n removeSelectionListener( authMechGssSpnegoCheckbox, authMechGssSpnegoCheckboxListener );\n removeModifyListener( authMechGssSpnegoText, authMechGssSpnegoTextListener );\n\n // Auth Mechanisms GSS SPNEGO Text\n removeDirtyListener( authMechGssSpnegoText );\n removeModifyListener( authMechGssSpnegoText, authMechGssSpnegoTextListener );\n\n // Keystore File Text\n removeDirtyListener( keystoreFileText );\n removeModifyListener( keystoreFileText, keystoreFileTextListener );\n\n // Keystore File Browse Button\n removeSelectionListener( keystoreFileBrowseButton, keystoreFileBrowseButtonSelectionListener );\n\n // Password Text\n removeDirtyListener( keystorePasswordText );\n removeModifyListener( keystorePasswordText, keystorePasswordTextListener );\n\n // Show Password Checkbox\n removeSelectionListener( showPasswordCheckbox, showPasswordCheckboxSelectionListener );\n\n // SASL Host Text\n removeDirtyListener( saslHostText );\n removeModifyListener( saslHostText, saslHostTextListener );\n\n // SASL Principal Text\n removeDirtyListener( saslPrincipalText );\n removeModifyListener( saslPrincipalText, saslPrincipalTextListener );\n\n // SASL Seach Base Dn Text\n removeDirtyListener( saslSearchBaseDnText );\n removeModifyListener( saslSearchBaseDnText, saslSearchBaseDnTextListener );\n \n // SASL Realms\n removeSelectionChangedListener( saslRealmsTableViewer, saslRealmsTableViewerSelectionChangedListener );\n removeDoubleClickListener( saslRealmsTableViewer, saslRealmsTableViewerDoubleClickListener );\n \n // SASL Realms add/edit/delete buttons\n removeSelectionListener( addSaslRealmsButton, addSaslRealmsButtonListener );\n removeSelectionListener( editSaslRealmsButton, editSaslRealmsButtonListener );\n removeSelectionListener( deleteSaslRealmsButton, deleteSaslRealmsButtonListener );\n \n // Max Time Limit Text\n removeDirtyListener( maxTimeLimitText );\n removeModifyListener( maxTimeLimitText, maxTimeLimitTextListener );\n\n // Max Size Limit Text\n removeDirtyListener( maxSizeLimitText );\n removeModifyListener( maxSizeLimitText, maxSizeLimitTextListener );\n\n // Max PDU Size Text\n removeDirtyListener( maxPduSizeText );\n removeModifyListener( maxPduSizeText, maxPduSizeTextListener );\n\n // Hashing Password Checkbox\n removeDirtyListener( enableServerSidePasswordHashingCheckbox );\n removeSelectionListener( enableServerSidePasswordHashingCheckbox,\n enableServerSidePasswordHashingCheckboxListener );\n\n // Hashing Method Combo Viewer\n removeDirtyListener( hashingMethodComboViewer );\n removeSelectionChangedListener( hashingMethodComboViewer, hashingMethodComboViewerListener );\n\n // Advanced SSL Cipher Suites\n ciphersSuiteTableViewer.removeCheckStateListener( ciphersSuiteTableViewerListener );\n\n // Advanced SSL Enabled Protocols SSL v3\n removeDirtyListener( sslv3Checkbox );\n removeSelectionListener( sslv3Checkbox, sslv3CheckboxListener );\n\n // Advanced SSL Enabled Protocols TLS v1\n removeDirtyListener( tlsv1_0Checkbox );\n removeSelectionListener( tlsv1_0Checkbox, tlsv1_0CheckboxListener );\n\n // Advanced SSL Enabled Protocols TLS v1.1\n removeDirtyListener( tlsv1_1Checkbox );\n removeSelectionListener( tlsv1_1Checkbox, tlsv1_1CheckboxListener );\n\n // Advanced SSL Enabled Protocols TLS v1.2\n removeDirtyListener( tlsv1_2Checkbox );\n removeSelectionListener( tlsv1_2Checkbox, tlsv1_2CheckboxListener );\n\n\n // Advanced SSL Enabled Protocols add/edit/delete buttons removal\n\n // Replication Pinger Sleep\n removeDirtyListener( replicationPingerSleepText );\n removeModifyListener( replicationPingerSleepText, replicationPingerSleepTextListener );\n\n // Disk Synchronization Delay\n removeDirtyListener( diskSynchronizationDelayText );\n removeModifyListener( diskSynchronizationDelayText, diskSynchronizationDelayTextListener );\n }",
"@Override\r\n\t\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\r\n\t\t\t\t\t\tboolean isChecked) {\n\t\t\t\t\tObject tag = check.getTag();\r\n\r\n\t\t\t\t\tif (isChecked) {\r\n\t\t\t\t\t\t// perform logic\r\n\t\t\t\t\t\tif (!(checkedpositions.contains(tag))) {\r\n\t\t\t\t\t\t\tcheckedpositions.add((Integer) tag);\r\n\t\t\t\t\t\t\tLog.d(\"Checkbox\", \"added \" + tag);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\tcheckedpositions.remove(tag);\r\n\t\t\t\t\t\tLog.d(\"Checkbox\", \"removed \" + (Integer) tag);\r\n\t\t\t\t\t}\r\n\t\t\t\t}",
"private void paintActionPerformed(final java.awt.event.ActionEvent evt) {\n\t\t\tpaintChecked = !paintChecked;\n\t\t}",
"public void onCheckBoxClicked(View view) {\n\n switch (view.getId()) {\n\n case R.id.checkbox_answer1:\n answer1Clicked = true;\n break;\n case R.id.checkbox_answer2:\n answer2Clicked = true;\n break;\n case R.id.checkbox_answer3:\n answer3Clicked = true;\n break;\n case R.id.checkbox_answer4:\n answer4Clicked = true;\n break;\n }\n\n }",
"void setCheckedOut(boolean checkedOut);",
"public void VerifyButtons(){\n if (currentTurn.getSiguiente() == null){\n next_turn.setEnabled(false);\n } else{\n next_turn.setEnabled(true);\n }\n if (currentTurn.getAnterior() == null){\n prev_turn.setEnabled(false);\n } else{\n prev_turn.setEnabled(true);\n }\n if (current.getSiguiente() == null){\n next_game.setEnabled(false);\n } else{\n next_game.setEnabled(true);\n }\n if (current.getAnterior() == null){\n prev_game.setEnabled(false);\n } else{\n prev_game.setEnabled(true);\n }\n }",
"@FXML\n protected void onCheckBoxSelect(){\n damping.setDisable(schwingungstyp.isSelected());\n dampingFunc.setDisable(schwingungstyp.isSelected());\n }",
"public interface CheckedListener {\n void onChecked(View v, boolean checked);\n}",
"public void actionPerformed(ActionEvent evt) {\n Object source = evt.getSource();\n\n if (source instanceof JCheckBoxMenuItem) {\n if ((JCheckBoxMenuItem) source == disableAll) {\n if (disableAll.isSelected()) {\n allocation.setSelected(false);\n remaining.setSelected(false);\n observability.setSelected(false);\n zoneOfAvoidance.setSelected(false);\n } else {\n allocation.setSelected(true);\n remaining.setSelected(true);\n observability.setSelected(true);\n zoneOfAvoidance.setSelected(true);\n }\n } else {\n disableAll.setSelected(false);\n }\n\n localQuerytool.setAllocationConstraint(!allocation.isSelected());\n localQuerytool.setRemainingConstraint(!remaining.isSelected());\n localQuerytool.setObservabilityConstraint(\n !observability.isSelected());\n localQuerytool.setZoneOfAvoidanceConstraint(\n !zoneOfAvoidance.isSelected());\n if (allocation.isSelected() && remaining.isSelected()\n && observability.isSelected()\n && zoneOfAvoidance.isSelected()) {\n // If all selected - set to green light\n URL url = ClassLoader.getSystemResource(\"green_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.WHITE);\n\n } else if (!allocation.isSelected() && !remaining.isSelected()\n && !observability.isSelected()\n && !zoneOfAvoidance.isSelected()) {\n // No constraints disabled - set to red\n URL url = ClassLoader.getSystemResource(\"red_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.RED.darker());\n\n } else {\n // Some constraints disabled - set to amber\n URL url = ClassLoader.getSystemResource(\"amber_light1.gif\");\n ImageIcon icon = new ImageIcon(url);\n InfoPanel.searchButton.setIcon(icon);\n table.setBackground(Color.YELLOW.darker());\n }\n } else if (source instanceof JMenuItem) {\n JMenuItem thisItem = (JMenuItem) source;\n String thisText = thisItem.getText();\n\n if (INDEX.equalsIgnoreCase(thisText)) {\n new HelpPage();\n\n } else if (ABOUT.equalsIgnoreCase(thisText)) {\n String version = System.getProperty(\"version\", \"unknown\");\n JOptionPane.showMessageDialog(null,\n \"Build corresponds to Git commit : \\n\" + version);\n\n } else if (RELOAD_CAL.equalsIgnoreCase(thisText)) {\n calibrationMenu.reload();\n\n } else if (EXIT.equalsIgnoreCase(thisText)) {\n exitQT();\n\n } else if (COLUMNS.equalsIgnoreCase(thisText)) {\n new ColumnSelector(this);\n\n } else if (LOG.equalsIgnoreCase(thisText)) {\n LogViewer viewer = new LogViewer();\n viewer.showLog(System.getProperty(\"QT_LOG_DIR\") + \"/QT.log\");\n\n } else if (INFRA_RED.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n\n } else if (WATER_VAPOUR.equalsIgnoreCase(thisText)) {\n infoPanel.getSatPanel().setDisplay(thisItem.getText());\n }\n } else if (source instanceof JButton) {\n JButton thisButton = (JButton) source;\n\n if (thisButton.getText().equals(EXIT)) {\n exitQT();\n } else {\n logger.debug(\"Popup send MSB\");\n performSendToStagingArea();\n }\n }\n }",
"private void eventoSemiSumergido(){\n s1.setChecked(false);\n s2.setChecked(true);\n s3.setChecked(false);\n esquema.setImageDrawable(getResources().getDrawable(R.drawable.np2));\n PosicionBarrasReactor.setPosicionActual(PosicionBarrasReactor.SEMI_SUMERGIDO);\n }",
"@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }",
"boolean isCheckedOut();",
"public void onCheckboxClicked(View view) {\n boolean aprendido = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch (view.getId()) {\n case R.id.checkboxAprendido:\n if (aprendido == true) {\n // Put some meat on the sandwich\n break;\n }\n }\n }",
"@Override\n public void itemStateChanged(ItemEvent e) {\n if(!(dataset == null) || !(KNN_dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n eigenCheck.setState(false);\n return;\n }\n method = 1;\n AFRCheck.setState(false);\n fisherCheck.setState(false);\n if(eigenCheck.getState() == false) method = 0;\n }",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.LED1:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED1 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED1 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED2:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED2 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED2 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED3:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED3 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED2 OFF\", Toast.LENGTH_SHORT).show();\n }\n case R.id.LED4:\n if (checked) {\n Toast.makeText(getApplicationContext(), \"LED4 ON\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(getApplicationContext(), \"LED4 OFF\", Toast.LENGTH_SHORT).show();\n }\n\n break;\n // TODO: Veggie sandwich\n }\n }",
"private void drawCheck(Graphics2D g2, Component c, boolean enabled, int x, int y, int w, int h)\r\n/* 201: */ {\r\n/* 202:235 */ g2.translate(x, y);\r\n/* 203:236 */ if (enabled)\r\n/* 204: */ {\r\n/* 205:237 */ g2.setColor(UIManager.getColor(\"RadioButton.check\"));\r\n/* 206:238 */ g2.fillOval(0, 0, w, h);\r\n/* 207:239 */ UIManager.getIcon(\"RadioButton.checkIcon\").paintIcon(c, g2, 0, 0);\r\n/* 208: */ }\r\n/* 209: */ else\r\n/* 210: */ {\r\n/* 211:241 */ g2.setColor(MetalLookAndFeel.getControlDisabled());\r\n/* 212:242 */ g2.fillOval(0, 0, w, h);\r\n/* 213: */ }\r\n/* 214:244 */ g2.translate(-x, -y);\r\n/* 215: */ }",
"@Override\n\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\tint id=buttonView.getId();\n\t\tRadioButton[] checbox=new RadioButton[3];\n \t\tchecbox[0]=less_thirty_check;\n \t\tchecbox[1]=thirty_fourty_check;\n \t\tchecbox[2]=great_fourty_check;\n \t\t\n \t\t\n \t\tRadioButton[] checkbox1=new RadioButton[3];\n \t\tcheckbox1[0]=health_check;\n \t\tcheckbox1[1]=diabetes_check;\n \t\tcheckbox1[2]=other_check;\n \t\t\n \t\t\n \t\tRadioButton[] checkbox2=new RadioButton[6];\n \t\tcheckbox2[0]=guy_check;\n \t\tcheckbox2[1]=dad_check;\n \t\tcheckbox2[2]=girl_check;\n \t\tcheckbox2[3]=mom_check;\n \t\tcheckbox2[4]=grandad_check;\n \t\tcheckbox2[5]=grand_ma;\n \t\t\n \t\t\n \t\tswitch (id) {\n \t\tcase R.id.less_thirty_check:\n \t\t\tif(isChecked){\n \t\t\t\n \t\t\t\tRadioButton check=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check, checbox);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase R.id.thirty_fourty_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check1=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check1, checbox);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.great_fourty_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check2=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check2, checbox);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.health_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check3=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check3, checkbox1);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.diabetes_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check4=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check4, checkbox1);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.other_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check5=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check5, checkbox1);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.guy_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check6=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check6, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.dad_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check7=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check7, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.girl_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check8=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check8, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.mom_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check9=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check9, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.grandad_check:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check10=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check10, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n \t\tcase R.id.grand_ma:\n \t\t\tif(isChecked){\n \t\t\t\tRadioButton check11=(RadioButton) findViewById(id);\n \t\t\tcheckCondition(check11, checkbox2);\n \t\t\t}\n \t\t\tbreak;\n\n\n \t\tdefault:\n// \t\t\tCheckBox check12=(CheckBox) findViewById(id);\n// \t\t\tcheckCondition(check12, this.check);\n \t\t\tbreak;\n \t\t}\n\t}",
"public void checkboxClickedSetDone(ActionEvent actionEvent) {\n // we will simply find the item within the group and use its setDone() method\n }",
"@Override\n public void itemStateChanged(ItemEvent e) {\n if(!(eigen == null) || !(dataset == null)) {\n JOptionPane.showMessageDialog(null, \"You have to erase dataset of current algorithm\", \"Dataset issue\", JOptionPane.WARNING_MESSAGE);\n AFRCheck.setState(false);\n return;\n }\n method = 2;\n eigenCheck.setState(false);\n fisherCheck.setState(false);\n if(AFRCheck.getState() == false) method = 0;\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView,\n boolean isChecked) {\n if(isChecked){\n //选中\n jumpFlag = 0;\n iv_choose_type.setImageDrawable(getResources().getDrawable(R.mipmap.login_switch_on));\n }else{\n //未选中\n jumpFlag = 1;\n iv_choose_type.setImageDrawable(getResources().getDrawable(R.mipmap.login_switch_off));\n }\n }",
"public void onCheckboxClicked(View view) {\n boolean checked = ((CheckBox) view).isChecked();\n\n // Check which checkbox was clicked\n switch(view.getId()) {\n case R.id.checkbox_termos:\n if (checked) {\n termosAceitos = true;\n }else {\n termosAceitos = false;\n }\n break;\n }\n }",
"private void setMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(true);\r\n checkShaffer.setEnabled(true);\r\n checkBergman.setEnabled(true);\r\n\r\n checkIman.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n }",
"private void switches() {\n finland.setChecked(true);\n chosenArea = \"Finland\";\n wholeWorld.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n europe.setChecked(false);\n nordic.setChecked(false);\n finland.setChecked(false);\n chosenArea = \"Whole world\";\n }\n }\n });\n europe.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n wholeWorld.setChecked(false);\n nordic.setChecked(false);\n finland.setChecked(false);\n chosenArea = \"Europe\";\n\n }\n }\n });\n nordic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n wholeWorld.setChecked(false);\n europe.setChecked(false);\n finland.setChecked(false);\n chosenArea = \"Nordic countries and Estonia\";\n }\n }\n });\n finland.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (isChecked) {\n wholeWorld.setChecked(false);\n europe.setChecked(false);\n nordic.setChecked(false);\n chosenArea = \"Finland\";\n }\n }\n });\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource().equals(one)){\n\t\t\tone.flaseEndable();\n\t\t\tthree.flaseEndable();\n\t\t}\n\t\telse if(e.getSource().equals(two)){\n\t\t\ttwo.flaseEndable();\n\t\t\tfour.flaseEndable();\n\t\t}\n\t\telse if(e.getSource().equals(three)){\n\t\t\tthree.flaseEndable();\n\t\t\tone.flaseEndable();\n\t\t}\n\t\telse if(e.getSource().equals(four)){\n\t\t\tfour.flaseEndable();\n\t\t\ttwo.flaseEndable();\n\t\t}\n\t\telse if(e.getSource().equals(all)){\n\t\t\tsubject.observerFalseEnable();\n\t\t}\n\t\telse if(e.getSource().equals(all_x)){\n\t\t\tsubject.observerTrueEnable();\t\n\t\t\t}\n\t}",
"@Override \r\n public void onCheckedChanged(CompoundButton buttonView, \r\n boolean isChecked) {\n if(isChecked){ \r\n Log.d(TAG, \"Selected\");\r\n }else{ \r\n Log.d(TAG, \"NO Selected\");\r\n } \r\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n GameWindow.this.remove(menuPanel);\n GameWindow.this.updateUI();\n checkBoolean = true;\n }",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n cakeModel.hasCandles = isChecked;\n cakeView.invalidate();\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tSystem.out.println(\"버튼을 눌렀구만?\");\r\n\t\t\r\n\t\tint jum =0;\r\n\t\t\r\n\t\tfor (JCheckBox box : qq_1) {\r\n\t\t\tif(box.isSelected())\r\n\t\t\t\tjum+=20;\r\n\t\t}\r\n\t\tif(qq_2.get(2).isSelected())\r\n\t\t\tjum+=20;\r\n\t\t\r\n\t\tres.setText(\"결과:\"+jum);\r\n\t}",
"@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\r\n\t}",
"public void checkInputs() {\n\n gearShift = driveStick.getXButtonReleased();\n slow = driveStick.getAButtonReleased();\n\n manualClimb = driveStick.getBumper(Hand.kLeft) && driveStick.getBumper(Hand.kRight);\n\n //climbToggle = driveStick.getBumperReleased(Hand.kLeft);\n climbToggle = false;\n climbRelease = driveStick.getStartButton();\n\n resetBalls = gunnerStick.getStartButtonReleased();\n visionShoot = gunnerStick.getBButtonReleased();\n manualShoot = gunnerStick.getYButton();\n distShoot = gunnerStick.getAButton();\n intakeToggle = gunnerStick.getBumperReleased(Hand.kRight);\n hoodToggle = gunnerStick.getBumperReleased(Hand.kLeft);\n intakeReverse = gunnerStick.getXButtonReleased();\n magazineReverse = gunnerStick.getBackButton();\n\n\n //Switch statement to determine controls for the driver\n switch (driverScheme) {\n case \"Reverse Turning\":\n XSpeed = -driveStick.getY(Hand.kLeft);\n ZRotation = driveStick.getX(Hand.kRight);\n break;\n default:\n XSpeed = driveStick.getY(Hand.kLeft);\n ZRotation = -driveStick.getX(Hand.kRight);\n break;\n }\n\n //Switch statement to determine controls for the gunner\n switch (gunnerScheme) {\n case \"Fun Mode\":\n\n discoToggle = gunnerStick.getBackButtonReleased();\n break;\n\n default:\n\n // if ((gunnerStick.getTriggerAxis(Hand.kRight) >= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) >= 0.75) && !overriding) {\n // overrideSafeties = !overrideSafeties;\n // overriding = true;\n // } else if ((gunnerStick.getTriggerAxis(Hand.kRight) <= 0.75) && (gunnerStick.getTriggerAxis(Hand.kLeft) <= 0.75)) {\n // overriding = false;\n // }\n\n break;\n }\n }",
"public Vector<Integer> getCheckList(){\n\t\treturn this._eventCheckList;\n\t}"
] | [
"0.67802715",
"0.64347744",
"0.63776755",
"0.6311698",
"0.6301422",
"0.62122536",
"0.62050354",
"0.6158954",
"0.6039581",
"0.5982928",
"0.59455377",
"0.587044",
"0.58432925",
"0.58392256",
"0.57746094",
"0.5761375",
"0.57549375",
"0.5750646",
"0.5741406",
"0.5729421",
"0.572696",
"0.57269025",
"0.57172537",
"0.57076514",
"0.5697862",
"0.56876504",
"0.5656673",
"0.5650537",
"0.56387454",
"0.5633008",
"0.5630366",
"0.5618364",
"0.5610686",
"0.56106055",
"0.56066954",
"0.56066954",
"0.5599841",
"0.5592837",
"0.5590768",
"0.55862373",
"0.5581324",
"0.5580481",
"0.55722404",
"0.5562641",
"0.5561016",
"0.5554874",
"0.5540715",
"0.55309415",
"0.55294925",
"0.5529186",
"0.5524746",
"0.55230534",
"0.55178523",
"0.55141324",
"0.5513435",
"0.5510897",
"0.550663",
"0.5492667",
"0.5491374",
"0.5489927",
"0.5487104",
"0.5481791",
"0.5476246",
"0.54716337",
"0.5466712",
"0.5466361",
"0.5464439",
"0.5456465",
"0.54553807",
"0.5447614",
"0.5445654",
"0.54448867",
"0.5443655",
"0.5438838",
"0.5437696",
"0.542893",
"0.54273635",
"0.54177326",
"0.5417012",
"0.54019773",
"0.5396617",
"0.53963405",
"0.5394426",
"0.53866154",
"0.53804517",
"0.53773904",
"0.5374901",
"0.5374025",
"0.53667206",
"0.5366588",
"0.53616893",
"0.53616405",
"0.5359881",
"0.5359709",
"0.535934",
"0.5353933",
"0.53520495",
"0.53496754",
"0.53476375",
"0.5342157"
] | 0.58142334 | 14 |
add assertion to the length of the user name at xamarin!! | public static int register(String username, String password, int avatarNum){
try {
Statement st = conn.createStatement();
ResultSet largestId = st.executeQuery("select max(userid) from users");
largestId.next();
int thisId = Integer.parseInt(largestId.getString(1))+1;
String encryptedPwd = encrypt(password);
String insertUserCommand = String.format("INSERT INTO users(userid, username, password, avatarnum) VALUES(%d, '{%s}','{%s}',%d)",thisId,username,encryptedPwd,avatarNum);
st.executeUpdate(insertUserCommand);
largestId.close();
st.close();
return thisId;
}catch (SQLException e){
return SERVER_FAILURE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void validationUsername( String name ) throws Exception {\n\t\t\t if ( name != null && name.trim().length() < 3 ) {\n\t\t\t throw new Exception( \"Le nom d'utilisateur doit contenir au moins 3 caractères.\" );\n\t\t\t }\n\t\t\t}",
"public void setUsername(java.lang.CharSequence value) {\n this.username = value;\n }",
"public static void printUsername() {\n\t\tSystem.out.println(\"Enter the username\");\n\t\tString username = Utility.SCANNER.nextLine();\n\t\tint length = username.length();\n\t\tif(length > 3) {\n\t\t\tSystem.out.println(\"Hello \"+username+\", How are you?\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Invalid username\");\n\t\t}\n\t}",
"@Override\n public void displayInvalidUser() {\n Toast.makeText(this, \"Username cannot be blank or contain $\", Toast.LENGTH_LONG).show();\n }",
"protected String loginIdentifyString() {\r\n return \"hao\";\r\n }",
"private String getUserName() {\n EditText nameEditText = (EditText) findViewById(R.id.name_edit_text);\n return nameEditText.getText().toString().trim();\n }",
"@Test(expected = AppException.class)\n public void testCreateLoginLess3Chars() {\n User user = new User(\"lg\", \"[email protected]\", \"Login Name\", \n \"12345678\");\n userService.create(user);\n }",
"public void testvalidateUserName0003()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"username test greater than\"));\n\t}",
"@Test\n public void testInvalidUsernameLessThan4Characters() {\n username = username.substring(0, 3);\n assert username.length() <= 3;\n registerUser(username, password);\n assertNull(userService.getUser(username));\n }",
"public void validateUserName(String name) {\n\t\ttry {\n\t\t\tAssert.assertTrue(userName.getText().equalsIgnoreCase(\"Hi \"+name),\"Username is correctly displayed\");\n\t\t\tLog.addMessage(\"Username correctly displayed\");\n\t\t}catch(Exception e) {\n\t\t\tLog.addMessage(\"Validation of User Login is failed\");\n\t\t\tLog.addMessage(e.getMessage().toString());\n\t\t\tAssert.assertTrue(false, \"Failed to validate User Login\");\n\t\t}\n\t}",
"@Test\n public void testInvalidUserName() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(INVALID_USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n\n }",
"@Test\r\n public void usernameText() {\r\n onView(withId(R.id.edUserReg)).perform(typeText(\"Jade\"));\r\n }",
"@Override\n\t\t\t\t\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\t\t\t\t\tif(!hasFocus){\n\t\t\t\t\t\t\tif(register_username.getText().toString().trim().length()<4){\n\t\t\t\t\t\t\t\tToast.makeText(RegisteredActivity.this, \"用户名不能小于4个字符\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"public String getUserNameExample()\n {\n return null;\n }",
"String getUserUsername();",
"private Boolean isValidUsername(String username){\n return (username != null) && (username.length() >= 5 && username.length() <= 16);\n }",
"@When(\"^user should enter the valid username in the loginpage$\")\n\tpublic void user_should_enter_the_valid_username_in_the_loginpage() throws Throwable {\n\t inputValuestoElement(pa.getAp().getUsernamedisplay(), \"Srini1010\");\n\t}",
"@AutoEscape\n\tpublic String getUser_name();",
"public static String createUsername() {\r\n\t\tboolean complete = false;\r\n\t\tString username = \"\";\r\n\t\t\r\n\t\twhile(complete == false) {\r\n\t\t\tSystem.out.println(\"Please type a username (no spaces):\");\r\n\t\t\tusername = scan.nextLine();\r\n\t\t\t//us.checkExit(username);\r\n\t\t\t\r\n\t\t\tif(us.checkUniqueUsername(username) == false) {\r\n\t\t\t\tSystem.out.println(\"Username is taken, try again, partner.\");\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if(username.contains(\" \")) {\r\n\t\t\t\tSystem.out.println(\"Invalid username - contains space(s)\");\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tcomplete = true;\r\n\t\t}//While1\r\n\t\t\r\n\t\treturn username;\r\n\t}",
"public static String checkUsername(String in) {\n\t\tif (in.isEmpty())\r\n\t\t\treturn \"Username is empty\";\r\n\t\telse {\r\n\t\t\tPattern passPat = Pattern.compile(\"\\\\w*\");\r\n\t\t\tMatcher matchpass = passPat.matcher(in);\r\n\t\t\tif (!matchpass.matches()) {\r\n\t\t\t\treturn \"The username must only contain character and numeric\";\r\n\t\t\t} else\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t}",
"protected void validateJitterUsername(final String username) {\n Assert.notNull(username, VALUE_NOT_NULL);\n Assert.isTrue((username.length() >= VALIDATION_USERNAME_SIZE_MIN) &&\n (username.length() <= VALIDATION_USERNAME_SIZE_MAX), VALIDATE_NOTE_USERNAME_SIZE);\n }",
"String getUserName();",
"String getUserName();",
"String usernameLabel();",
"public boolean firstNameTwoCharactersLong(String fName){\n boolean message = true;\n //If(firstnameLength is < 2) print to error + \"first name must be atleast 2 characters\"\n if(fName.length() < 2){\n errorMessage = errorMessage + \"The first name must be at least 2 characters long.\\n\";\n //Then make False and return\n message = false;\n }\n return message;\n\n }",
"private void createUITextUserName(Composite parent, double widthPre) {\n\t\tComposite composite = new Composite(parent, SWT.NONE);\r\n\t\tGridData data = new GridData(SWT.FILL, SWT.FILL, true, true);\r\n\t\tdata.minimumWidth = (int) (parent.getBounds().width * widthPre);\r\n\t\tcomposite.setLayoutData(data);\r\n\t\tfTextUsername = new Text(composite, SWT.BORDER | SWT.LEAD);\r\n\t\tRowData rowData = new RowData();\r\n\t\trowData.width = (int) (data.minimumWidth * 0.8);\r\n\t\tfTextUsername.setLayoutData(rowData);\r\n\t\tfTextUsername.setTextLimit(10);\r\n\t\tcomposite.setLayout(new RowLayout());\r\n\t\tcomposite.setBackground(new Color(loginShell.getDisplay(), 255, 255, 240));\r\n\t}",
"private void validationUsername( String username ) throws Exception {\n\n if ( username.length() < 4 ) {\n throw new Exception( \"Longueur du nom d'utilisateur invalide.\" );\n }\n if ( username == null ) {\n throw new Exception( \"Merci de saisir un nom d'utilisateur valide.\" );\n }\n }",
"public String setUserName(){\n String userName = \"\";\n while(userName.isBlank()) {\n System.out.print(\"Please Enter UserName: \");\n userName = supplyString.get();\n }\n return userName.trim();\n }",
"private static Boolean testUsername(String username){\n\t\t//Setting Up Regex -> All Numbers and Letters maximum 14 signs\n\t\tString pattern =\"[A-z1-9]{2,14}\";\n\t\tPattern p = Pattern.compile(pattern);\n\t\tMatcher m = p.matcher(username);\n\t\t\t\n\t\tif(m.matches() && !username.isEmpty()){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Test\n public void testFirstNameMaxLength()\n {\n String invalid = repeatM(21);\n owner.setFirstName(invalid);\n assertInvalid(owner, \"firstName\", \"First name must be between 2 and 20 characters\", invalid);\n }",
"@Test\n public void wrongUsername(){\n solo .sleep (1000);\n solo.assertCurrentActivity(\"Wrong activity\", UserProfileActivity.class);\n TextView view = null ;\n\n String correctUsername = firebaseAuth.getCurrentUser().getDisplayName();\n view = (TextView) solo .getView ( \"user_name\" );\n assertEquals ( correctUsername , view.getText());\n }",
"private void getUserName() {\n if (mAuth.getCurrentUser() != null) {\n nameOfCurrentUser = mAuth.getCurrentUser().getDisplayName();\n Log.d(TAG, \"getUserName: getDisplayName is not null\");\n if (nameOfCurrentUser != null && nameOfCurrentUser.contains(\" \")) {\n String[] nameArray = nameOfCurrentUser.split(\" \");\n personalWelcomeMessage.setText(\"Hello, \" + nameArray[0]);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser != null && !nameOfCurrentUser.contains(\" \")) {\n personalWelcomeMessage.setText(\"Hello, \" + nameOfCurrentUser);\n Log.d(TAG, \"Name is: \" + personalWelcomeMessage.getText().toString());\n }\n else if (nameOfCurrentUser==null){\n personalWelcomeMessage.setText(\"Hello\");\n }\n }\n }",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {\n\t\t\t\tu.setUsername(s.toString());\n\t\t\t\n\t\t\t}",
"@Override\n public String getUsername() {\n String username = mTxtUsername.getText().toString().trim()\n .toLowerCase(Locale.getDefault());\n checkUsername(username);\n return username;\n }",
"@Test\n public void testLastNameMaxLength()\n {\n String invalid = repeatM(31);\n owner.setLastName(invalid);\n assertInvalid(owner, \"lastName\", \"Last name must be between 2 and 30 characters\", invalid);\n }",
"public String validateUser(String un) {\n\t\tUser checkForUser = userDao.findByUsername(un);\n\t\tif (checkForUser != null) {\t\t\t\t\t//user exists\n\t\t\treturn \"That username already exists\";\n\t\t}\n\t\telse {\n\t\t\t//validate username\n\t\t\tif(!User.isValidUsername(un)) {\n\t\t\t\treturn \"Username must be between 5 and 11 characters and contain 1 alpha\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private static String padActorName(String name) {\n\t\tif(name.length() >= 29) {\n\t\t\tname = name.substring(0, 25);\n\t\t\tname += \"...\";\n\t\t}\n\t\twhile(name.length() != 28) {\n\t\t\tname += \" \";\n\t\t}\n\t\treturn name;\n\t}",
"@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tif (s == null || s.length() <= 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString temp = s.toString();\n\t\t\t\tString tem = temp.substring(temp.length() - 1, temp.length());\n\t\t\t\tchar[] temC = tem.toCharArray();\n\t\t\t\tint mid = temC[0];\n\t\t\t\tif (mid >= 65 && mid <= 90) {// 大写字母\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (mid >= 97 && mid <= 122) {// 小写字母\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (String.valueOf((char) mid).equals(\"_\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tToast.makeText(mActivity, mActivity.getResources().getString(R.string.name_not_invalid), Toast.LENGTH_SHORT).show();\n\t\t\t\ts.delete(temp.length() - 1, temp.length());\n\n\t\t\t\tif (temp.length() > 6) {\n\t\t\t\t\tToast.makeText(mActivity, \"用户名不能超过六位\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\ts.delete(5, temp.length());\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}",
"@Test\n public void testInvalidUsernameGreaterThan15Characters() {\n username = UUID.randomUUID().toString();\n assert username.length() >= 16;\n registerUser(username, password);\n assertNull(userService.getUser(username));\n }",
"public String printNewUsernamePrompt() {\n return \"Please enter new username: \";\n }",
"public String valiationOfUsernameField()\n\t{\n\t\twaitForVisibility(validationUsername);\n\t\treturn validationUsername.getText();\n\t}",
"java.lang.String getUser();",
"public boolean checkUsername(String user) {\n\n }",
"private String checkName(String name){\n\n if(name.isBlank()){\n name = \"guest\";\n }\n int i = 1;\n if(users.contains(name)) {\n while (users.contains(name + i)) {\n i++;\n }\n name+=i;\n }\n return name;\n }",
"@Test\n public void GIncorrectNameFormat () {\n onView(withId(R.id.username)).check(matches(isDisplayed()));\n //change name to wrong format\n onView(withId(R.id.username)).perform(replaceText(\"34&\"));\n //click the button\n onView(withId(R.id.save)).perform(click());\n // check toast visibility\n onView(withText(R.string.NotCorrectName))\n .inRoot(new ToastMatcher())\n .check(matches(withText(R.string.NotCorrectName)));\n //check activity still shown\n assertFalse(activityTestRule.getActivity().isFinishing());\n }",
"@Test\n\t void testLastName() {\n\t\tString expected=\"Faizan\";\n\t\tString actual=user.getLastName();\n\t\tassertEquals(expected, actual);\n\t}",
"private String pad(String userId){\n final Integer MAX_LENGTH = 20;\n Integer length = userId.length();\n\n if (length == MAX_LENGTH) {\n return userId;\n }\n\n return String.format(\"%20s\", userId);\n }",
"private String extractUsername() {\n return SwingUtil.extract(usernameJTextField, Boolean.TRUE);\n }",
"@Test\r\n\tpublic void testNameValid() {\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"JANE\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"John\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Mary\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\" Kurisu\"));\r\n\t\tassertTrue(Activity5Query.isNameCorrect(\"Bond \"));\r\n\t}",
"public void testvalidateUserName0002()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertTrue( loginCheckTest.validateUserName(\"username test\"));\n\t}",
"private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = (this.firstName + this.lastName).toLowerCase();\n\t\t} else {\n\t\t\tthis.userName = this.firstName.toLowerCase();\n\t\t}\n\t}",
"@Override\n\tpublic void validateUserName(String name) throws UserException {\n\t\t\n\t}",
"public java.lang.CharSequence getUsername() {\n return username;\n }",
"public void setUser_name(String user_name);",
"@Test\n\tpublic void testCreateAdminAccountWithSpacesInUsername() {\n\t\tString username = \"This is a bad username\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, PASSWORD1, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Username cannot contain spaces.\", error);\n\t}",
"@Test\n void returnsTrueIfOnlyLetters() {\n Assertions.assertTrue(new UserValidator().isValidUsername(null));\n }",
"private String getPasswordFor(String name) {\n return new StringBuilder().append(PASSWORD_FOR).append(\" '\").append(name).append(\"': \").toString();\n }",
"@Override\n\tpublic int validateUsername(User u) {\n\t\treturn 0;\n\t}",
"public void verifyNickname (View view){\n EditText nicknameInput = findViewById(R.id.inscr_nickname_input);\n String nickname = nicknameInput.getText().toString();\n\n\n verifyDatabaseNickname(nickname);\n }",
"@When(\"^Enter username as \\\"([^\\\"]*)\\\"$\")\n\tpublic void enter_username_as(String arg1) throws Throwable {\n\t\tuserName = arg1;\n\t}",
"public void testvalidateUserName0001()\n\t{\n\t\tLoginCheck loginCheckTest = new LoginCheck();\n\t\t\n\t\tassertFalse(loginCheckTest.validateUserName(\"usrnm\"));\n\t}",
"@Test\n public void testPasswordMinLength()\n {\n String invalid = repeatM(7);\n owner.setPassword(invalid);\n assertInvalid(owner, \"password\", \"Password must be at least 8 characters in length\", invalid);\n }",
"private void validate(String name) {\r\n /*\r\n Check to make sure that name is not blank and as a size of at least three characters and does not contain any spaces\r\n constant for min username chars.\r\n */\r\n final int MIN_USERNAME_CHARS = 3;\r\n if (name.isEmpty() || name.length() < MIN_USERNAME_CHARS || name.contains(\" \")) {\r\n // if so, show error message box\r\n showError(\"You must have a name at least \" + MIN_USERNAME_CHARS + \" characters long and have no spaces.\", \"Error\");\r\n } else {\r\n // set the host name\r\n Preferences.getInstance().setHostName(name);\r\n Preferences.getInstance().save();\r\n // close the window\r\n close();\r\n }\r\n }",
"@Test\n public void testLastNameMinLength()\n {\n owner.setLastName(\"L\");\n assertInvalid(owner, \"lastName\", \"Last name must be between 2 and 30 characters\", \"L\");\n }",
"public void typeUserName(String text) {\n txtUserName().typeText(text);\n }",
"private String lookupPassword(String user) {\n\treturn \"happy8\";\r\n\t}",
"public boolean validateUserName(String name)\n\t{\n\t\tif (username.getText().length() < MIN_USERNAME_LENGTH)\n\t\t{\n\t\t\tsetWarning(\"username too short\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!name.matches(\"^[a-zA-Z0-9]*$\"))\n\t\t{\n\t\t\tsetWarning(\"invalid username\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"@Test\n public void testValidUserNamePassword() {\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_edit_text\"))\n .setText(USERNAME_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_edit_text\"))\n .setText(PASSWORD_TO_BE_TYPED);\n mDevice.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"login_button\"))\n .click();\n UiObject2 welcomeText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"welcome_text_view\")),\n 500 /* wait 500ms */);\n assertThat(welcomeText.getText(), is(equalTo(WELCOME)));\n\n UiObject2 usernameText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"username_value\")),\n 500 /* wait 500ms */);\n assertThat(usernameText.getText(), is(equalTo(USERNAME_TO_BE_TYPED)));\n\n UiObject2 passwordText = mDevice\n .wait(Until.findObject(By.res(BASIC_SAMPLE_PACKAGE, \"password_value\")),\n 500 /* wait 500ms */);\n assertThat(passwordText.getText(), is(equalTo(PASSWORD_TO_BE_TYPED)));\n\n }",
"@When(\"^The user enter the username$\")\n\tpublic void the_user_enter_the_username() throws Throwable {\n\t\t\n\t lpw.username_textbox();\n\t}",
"public static boolean isUsernameValid(String username) {\n if (username.length() > 50) { \n return false;\n } else { \n char c;\n int count = 1; \n for (int i = 0; i < username.length(); i++) {\n c = username.charAt(i);\n if (!Character.isLetterOrDigit(c)) { \n return false;\n }\n // If the character is a space\n else if (c == ' '){ \n return false;\n }\n else if (Character.isDigit(c)) {\n count++;\n if (count > 6) { \n return false;\n } \n }\n }\n }\n return true;\n }",
"public String getUsername()\r\n/* 11: */ {\r\n/* 12:30 */ return this.username;\r\n/* 13: */ }",
"@Test\n public void testPasswordGreaterThan7Characters() {\n password = \"123456a\";\n assert password.length() <= 7;\n registerUser(username, password);\n assertNull(userService.getUser(username));\n }",
"public java.lang.CharSequence getUsername() {\n return username;\n }",
"private boolean isValidUsername(EditText edtDisplayName) {\n boolean isValid = edtDisplayName.getText().length() != 0;\n\n if (!isValid) {\n edtDisplayName.setError(getString(R.string.required_field));\n }\n\n return isValid;\n }",
"public String getUserName() {\n\t\treturn phoneText.getText().toString();\n\t}",
"public String setLogIn_Wrong_UserName(){\n\t\treturn ObjLogInPage.getError_Wrong_UserName().getText();\n\t}",
"@Test(expected = AppException.class)\n public void testCreatePasswordLess8Chars() {\n User user = new User(\"login\", \"[email protected]\", \"Login Name\", \n \"123456\");\n userService.create(user);\n }",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"@Test\n public void testPasswordHasNumbersAndLetters() {\n registerUser(username, \"123456789\");\n assertNull(userService.getUser(username));\n }",
"public static String generateRandomUsername() {\n final String randomFirst = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomSecond = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n final String randomThird = Long.toHexString(Double.doubleToLongBits(Math\n .random()));\n String userName = randomFirst + randomSecond + randomThird;\n\n userName = userName.substring(0, 10) + \"@ngetestmail.com\";\n\n return userName;\n }",
"String getUser();",
"String getUser();",
"private String createUser(String name) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void testCreateAdminAccountWithSpacesInPassword() {\n\t\tString username = \"Catherine\";\n\t\tString password = \"this is a bad password\";\n\t\tString error = null;\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.createAdminAccount(username, password, NAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\terror = e.getMessage();\n\t\t}\n\n\t\tassertNull(user);\n\t\t// check error\n\t\tassertEquals(\"Password cannot contain spaces.\", error);\n\t}"
] | [
"0.68479496",
"0.65809244",
"0.6534231",
"0.6424646",
"0.64090526",
"0.63784945",
"0.6355014",
"0.635222",
"0.63430417",
"0.6342142",
"0.62634194",
"0.62438244",
"0.6222002",
"0.6214149",
"0.6214149",
"0.6214149",
"0.6181546",
"0.6174184",
"0.61534345",
"0.6143181",
"0.6136081",
"0.6133121",
"0.6126967",
"0.61006206",
"0.609629",
"0.609629",
"0.6089815",
"0.60797596",
"0.6078636",
"0.60731995",
"0.60701025",
"0.6063447",
"0.6049371",
"0.60446113",
"0.60439986",
"0.6041154",
"0.6041154",
"0.6041154",
"0.6041154",
"0.6041154",
"0.6041154",
"0.6041154",
"0.6041154",
"0.6041154",
"0.60312784",
"0.6026702",
"0.6020836",
"0.6015541",
"0.60126865",
"0.6006885",
"0.59901994",
"0.5977154",
"0.59702206",
"0.5966102",
"0.5941442",
"0.5938204",
"0.5936676",
"0.59353316",
"0.59206307",
"0.591999",
"0.59149224",
"0.5911657",
"0.59101784",
"0.590978",
"0.59086144",
"0.59038806",
"0.5901546",
"0.5892739",
"0.5882327",
"0.58652353",
"0.58579224",
"0.5844705",
"0.5841893",
"0.58401966",
"0.58381224",
"0.5835782",
"0.58328307",
"0.58256704",
"0.5823859",
"0.58188176",
"0.5792568",
"0.57838076",
"0.5780728",
"0.577637",
"0.5771057",
"0.5748215",
"0.574528",
"0.57412404",
"0.5741056",
"0.57401246",
"0.57401246",
"0.57401246",
"0.57401246",
"0.57401246",
"0.57401246",
"0.57365996",
"0.5733809",
"0.5730874",
"0.5730874",
"0.5712018",
"0.5710733"
] | 0.0 | -1 |
TODO duplicates not handled | public static int friendRequest(int senderid, int friendid){
try {
Statement st = conn.createStatement();
String sqlString = String.format("UPDATE users SET friendreq = friendreq || '{%d}' WHERE userid = %d", senderid, friendid);
int rowAffected = st.executeUpdate(sqlString);
System.out.println("affected " + rowAffected +"rows");
st.close();
return SUCCESS;
}catch (SQLException e){
return SERVER_FAILURE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}",
"public Multimap<String, Command> checkForDuplicateNames() {\r\n\t\tList<Command> allCommands = new ArrayList<>();\r\n\t\tallCommands.addAll(this.commands);\r\n\t\tallCommands.addAll(learnedCommands.getCommands());\r\n\r\n\t\tMultimap<String, Command> byName = ArrayListMultimap.create();\r\n\t\tfor (Command command : allCommands) {\r\n\t\t\tbyName.put(command.name().toLowerCase(), command);\r\n\t\t\tfor (String alias : command.aliases()) {\r\n\t\t\t\tbyName.put(alias.toLowerCase(), command);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMultimap<String, Command> duplicates = ArrayListMultimap.create();\r\n\r\n\t\tbyName.asMap().entrySet().stream() //@formatter:off\r\n\t\t\t.filter(entry -> entry.getValue().size() > 1)\r\n\t\t.forEach(entry -> duplicates.putAll(entry.getKey(), entry.getValue())); //@formatter:on\r\n\r\n\t\treturn duplicates;\r\n\t}",
"@Override\n public int hashCode() {\n return 1;\n }",
"protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }",
"@Override\n protected int getNumRepetitions() {\n return 1;\n }",
"void scanunique() {\n\t\tint oldline, newline;\n\t\tnode psymbol;\n\n\t\tfor (newline = 1; newline <= newinfo.maxLine; newline++) {\n\t\t\tpsymbol = newinfo.symbol[newline];\n\t\t\tif (psymbol.symbolIsUnique()) { // 1 use in each file\n\t\t\t\toldline = psymbol.linenum;\n\t\t\t\tnewinfo.other[newline] = oldline; // record 1-1 map\n\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t}\n\t\t}\n\t\tnewinfo.other[0] = 0;\n\t\toldinfo.other[0] = 0;\n\t\tnewinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1;\n\t\toldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1;\n\t}",
"public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }",
"static SparseArray<TaskDetail> getCurrentMappingsDuplicated() {\n SparseArray<TaskDetail> toReturn = new SparseArray<>();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n toReturn.put(TaskDetail.actionToTask.keyAt(i), detail.duplicate());\n }\n return toReturn;\n }",
"private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}",
"private void compareFirstPass() {\n this.oldFileNoMatch = new HashMap<String, SubsetElement>();\r\n Iterator<String> iter = this.oldFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.newFile.containsKey(key)) {\r\n final String newKey = this.oldFile.get(key).getSubsetCode()\r\n + this.oldFile.get(key).getConceptCode();\r\n this.oldFileNoMatch.put(newKey, this.oldFile.get(key));\r\n }\r\n }\r\n\r\n // Now repeat going the other way, pulling all new file no matches into\r\n // newFileNoMatch\r\n this.newFileNoMatch = new HashMap<String, SubsetElement>();\r\n iter = this.newFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.oldFile.containsKey(key)) {\r\n final String newKey = this.newFile.get(key).getSubsetCode()\r\n + this.newFile.get(key).getConceptCode();\r\n this.newFileNoMatch.put(newKey, this.newFile.get(key));\r\n }\r\n }\r\n\r\n // dump the initial large HashMaps to reclaim some memory\r\n this.oldFile = null;\r\n this.newFile = null;\r\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}",
"public void dxSingleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXSingleSpeeds in the output\n // file.\n\n // concatenate the recorded DXSingleSpeeds in a string\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXSingleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXSingleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }",
"protected void paramDuplicate(){\n List<StatementParse> parameters = this.node.getChildren().get(0).getChildren();\n for (StatementParse x: parameters){\n int count = 0;\n for (StatementParse y: parameters){\n if (x.getName().equals(y.getName())){\n count++;\n }\n }\n if (count > 1) throw new DuplicateParam();\n }\n }",
"@Test\n public void testRemoveDuplicates() {\n System.out.println(\"removeDuplicates\");\n ArrayList<String> array = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"C.EXAMPLE.COM,1.1.1.3,no,12.1,\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"c.example.com,1.1.1.5,no,12,Case a bit loose\",\n \"e.example.com,1.1.1.6,no,12.3,\",\n \"f.example.com,1.1.1.7,No,12.200,\",\n \"g.example.com,1.1.1.6,no,15.0,Guarded by sharks with lasers on their heads\"\n ));\n ArrayList<String> expResult = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"f.example.com,1.1.1.7,No,12.200,\"\n ));\n ArrayList<String> result = BTRouterPatch.removeDuplicates(array);\n assertEquals(expResult, result);\n }",
"void setDupOfSeqObj(List<SeqInfo> seqObjList) {\n\t\tboolean desc=false;\n\t\tCollections.sort(seqObjList, new SeqInfo.CompSeqEncode(desc));\n\t\t//System.out.println(\"Sorted reads: \"+seqObjList.size());\n\t\t//timeStamp=new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t//System.out.println(\"time: \"+timeStamp);\n\t \n\t\tSeqInfo seqObj;\n\t\tSeqInfo seqObj_r0 = null;\n\t\tSeqInfo currSeqObj;\n\t\tSeqInfo currSeqObj2; \n\t List<SeqInfo> querySeqObjList; \n\t\t\n\t int i=0; \n\t int r=0;\n\t //int m=1;\n\t\tfor(int s=0;s<seqObjList.size();s++){\n\t\t currSeqObj=seqObjList.get(s);\t\n\t\t if(!currSeqObj.isDup && currSeqObj.dupNum<0){\n\t\t\t /*\n\t\t\t if((s+1)/500000==m) {\n\t\t\t\ttimeStamp=new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t\t\tSystem.out.println((s+1)+\" time: \"+timeStamp);\n\t\t\t\tm++;\n\t\t\t }\t\n\t\t\t */\n\t\t\t querySeqObjList=SeqOperation.findSeqObjOfSameEncode(seqObjList,currSeqObj);\n\t\t\t if(querySeqObjList.size()==1) {\n\t\t\t\tcurrSeqObj.isDup=false;\n\t\t\t\tcurrSeqObj.dupNum=0; \n\t\t\t }else if(querySeqObjList.size()>1){\n\t\t\t currSeqObj2=currSeqObj;\n\t\t\t while(currSeqObj2!=null){\t\t \n\t\t\t currSeqObj2=null;\n\t\t\t\t r=0;\n\t\t\t\t i=0;\n\t\t\t\t while(i<querySeqObjList.size()) {\t\n\t\t\t\t seqObj=querySeqObjList.get(i);\t\t \n\t\t\t\t if(seqObj.seq.equalsIgnoreCase(currSeqObj.seq)){\t\t\t\t\n\t\t\t\t\t if(r==0) { \t\t\t\n\t\t\t\t\t seqObj_r0=seqObj;\n\t\t\t\t\t seqObj_r0.isDup=false;\n\t\t\t\t\t }if(r>0) {\t\t\t\t \n\t\t\t\t\t seqObj.isDup=true;\n\t\t\t\t\t seqObj.dupNum=r;\t\n\t\t\t\t\t }\n\t\t\t\t\t seqObj_r0.dupNum=r;\n\t\t\t\t\t querySeqObjList.remove(seqObj);\n\t\t\t\t\t r++;\n\t\t\t\t }else{\n\t\t\t\t\t currSeqObj2=seqObj;\t\n\t\t\t\t\t i++;\t\t\n\t\t\t\t } \t\t \n\t\t\t\t }// while query\n\t\t\t\t if(currSeqObj2!=null) currSeqObj=currSeqObj2;\n\t\t\t }\n\t\t\t }\n\t\t\t querySeqObjList=null;\t \n\t\t }\t \n\t\t}\n\t\t\n\t Collections.sort(seqObjList, new SeqInfo.CompSeqID(desc));\t\n }",
"private Map<ImmutableTriple<String, Long, String>, LocalDateTime> getAllCreatedDateFromSource(\n List<SubmittedVariantEntity> duplicateSves) {\n Map<ImmutableTriple<String, Long, String>, LocalDateTime> targetToSourceCreatedDate = duplicateSves\n .stream().collect(Collectors.toMap(this::getKeyForCreatedDate,\n SubmittedVariantEntity::getCreatedDate,\n (cd1, cd2) -> Collections.min(Arrays.asList(cd1, cd2))));\n\n Map<String, List<SubmittedVariantEntity>> svesBySourceAssembly = duplicateSves\n .stream().collect(Collectors.groupingBy(\n sve -> Objects.isNull(sve.getRemappedFrom()) ? \"\" : sve.getRemappedFrom()));\n\n for (Map.Entry<String, List<SubmittedVariantEntity>> asmAndSves : svesBySourceAssembly.entrySet()) {\n String sourceAsm = asmAndSves.getKey();\n List<SubmittedVariantEntity> svesRemappedFromAsm = asmAndSves.getValue();\n\n // If not remapped, stick with the target created date\n if (sourceAsm.equals(\"\")) {\n continue;\n }\n\n // Otherwise query database for source SVEs with same accession in this assembly to get their created date\n List<Long> targetAccessions = svesRemappedFromAsm\n .stream()\n .map(SubmittedVariantEntity::getAccession)\n .collect(Collectors.toList());\n List<SubmittedVariantEntity> allSourceSvesInAsm = mongoTemplate.find(\n query(where(\"seq\").is(sourceAsm).and(\"accession\").in(targetAccessions)),\n SubmittedVariantEntity.class, collection);\n Map<Long, List<SubmittedVariantEntity>> sourceSvesByAccession = allSourceSvesInAsm\n .stream().collect(Collectors.groupingBy(SubmittedVariantEntity::getAccession));\n\n for (SubmittedVariantEntity sve : svesRemappedFromAsm) {\n List<SubmittedVariantEntity> sourceSves = sourceSvesByAccession.get(sve.getAccession());\n targetToSourceCreatedDate.put(getKeyForCreatedDate(sve), getCreatedDateFromSource(sve, sourceSves));\n }\n }\n\n return targetToSourceCreatedDate;\n }",
"public static void incrDuplicates() { ++duplicates; }",
"protected void removeDuplicates() {\n log.trace(\"Removing duplicated\");\n long startTime = System.currentTimeMillis();\n int initial = size();\n E last = null;\n int index = 0;\n while (index < size()) {\n E current = get(index);\n if (last != null && last.equals(current)) {\n if (log.isTraceEnabled()) {\n log.trace(\"Removing duplicate '\" + current + \"'\");\n }\n remove(index);\n } else {\n index++;\n }\n last = current;\n }\n log.debug(String.format(\"Removed %d duplicates from a total of %d values in %dms\",\n initial - size(), initial, System.currentTimeMillis() - startTime));\n }",
"private static boolean duplicateSetName(String setName){\n boolean duplicate = false;\n for (Set set : SetManager.getInstance().getSets()) {\n if (set.getName() != null) {\n if (set.getName().equals(setName)) {\n duplicate = true;\n }\n }\n }\n return duplicate;\n }",
"private void HaveDuplicate() {\n haveDuplicate = false;\n duplicateCounter = 0;\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"' OR category_name = '\"+\n txtCategoryName.getText() + \"'\";\n rset = connection.createStatement().executeQuery(query);\n while (rset.next()) {\n haveDuplicate = true;\n duplicateCounter++;\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }",
"private void duplicateTags(Topology topology) {\n // This one pass implementation is dependent on Edges being\n // topologically sorted - ancestor Edges appear before their descendants.\n for (Edge e : topology.graph().getEdges()) {\n Object o = e.getTarget().getInstance();\n if (o instanceof Peek || o instanceof FanOut) {\n duplicateTags(e);\n }\n }\n }",
"public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}",
"private void calculateDuplicate(ArrayList<String> pathList) {\n\n HashMap<String, byte[]> pathMdHashMap = new HashMap<>();\n\n for (int i = 0; i < pathList.size(); i++) {\n\n LinkedHashMap<File, String> uniquePathAndFileHash = new LinkedHashMap<>();\n\n if (pathList.get(i) == null || !(new File(pathList.get(i)).isFile()) || !(new File(pathList.get(i)).exists()))\n continue;\n\n byte[] fileHash1 = Constant.fileHash(new File(pathList.get(i)));\n\n if (fileHash1 == null)\n continue;\n\n for (int j = i + 1; j < pathList.size(); j++) {\n\n String path = pathList.get(j);\n\n if (path == null || !(new File(path).isFile()) || !(new File(path).exists()))\n continue;\n\n byte[] fileHash2;\n\n if (pathMdHashMap.containsKey(path)) {\n fileHash2 = pathMdHashMap.get(path);\n } else {\n fileHash2 = Constant.fileHash(new File(pathList.get(j)));\n pathMdHashMap.put(path, fileHash2);\n }\n\n boolean flag = MessageDigest.isEqual(fileHash1, fileHash2);\n\n if (flag) {\n\n if (!uniquePathAndFileHashCopy.containsValue(pathList.get(i))) {\n uniquePathAndFileHash.put(new File(pathList.get(i)), pathList.get(i));\n }\n\n if (!uniquePathAndFileHashCopy.containsValue(path)) {\n uniquePathAndFileHash.put(new File(path), path);\n }\n }\n }\n\n if (uniquePathAndFileHash.size() > 1) {\n\n index++;\n\n\n LinkedHashMap<Integer, LinkedHashMap<File, String>> similarVideo = new LinkedHashMap<>();\n\n similarVideo.put(index, uniquePathAndFileHash);\n\n similarVideoCopy.put(index, uniquePathAndFileHash);\n\n uniquePathAndFileHashCopy.putAll(uniquePathAndFileHash);\n\n\n new Handler(Looper.getMainLooper()).post(() ->\n responseLiveData.setValue(FileRemoverResponse.success(similarVideo)));\n\n }\n }\n\n }",
"private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }",
"private void checkDuplicateOfFile(Iterable<FileInfo> files, DuplicateDataDTO data) {\n for(FileInfo nextFile: files) {\n for(FileInfo nextFile2: files) {\n if(nextFile.duplicate(nextFile2)) {\n LOG.info(\"Duplicate - {}\", nextFile);\n\n processDuplicate(nextFile,data);\n }\n }\n }\n }",
"private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }",
"public List<TreeNode> findDuplicateSubtrees(TreeNode root) {\n // like i thought, we can take the advantage of the serialization of the tree node\n // that is how we can put them into the map and check if there already exsit the same serials\n List<TreeNode> ans = new ArrayList<>();\n dfspostorder(root,new HashMap<String,Integer>(),ans);\n return new ArrayList<TreeNode>(ans);\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"private SBomCombiner()\n\t{}",
"public void dxDoubleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXDoubleSpeeds in the output\n // file.\n\n // concatenate the recorded DXDoubleSpeeds in a string\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXDoubleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXDoubleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXDoubleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"private Map<Key, Integer> mergeDuplicatedItemsAndDelte0(simpleRingBuffer<byte[]> buff2) {\n\t\t// TODO Auto-generated method stub\n\t\t//Iterator<byte[]> ier0 = buff2.iterator();\t \t\n \n//\t\tMap<Key, Integer> deduplicatedMap = Maps.newLinkedHashMap();\n// \t \t\n//\t\twhile(!buff2.isEmpty()){\n//\t\t\t//delete\n//\t\t\tbyte[] out = buff2.pop();\n//\t\t\t//push to the hash table\n//\t\t\tif(!deduplicatedMap.containsKey( out.key)){\n//\t\t\t\tdeduplicatedMap.put( out.key, out.counter);\t \n//\t\t\t}else{\n//\t\t\t\tdeduplicatedMap.replace(out.key, out.counter+deduplicatedMap.get(out.key));\n//\t\t\t}\n//\t\t}\n//\t\treturn deduplicatedMap;\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\t TreeSet<String> treeset = new TreeSet<String>();\r\n\t\t treeset.add(\"Good\");\r\n\t\t treeset.add(\"For\");\r\n\t\t treeset.add(\"Health\");\r\n\t\t //Add Duplicate Element\r\n\t\t treeset.add(\"Good\");\r\n\t\t System.out.println(\"TreeSet : \");\r\n\t\t for (String temp : treeset) {\r\n\t\t System.out.println(temp);\r\n\t\t }\r\n\t\t }",
"private String getDuplicateTag(String[] parameters) {\n if (parameters == null) {\n return null;\n }\n Set<String> tags = new HashSet<>();\n for (String param : parameters) {\n String paramTag = param.substring(0, param.indexOf('='));\n if (tags.contains(paramTag)) {\n return paramTag;\n } else {\n tags.add(paramTag);\n }\n }\n return null;\n }",
"public void onDuplicate() {\n }",
"protected boolean allowsDuplicates(Class type) {\n return !Set.class.isAssignableFrom(type);\n }",
"public static ArrayList<String> Externalexp1Sort(ArrayList<String> source)\n throws Exception {\n // file\n // ArrayList<Long> k = new ArrayList<Long>();\n // k.add(0L);\n // k.add(0L);\n // k.add(0L);\n // Long repeat = 0L;\n\n PriorityQueue<KVPair> heap = new PriorityQueue<KVPair>(20,\n new UserPrio());\n ArrayList<CsvReader> readers = new ArrayList<CsvReader>();\n // user_tweets output\n PrintWriter writer = new PrintWriter(new FileWriter(user_tweets));\n\n writer2 = new CsvWriter(new OutputStreamWriter(new FileOutputStream(\n SORT_USER_FN + fileNum + \".csv\"), \"UTF-8\"), ',');\n\n // open files\n for (String fileName : source) {\n // get read csv files\n CsvReader reader = new CsvReader(new InputStreamReader(\n new FileInputStream(fileName), \"UTF-8\"));\n reader.setHeaders(Merge.fields);\n // read a line and put into heap\n if (reader.readRecord()) {\n heap.offer(new KVPair(Merge.readRecord(reader), readers.size()));\n }\n readers.add(reader);\n }\n\n // get same key\n KVPair last = null;\n HashMap<Long, Record> sameRecord = new HashMap<Long, Record>();\n\n while (heap.size() > 0) {\n KVPair tmp = heap.poll();\n\n if (last != null && last.record.userid != tmp.record.userid) {\n writer.println(last.record.userid + \",\" + sameRecord.size());\n\n // print records to file\n writeRecords(sameRecord.values());\n\n sameRecord = new HashMap<Long, Record>();\n\n }\n\n // if (sameRecord.containsKey(tmp.record.tweetid)) {\n // repeat ++;\n // System.out.println(tmp.record.tweetid +\" : \" + repeat);\n // }\n\n sameRecord.put(tmp.record.tweetid, tmp.record);\n\n // read next record in the same file\n if (readers.get(tmp.file).readRecord()) {\n\n // k.set(tmp.file, k.get(tmp.file)+1);\n // System.out.println(k);\n\n heap.offer(new KVPair(Merge.readRecord(readers.get(tmp.file)),\n tmp.file));\n } else {\n readers.get(tmp.file).close();\n }\n last = tmp;\n }\n\n // last part of external sort\n if (sameRecord.size() != 0) {\n writer.println(last.record.userid + \",\" + sameRecord.size());\n\n // print records to file\n writeRecords(sameRecord.values());\n }\n\n writer.close();\n\n writer2.flush();\n writer2.close();\n\n return source;\n }",
"public boolean supportsUnique() {\n \t\treturn true;\n \t}",
"@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }",
"@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }",
"public ArrayList<Affix> removeDuplicateAffix(ArrayList<Affix> affix)\n\t{\n\t\tArrayList<Affix> tempAffix = affix;\n\t\tArrayList<Affix> resultAffix = new ArrayList<Affix>();\n\t\tboolean skip = false;\n\t\tint appearances = 0;\n\n//\t\tfor( int i = 0; i < affix.size(); i++)\n//\t\t{\n//\t\t\tskip = false;\n//\t\t\tfor(int j = 0; j < affix.size(); j++)\n//\t\t\t{\n//\t\t\t\tprintln(\" Comparing \" + tempAffix.get(i).getAffix() + \" and \" + affix.get(j).getAffix() );\n//\t\t\t\tif( skip == true )\n//\t\t\t\t{\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n//\t\t\t\tif( tempAffix.get(i).getAffix().equalsIgnoreCase(\"\") )\n//\t\t\t\t{\n//\t\t\t\t\tskip = true;\n//\t\t\t\t}\n//\t\t\t\tif( tempAffix.get(i).getAffix().compareTo( affix.get(j).getAffix() ) != 0 && !skip)\n//\t\t\t\t{\n//\t\t\t\t\tprintln(\" Adding2 \" + tempAffix.get(i).getAffix() + \" and \" + affix.get(j).getAffix() );\n//\t\t\t\t\tskip = true;\n//\t\t\t\t\tresultAffix.add(tempAffix.get(i));\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\n\n\n\t\tfor ( int i = 0; i < affix.size(); i++ )\n\t\t{\n\t\t\tskip = false;\n\t\t\tfor( int j = 0; j < tempAffix.size(); j++ )\n\t\t\t{\n\t\t\t\tif( skip == true ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if( tempAffix.get(i).getAffix().equalsIgnoreCase(\"\") && !skip )\n\t\t\t\t{\n\t\t\t\t\tskip = true;\n\t\t\t\t}\n\t\t\t\tif( tempAffix.get(i).getAffix().equalsIgnoreCase( affix.get(j).getAffix() ) && !skip)\n\t\t\t\t{\n\t\t\t\t\tskip = true;\n\t\t\t\t\tappearances++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( appearances == 1) {\n\t\t\t\tresultAffix.add( tempAffix.get(i) );\n\t\t\t}\n\t\t}\n\n\t\treturn resultAffix;\n\t}",
"@ProcessElement\n public void processElement(ProcessContext c) {\n Iterator<String> duplicates = c.element().getValue().iterator();\n\n // Shouldn't really have to check hasNext\n if (duplicates.hasNext()) {\n c.output(duplicates.next());\n }\n }",
"@Override\n public int hashCode() {\n return 0;\n }",
"public static void main(String[] args) {\n\t\tint a[] = {1,2,2,6,7,3,4,4,5,5,6,7};\n\t\t\n\t\t\n\t\tMap<Integer,Integer> map =new HashMap<Integer,Integer>();\n\t\t\n\t\tfor (Integer num :a) {\n\t\t\tInteger Count =map.get(num);\n\t\t\tif(Count==null) {\n\t\t\t\tmap.put(num, 1);\n\t\t\t}else {\n\t\t\t\tmap.put(num, ++Count);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset =map.entrySet();\n\t\tArrayList<Integer> list =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry :entryset) {\n\t\t\tif(entry.getValue()>1) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Duplicates are \" +list);\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset1 =map.entrySet();\n\t\tArrayList<Integer> nonduplist =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry1 :entryset1) {\n\t\t\tif(entry1.getValue()==1) {\n\t\t\t\tnonduplist.add(entry1.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Non Duplicates are \" +nonduplist);\n\t\t\n \n}",
"private static void fun2(List<String> ac1, List<List<String>> result, int index) {\n\t\tString key = ac1.get(0);\r\n\t\tfor(int i=index;i<result.size();i++){\r\n\t\t\tList<String> res=result.get(i);\r\n\t\t\tif(res.get(0).equals(key)){\r\n\t\t\t\t//check if any one of the value is repeated\r\n\t\t\t\tboolean check=fun3(res,ac1);\r\n\t\t\t\tif(check){\r\n\t\t\t\t\tfor(int j=1;j<ac1.size();j++){\r\n\t\t\t\t\t\tres.add(ac1.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void testResolvedDuplicate() throws Exception\n {\n String json = MAPPER.writeValueAsString(new DupFieldBean2());\n assertEquals(json, a2q(\"{'z':4}\"));\n }",
"private Combined() {}",
"private boolean allSameClass(List<Instance> instances) {\r\n\r\n\t\tString firstClassFound = (String) instances.get(0).getClassAttribute();//.getAttributes().get(4).getValue();\r\n\t\t// search thru' instances until it finds a different classification to the first one\r\n\t\tfor(Instance ins : instances){\t\t\t\r\n\t\t\t//if(!ins.getAttributes().get(4).getValue().equals(firstClassFound)){\r\n\t\t\tif(!ins.getClassAttribute().equals(firstClassFound)){\r\n\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn true;\r\n\t}",
"private TileSet rebuildList(Map<Integer, List<Tile>> index) {\n\t\tTileSet tileset = new TileSet();\n\t\tfor (List<Tile> list : index.values()) {\n\t\t\tfor (Tile tile : list) {\n\t\t\t\tboolean isUnique = true;\n\t\t\t\tfor (Tile uTile : tileset) {\n\t\t\t\t\tif (tile == uTile) {\n\t\t\t\t\t\tisUnique = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isUnique) {\n\t\t\t\t\ttileset.add(tile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tileset;\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 }",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n \t // create a HashSet using a collection as parameter\r\n \t Set< String > set = new HashSet< String >( collection );\r\n \t System.out.println( \"Nonduplicates are: \" );\r\n \t for ( String s : set )\r\n \t\t System.out.printf( \"%s \", s );\r\n \t System.out.println();\r\n \t }",
"public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }",
"@Override\r\n public int hashCode() {\r\n return doc1.hashCode() + doc2.hashCode();\r\n }",
"public boolean hasDuplicates(boolean ignoreWhenIdentical) {\n boolean compareJustClassNames = !ignoreWhenIdentical;\n if (compareJustClassNames) {\n return list.size() > 1;\n }\n\n if (list.size() <= 1) {\n return false;\n }\n\n String previousHash = list.get(0).getHash();\n for (int i = 1; i < list.size(); i++) {\n String currentHash = list.get(i).getHash();\n if (!previousHash.equals(currentHash)) {\n return true;\n }\n }\n\n log.debug(\"ignoring duplicates of class \" + classFilePath + \" since the bytecode matches exactly\");\n\n return false;\n }",
"private SAMRecord markDuplicatesAndGetTheNextAvailable() {\n\n // Check if there are any we can flush output buffer\n { // NB: braces to limit the scope of 'record'\n final SAMRecord record = flush();\n if (null != record) return record;\n }\n\n // Check if there are any more records to read in\n if (!backingIterator.hasNext()) { // no more records to read in\n\n // Check if there are any more to mark\n if (toMarkQueue.isEmpty()) {\n // check if there are any that can be outputted\n if (outputBuffer.isEmpty()) {\n return null;\n } // no need to flush; no records in the queue and buffer\n } else {\n // force marking duplicates on the remaining records\n tryPollingTheToMarkQueue(true, null);\n }\n\n /* Since we have no more records to read in, and no more records that need duplicate marking run, we\n update our coordinate to past the end of the reference\n */\n referenceIndex = header.getSequenceDictionary().getSequences().size();\n\n /* Now we recurse, so that we can flush from the outputBuffer until it is empty, then return null when\n * all of the input, queue, and buffer are empty */\n return markDuplicatesAndGetTheNextAvailable();\n }\n\n /* We need to retrieve more records from the input iterator and duplicate mark, until we can return one that\n * has been through duplicate marking.\n */\n while (backingIterator.hasNext()) {\n\n // NB: we could get rid of this if we made nextRecord into a list...\n // NB: we do not actually remove this record from the backing iterator until much later, to help with processing unmapped reads at the EOF\n SAMRecord record = backingIterator.peek(); // peek: used for unmapped reads\n final SamRecordWithOrdinal samRecordWithOrdinal = new SamRecordWithOrdinalAndSetDuplicateReadFlag(record, backingIteratorRecordIndex);\n\n ReadEndsForMateCigar readEnds = null;\n boolean performedChunkAndMarkTheDuplicates = false;\n\n // remove duplicate information\n record.setDuplicateReadFlag(false);\n\n /* Check for pairs that have both ends mapped and missing mate cigar. */\n if (ignoreDueToMissingMateCigar(samRecordWithOrdinal)) {\n continue;\n }\n\n // check for an unmapped read\n if (record.getReadUnmappedFlag()) {\n // unmapped reads at the end of the file!\n if (-1 == record.getReferenceIndex()) {\n // NB: this may call markDuplicatesAndGetTheNextAvailable if this is the first time a EOF unmapped record has been seen\n return nextIfRecordIsUnmappedAtEOF(record);\n } else if (!record.isSecondaryOrSupplementary()) {\n // update metrics\n final DuplicationMetrics metrics = getMetrics(record);\n ++metrics.UNMAPPED_READS;\n }\n // we will check for unmapped reads later so as not to add them to mark queue\n } else {\n // If not already set, this sets the minimum distance to twice the read length, or 100, whichever is larger\n if (-1 == toMarkQueue.getToMarkQueueMinimumDistance()) {\n // use twice the first read's length\n toMarkQueue.setToMarkQueueMinimumDistance(Math.max(2 * record.getReadBases().length, 100));\n }\n\n // build a read end for use in the toMarkQueue\n readEnds = new ReadEndsForMateCigar(header, samRecordWithOrdinal, opticalDuplicateFinder, libraryIdGenerator.getLibraryId(samRecordWithOrdinal.getRecord()));\n\n // check that the minimumDistance was not too small\n checkForMinimumDistanceFailure(readEnds);\n\n /*\n * If we can do some duplicate marking, lets do it!\n * IMPORTANT: this does not flush the to-mark-queue, so the minimum distance needs to be set for us to infer\n * which records will never be supplemented (i.e. are non-duplicate).\n */\n performedChunkAndMarkTheDuplicates = tryPollingTheToMarkQueue(false, readEnds);\n }\n\n // We can now remove the record from the input\n backingIterator.next();\n\n // Add this to the outputBuffer so it can be tracked. It will not be available to emit until it has been through duplicate marking.\n addRecordToTheOutputBuffer(samRecordWithOrdinal);\n backingIteratorRecordIndex++; // Each record is has an index and is emitted in the same order. This helps that.\n\n // We do not consider secondary, supplementary, or unmapped alignments for duplicate marking. We can thus mark that duplicate marking on them has been completed.\n final DuplicationMetrics metrics = getMetrics(record);\n if (record.isSecondaryOrSupplementary() || record.getReadUnmappedFlag()) {\n outputBuffer.setResultState(samRecordWithOrdinal, false);\n if(record.isSecondaryOrSupplementary()){\n ++metrics.SECONDARY_OR_SUPPLEMENTARY_RDS;\n }\n } else {\n // Bring the simple metrics up to date\n if (!record.getReadPairedFlag() || record.getMateUnmappedFlag()) {\n ++metrics.UNPAIRED_READS_EXAMINED;\n } else {\n ++metrics.READ_PAIRS_EXAMINED; // will need to be divided by 2 at the end\n }\n\n // Add the record for duplicate marking, which may in fact cause it to be duplicate marked or stored for later\n toMarkQueue.add(readEnds, outputBuffer, getMetrics(readEnds.getRecord()));\n }\n\n // Check if there are any we can flush, which happens if we just performed duplicate marking\n if (performedChunkAndMarkTheDuplicates) {\n record = flush();\n if (null != record) return record;\n }\n }\n\n // try again, as we may have records we can flush, or we want to see if we are at the EOF\n return markDuplicatesAndGetTheNextAvailable();\n }",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"private List<SuperSetterBasedBuilderField> deduplicateByName(List<SuperSetterBasedBuilderField> fields) {\n List<SuperSetterBasedBuilderField> result = new ArrayList<>();\n for (SuperSetterBasedBuilderField field : fields) {\n if (!alreadyContainsField(result, field)) {\n result.add(field);\n }\n }\n return result;\n }",
"@Override\n public int hashCode() { \n return this.toString().hashCode();\n }",
"private List<String> rmDupInfo(List<String> fields) {\n Set<String> seen = new HashSet<>();\n List<String> uniqueNonEmptyFields = new ArrayList<>();\n for (String i : fields) {\n if (i.isEmpty() || i.equals(\".\")) {\n continue;\n } else {\n String fieldName = i.split(\"=\")[0];\n if (!seen.contains(fieldName)) {\n uniqueNonEmptyFields.add(i);\n seen.add(fieldName);\n }\n }\n }\n return uniqueNonEmptyFields;\n }",
"public void addCount() {\n \t\tdupCount++;\n \t}",
"public static void main(String[] args) {\n ArrayList<Integer> nums = new ArrayList<>();\n nums.addAll( Arrays.asList(100, 2000, 50, 50, 100, 200, 300, 50));\n nums=new ArrayList<>(new TreeSet<>(nums));\n System.out.println(nums);\n\n String str1 = \"babababC\";\n str1 = new TreeSet<>( Arrays.asList(str1.split(\"\")) ).toString();\n System.out.println(str1);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - 2. Write a program that can REMOVE THE DUPLICATES from an ArrayList. DO NOT change the ORDER\n * -> LinkedHashSet -> Remove Duplicates and Keeps the Insertion Order\n */\n ArrayList<Integer> list = new ArrayList<>(Arrays.asList(6,6,6,6,5,5,5,4,4,4,4));\n list=new ArrayList<>(new LinkedHashSet<>(list));\n System.out.println(list);\n\n\n /**\n * - 1. Write a program that can remove the duplicated characters from String and store them into variable\n */\n String str = \"ABABABCDEF\";\n String[] arr = str.split(\"\");\n str = new LinkedHashSet<>(Arrays.asList(arr)).toString().replace(\", \", \"\");\n System.out.println(str);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * -> Does not accept duplicates, and sort the objects\n * -> HashSet accepts null\n * -> HashSet is faster than TreeSet\n */\n HashSet<Integer> numbers = new HashSet<>(Arrays.asList(10,9,10, 9, 8, 7, 8, 7, 6, 5, 6, 1));\n System.out.println(numbers ); // -> [1, 5, 6, 7, 8, 9, 10]\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - ITERATOR: -> is the only way to remove duplicates from collection\n * - removeIf -> removes numbers because it is uses the iterator interface internally. Iterator implicitly\n *\n * - hasNext() method only can go forward cant go backward. it stars from next index\n * - when we use it our loop hasNext() iterates from the next index\n * - iterator(); - hasNext(); - next(); - remove();\n */\n ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n list2.removeIf( p -> p < 4 );\n System.out.println(list2);\n\n\n ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n Iterator<Integer> it =list3.iterator(); // - this method will return iterator\n while( it.hasNext() ){ // - iterator explicitly. While loop only accept boolean\n if( it.next() < 4 ){\n it.remove();\n }\n }\n System.out.println(list3);\n\n\n ArrayList<Integer> list4 = new ArrayList<>(Arrays.asList(1,1,2,3,3,4,4,5,5));\n // - hasNext(); will iterate all the indexes. We do not need extra iterator in the loop\n for(Iterator<Integer> I = list4.iterator(); I.hasNext(); ){\n if( I.next() < 4) {\n I.remove();\n }\n }\n System.out.println(list4);\n\n\n\n LinkedHashSet<String> names = new LinkedHashSet<>();\n names.addAll(Arrays.asList( \"Mehmet\",\"Mohammed\",\"Yucel\",\"Sha\",\"Ozgur\", \"Ahmet\",\"Osmanj\",\"Ozgur\",\"Ozgur\",\"Irina\"));\n System.out.println(names);\n Iterator<String> it3 = names.iterator();\n while( it3.hasNext() ){\n String s = it3.next();\n if(s.contains(\"m\") || s.contains(\"M\")){ // - s.toLowerCase.contains(\"m\")\n it3.remove();\n }\n }\n System.out.println(names);\n\n /*\n ===============================================================\n for(Iterator<String> it3 = names.iterator(); it3.hasNext() ; ){\n String s = it3.next();\n if(s.toLowerCase().contains(\"m\")){\n it3.remove();\n }\n }\n ================================================================\n names.removeIf( s -> s.contains(\"m\") || s.contains(\"M\") );\n ================================================================\n names.removeAll( Arrays.asList( \"Mehmet\", \"Ozgur\", \"Mohammed\" ));\n ================================================================\n names.retainAll( Arrays.asList( \"Yucel\", \"Sha\", \"Ahmet\" ) );\n ================================================================\n boolean result = list.containsAll( Arrays.asList(5, 6, 9, 8, 11 ));\n */\n\n\n\n\n\n\n\n System.out.println(\"=========================================================================================\");\n\n\n\n\n\n }",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\n public final int hashCode() {\n return super.hashCode();\n }",
"public synchronized void addUniqueMultiple(List<kelondroRow.Entry> rows) throws IOException {\n TreeMap<Integer, byte[]> indexed_result = super.addMultiple(rows);\r\n // indexed_result is a Integer/byte[] relation\r\n // that is used here to store the index\r\n Iterator<Map.Entry<Integer, byte[]>> i = indexed_result.entrySet().iterator();\r\n Map.Entry<Integer, byte[]> entry;\r\n while (i.hasNext()) {\r\n entry = i.next();\r\n index.puti(entry.getValue(), entry.getKey().intValue());\r\n }\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n \t\t\r\n }",
"public static void main(String[] args) {\n\t\tA1 a1=new A1(\"ram\",1,\"ram\");\n\t\tA1 a2=new A1(\"ram\",1,\"ram\");\n\t\tHashSet<A1> set=new HashSet<A1>();\n\t System.out.println(a1.getName());\n\t System.out.println(a2.getName());\n\t set.add(a1);\n\t set.add(a2);\n\t System.out.println(set.size());\n\t}",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }",
"void modusponens(){\n\t\tHashMap<String,HashSet<Hypothesis> > temp_lhs_hypo = new HashMap<String,HashSet<Hypothesis> >();\n\t\tHashSet<Hypothesis> new_hypos = new HashSet<Hypothesis>();\n\t\t\n\t\t//Utils.println(\"hypothesis list\");\n\t\tIterator it = hypothesis.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t String A = (String)pairs.getKey();\n\t //Utils.println(\"hypothesis A : \"+A);\n\t HashSet<Hypothesis> A_B = new_lhs_hypo.get(A);\n\t if(A_B == null) {\n\t \t//Utils.println(\"No match\");\n\t \tcontinue;\n\t \t}\n\t else{\n\t \t//Utils.println(\"Matched: \"+A_B.size());\n\t \tIterator bit = A_B.iterator();\n\t \twhile (bit.hasNext()) {\n\t \t Hypothesis A_B_hypo = (Hypothesis)bit.next();\n\t\t \tHypothesis mp_hypo = makeHypothesis(A_B_hypo.rhs, 1, -1, A, A_B_hypo.expression);\n\t\t \tif(mp_hypo!=null) {\n\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t \t\t//Utils.println(\"Existing MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t \t\t//already existing\n\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t \t//Utils.println(\"New MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t\t }\n\t\t \t}else{\n\t\t \t\t//Utils.println(\"MP Not Valid: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t \t}\n\t\t }\n\t }\n\t }\n\t \n\t //Utils.println(\"new hypothesis list\");\n\t it = new_lhs_hypo.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t HashSet<Hypothesis> hypos = (HashSet<Hypothesis>) pairs.getValue();\n\t Iterator<Hypothesis> Ait = hypos.iterator();\n\t while(Ait.hasNext()){\n\t \tString A = ((Hypothesis)Ait.next()).expression;\n\t \t//Utils.println(\"hypothesis A : \"+A);\n\t \tHashSet<String> B_set = lhs_hypo.get(A);\n\t \tif(B_set == null){\n\t \t\t//Utils.println(\"No match\");\n\t \t\tcontinue;\n\t \t\t}\n\t \telse{\n\t \t\t//Utils.println(\"Matched: \"+B_set.size());\n\t \t\tIterator Bit = B_set.iterator();\n\t\t \twhile(Bit.hasNext()){\n\t\t \t\tString B_str = (String) Bit.next();\n\t\t \t\tString A_B_exp = Utils.expression(A, B_str);\n\t\t \t\tHypothesis mp_hypo = makeHypothesis(B_str, 1, -1, A, A_B_exp);\n\t\t \t\tif(mp_hypo!=null) {\n\t\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t\t \t\t//Utils.println(\"Existing MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t \t\t//already existing\n\t\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t\t \t//Utils.println(\"New MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t\t }\n\t\t\t \t}else{\n\t\t\t \t\t//Utils.println(\"MP Not Valid: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t \t\n\t }\n\t }\n\t \n\t //Utils.println(\"Size of new_hypos: \"+new_hypos.size());\n\t \n\t Iterator<Hypothesis> hit = new_hypos.iterator();\n\t while(hit.hasNext()){\n\t \tHypothesis mp_hypo = hit.next();\n\t \tboolean b = insertHypothesis(mp_hypo);\n\t \tif(b){\n\t \t\tHashSet<Hypothesis> temp_hypos = temp_lhs_hypo.get(mp_hypo.lhs);\n\t \tif(temp_hypos == null){\n\t \t\ttemp_hypos = new HashSet<Hypothesis>();\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t\ttemp_lhs_hypo.put(mp_hypo.lhs, temp_hypos);\n\t \t}else{\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t}\n\t \t//Utils.printHypothesis(mp_hypo);\n\t \t}\n\t }\n\t \n\n\t //Utils.println(\"Size of temp_lhs_hypo: \"+temp_lhs_hypo.size());\n\t \n\t new_lhs_hypo.clear();\n\t new_lhs_hypo = temp_lhs_hypo;\n\t if(new_lhs_hypo.size()!=0) modusponens();\n\t}",
"public static void main(String[] args) {\n countDuplicateCharacters(\"My name is Fernando\");\n\n //2. Reverse an Arraylist.\n reverseArrayList();\n\n //3. Check if a particular key exists in HashMap.\n //4. Convert keys of a map to a list.\n checkKeyAndCreateList();\n\n //5. Copy all elements of a HashSet to an Object array.\n hashToObject();\n\n //6. Get highest and lowest value stored in TreeSet\n maxAndMinValueTreeSet();\n\n //7. Sort ArrayList of Strings alphabetically.\n sortArrayList();\n\n //8. Get Set view of keys from HashTable.\n getViewsHashTable();\n\n }",
"public interface EntityAddManager {\r\n\r\n /**\r\n * Save entity/address/phone number/entity_class\r\n *\r\n * @param inputRecord\r\n * @return\r\n */\r\n EntityAddInfo saveEntity(Record inputRecord);\r\n\r\n /**\r\n * Validate county code for premise address and save entity data.\r\n * Save activity history if necessary:\r\n *\r\n * @param inputRecord\r\n * @param shouldSaveActivityHist\r\n * @return\r\n */\r\n EntityAddInfo validateAddrAndSaveEntity(Record inputRecord, boolean shouldSaveActivityHist);\r\n\r\n /**\r\n * Save activityHistory after adding entity\r\n *\r\n * @param inputRecord\r\n */\r\n void saveActivityHistForAddEntity(Record inputRecord);\r\n\r\n\r\n /**\r\n * Converts an XML document with data about possible duplicate entities to an\r\n * ArrayList of Strings.\r\n *\r\n * Xml doc is in the following format:\r\n * <duplicates>\r\n * <duplicate>\r\n * <entityPK><![CDATA[1049344]]></entityPK>\r\n * <clientID><![CDATA[AH1043]]></clientID>\r\n * <taxID><![CDATA[999999999]]></taxID>\r\n * <fullName><![CDATA[Wood, Thomas F,]]></fullName>\r\n * <addr1><![CDATA[]]></addr1>\r\n * <addr2><![CDATA[]]></addr2>\r\n * <cityState><![CDATA[Somewhere, MA]]></cityState>\r\n * <zipcode><![CDATA[]]></zipcode>\r\n * <license><![CDATA[]]></license>\r\n * <email><![CDATA[]]></email>\r\n * </duplicate>\r\n *</duplicates>\r\n *\r\n * @param xmlDoc XML document with duplicates.\r\n * @param includeDupTaxID Whether or not to include tax ID with entity duplicates info.\r\n * @return List<String> - String list for duplicate entities. String will be in format like\r\n * Full name: Wood, Thomas F, - Client ID: AH1043 - Tax ID: 999999999 - City, State: Somewhere, MA\r\n */\r\n List<String> getEntityDupListFromXMLDoc(Document xmlDoc, boolean includeDupTaxID);\r\n\r\n}",
"private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }",
"public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }",
"public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }",
"public void testEquals() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeries s1b = new TaskSeries(\"S\");\n s1b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2b = new TaskSeries(\"S\");\n s2b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c2 = new TaskSeriesCollection();\n c2.add(s1b);\n c2.add(s2b);\n }",
"@Override\r\n\t\tpublic int hashCode() {\n\t\t\treturn 0;\r\n\t\t}",
"@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }",
"private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }",
"public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }",
"private String checkDuplicateName(List<VMResource> result, String fileName, Extension extension, int index) {\n String childFileName = fileName;\n int num = index;\n if (num > 0) {\n childFileName = fileName + num;\n }\n boolean isAlreadyExist = false;\n for (VMResource resource : result) {\n if (resource instanceof VMFile) {\n VMFile file = (VMFile) resource;\n if (file.getName().equals(childFileName) && file.getExtension().equals(extension)) {\n isAlreadyExist = true;\n break;\n }\n }\n }\n if (isAlreadyExist) {\n childFileName = checkDuplicateName(result, fileName, extension, ++num);\n }\n return childFileName;\n }",
"boolean isIsUnique();",
"public static void main(String[] args) {\nLinkedHashSet<String> name_set=new LinkedHashSet<String>();\nname_set.add(\"John\");\nname_set.add(\"Fletcher\");\nname_set.add(\"Kirill\");\nname_set.add(\"Kowing\");\n//Adding same Record again to Linked Hash Set , will not add duplicate record\nname_set.add(\"John\");\nSystem.out.println(\" Record Set\"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Johncena : \"+name_set.contains(\"Johncena\"));\nname_set.remove(\"Kowing\");\nSystem.out.println(\"-----------------------------------------------\");\n\nSystem.out.println(\"Updated Record Set: \"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Kowing : \"+name_set.contains(\"Kowing\"));\n\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"public void HashsetBasicExanple() {\n\t\t\n\t\tHashSet<String> hs = new HashSet<String>();\n\t\ths.add(\"Sudha\");\n\t\ths.add(\"Yog\");\n\t\ths.add(\"Sathya\");\n\t\ths.add(\"Sadhana\");\n\t\ths.add(null);\n\t\ths.add(\"Aadhav\");\n\t\ths.add(\"Yog\");\n\t\t\n\t\t//Insertion order is not mainted and duplicate value is not allowed.\n\t\tSystem.out.println(hs);//[Yog, null, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.contains(null));//true\n\t\t\n\t\ths.remove(null);\n\t\tSystem.out.println(hs);//[Yog, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tHashSet<String> hs1 = new HashSet<String>();\n\t\ths1.add(\"a\");\n\t\ths1.add(\"b\");\n\t\ths1.add(\"c\");\n\t\ths1.add(\"e\");\n\t\tSystem.out.println(hs1);//[a, b, c, e]\n\t\t\n\t\ths.addAll(hs1);\n\t\tSystem.out.println(hs);//[Yog, a, b, Sudha, c, Sathya, e, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.containsAll(hs1));//true\n\t\t\n\t\t\n\t\t//Iterator using iterator\n\t\t\n\t\tIterator<String> iterator = hs.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\tSystem.out.println(\"Iterate using Iterator \" + iterator.next());\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tHashSet<String> obj = new HashSet<String>();\n\t\t\n\t\tobj.add(\"Apple\");\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\t//adding duplicate elements\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\tobj.add(null);\n\t\tobj.add(null);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\t\t\n\t}",
"private void copySTLs()\n\t{\n\t\tint u = 0;\n\t\tfor(int i = 0; i < astl.size(); i++)\n\t\t{\n\t\t\tfor(int subMod1 = 0; subMod1 < astl.get(i).size(); subMod1++)\n\t\t\t{\n\t\t\t\tString s = astl.get(i).fileItCameFrom(subMod1);\n\t\t\t\tastl.get(i).setUnique(subMod1, u);\n\t\t\t\tfor(int j = 0; j < i; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int subMod2 = 0; subMod2 < astl.get(j).size(); subMod2++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(s.equals(astl.get(j).fileItCameFrom(subMod2)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tastl.get(i).setUnique(subMod1, astl.get(j).getUnique(subMod2));\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(astl.get(i).getUnique(subMod1) == u)\n\t\t\t\t{\n\t\t\t\t\tcopyFile(s, rfoDir + stlName(u));\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t}"
] | [
"0.60114664",
"0.57431746",
"0.56449807",
"0.55998313",
"0.5587534",
"0.55460954",
"0.55074614",
"0.5464166",
"0.54353034",
"0.54114395",
"0.53600955",
"0.534453",
"0.5287509",
"0.5287321",
"0.5274732",
"0.52571183",
"0.52565444",
"0.52393967",
"0.5236257",
"0.5232509",
"0.52214473",
"0.52057755",
"0.51993316",
"0.5190761",
"0.51903516",
"0.5178427",
"0.51596326",
"0.51557755",
"0.5150898",
"0.51436317",
"0.5120344",
"0.51146454",
"0.51146454",
"0.51146454",
"0.51146454",
"0.5104425",
"0.510388",
"0.5101698",
"0.5100483",
"0.509957",
"0.5097538",
"0.5097374",
"0.5076301",
"0.5070671",
"0.5067821",
"0.5066961",
"0.5045341",
"0.5040571",
"0.503634",
"0.50297487",
"0.50285476",
"0.50277233",
"0.5020579",
"0.50107306",
"0.50088096",
"0.50083005",
"0.49997824",
"0.4997002",
"0.4996621",
"0.4995958",
"0.4991057",
"0.49906012",
"0.49897155",
"0.4974946",
"0.4971224",
"0.49701563",
"0.49669638",
"0.4963431",
"0.4963431",
"0.4963431",
"0.49534002",
"0.4951093",
"0.4950006",
"0.4944998",
"0.493957",
"0.4937991",
"0.49367532",
"0.4935628",
"0.4931305",
"0.4927901",
"0.49267888",
"0.49211803",
"0.49158275",
"0.4905252",
"0.49041653",
"0.49023712",
"0.49003023",
"0.4900126",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.48985326",
"0.4896163",
"0.4891181"
] | 0.0 | -1 |
TODO duplicates not handled | @Deprecated
public static Long[] getFriendRequestList1(int id){
try {
Statement st = conn.createStatement();
ResultSet userDetail = st.executeQuery("select * from users where userid = " + id);
if(userDetail.next()){
Array firendReqListArray = userDetail.getArray(5);
Long[] friendReqList = (Long[]) firendReqListArray.getArray();
userDetail.close();
st.close();
return friendReqList;
}else{
return new Long[0];
}
}catch (SQLException e){
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}",
"public Multimap<String, Command> checkForDuplicateNames() {\r\n\t\tList<Command> allCommands = new ArrayList<>();\r\n\t\tallCommands.addAll(this.commands);\r\n\t\tallCommands.addAll(learnedCommands.getCommands());\r\n\r\n\t\tMultimap<String, Command> byName = ArrayListMultimap.create();\r\n\t\tfor (Command command : allCommands) {\r\n\t\t\tbyName.put(command.name().toLowerCase(), command);\r\n\t\t\tfor (String alias : command.aliases()) {\r\n\t\t\t\tbyName.put(alias.toLowerCase(), command);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMultimap<String, Command> duplicates = ArrayListMultimap.create();\r\n\r\n\t\tbyName.asMap().entrySet().stream() //@formatter:off\r\n\t\t\t.filter(entry -> entry.getValue().size() > 1)\r\n\t\t.forEach(entry -> duplicates.putAll(entry.getKey(), entry.getValue())); //@formatter:on\r\n\r\n\t\treturn duplicates;\r\n\t}",
"@Override\n public int hashCode() {\n return 1;\n }",
"protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }",
"@Override\n protected int getNumRepetitions() {\n return 1;\n }",
"void scanunique() {\n\t\tint oldline, newline;\n\t\tnode psymbol;\n\n\t\tfor (newline = 1; newline <= newinfo.maxLine; newline++) {\n\t\t\tpsymbol = newinfo.symbol[newline];\n\t\t\tif (psymbol.symbolIsUnique()) { // 1 use in each file\n\t\t\t\toldline = psymbol.linenum;\n\t\t\t\tnewinfo.other[newline] = oldline; // record 1-1 map\n\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t}\n\t\t}\n\t\tnewinfo.other[0] = 0;\n\t\toldinfo.other[0] = 0;\n\t\tnewinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1;\n\t\toldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1;\n\t}",
"public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }",
"static SparseArray<TaskDetail> getCurrentMappingsDuplicated() {\n SparseArray<TaskDetail> toReturn = new SparseArray<>();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n toReturn.put(TaskDetail.actionToTask.keyAt(i), detail.duplicate());\n }\n return toReturn;\n }",
"private List<CustStmtRecord> validateDuplicate (final List<CustStmtRecord> custStmtRecords) {\n\t\tlog.info(\"Entering {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\tfinal List<CustStmtRecord> duplicateReference = custStmtRecords\n\t\t\t\t.parallelStream()\n\t\t\t\t\t.filter(e -> Collections.frequency(custStmtRecords, e) > 1)\n\t\t\t\t\t.collect(Collectors.toList());\n\t\t\t\t\t;\n\t\t\t\n\t\tlog.info(\"duplicateReference {}\", duplicateReference);\n\t\t\t\n\t\tlog.info(\"Exiting {}.{}\", getClass().getName(), \"validateDuplicate()\");\n\t\treturn duplicateReference;\n\t}",
"private void compareFirstPass() {\n this.oldFileNoMatch = new HashMap<String, SubsetElement>();\r\n Iterator<String> iter = this.oldFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.newFile.containsKey(key)) {\r\n final String newKey = this.oldFile.get(key).getSubsetCode()\r\n + this.oldFile.get(key).getConceptCode();\r\n this.oldFileNoMatch.put(newKey, this.oldFile.get(key));\r\n }\r\n }\r\n\r\n // Now repeat going the other way, pulling all new file no matches into\r\n // newFileNoMatch\r\n this.newFileNoMatch = new HashMap<String, SubsetElement>();\r\n iter = this.newFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.oldFile.containsKey(key)) {\r\n final String newKey = this.newFile.get(key).getSubsetCode()\r\n + this.newFile.get(key).getConceptCode();\r\n this.newFileNoMatch.put(newKey, this.newFile.get(key));\r\n }\r\n }\r\n\r\n // dump the initial large HashMaps to reclaim some memory\r\n this.oldFile = null;\r\n this.newFile = null;\r\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tList<Character>st1=new ArrayList<>();\n\t\n\t\tst1.add('a');\n\t\tst1.add('b');\n\t\tst1.add('a');\n\t\tst1.add('a');\n\t\tst1.add('c');\n\t\tst1.add('t');\n\t\n\t\tSystem.out.println(st1);//[a, b, a, a, c, t]\n\t\t\n\t\tList<Character>st2=new ArrayList<>();//empty []\n\t\tfor (int i=0; i<st1.size();i++) {\n\t\t\tif(!st2.contains(st1.get(i))) {\n\t\t\t\t// created str2 [empty], we will get the element from st1 to st2 while checking if there is repetition \n\t\t\t\tst2.add(st1.get(i));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(st2);//[a, b, c, t]\n\t\t\n\n\t}",
"public void dxSingleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXSingleSpeeds in the output\n // file.\n\n // concatenate the recorded DXSingleSpeeds in a string\n ArrayList<String> recordedDXSingleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXSingleSpeed> dxSingleSpeedIterator = dxSingleSpeeds.iterator(); dxSingleSpeedIterator\n .hasNext();) {\n recordedDXSingleSpeedsStrings.add(dxSingleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXSingleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXSingleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXSingleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }",
"protected void paramDuplicate(){\n List<StatementParse> parameters = this.node.getChildren().get(0).getChildren();\n for (StatementParse x: parameters){\n int count = 0;\n for (StatementParse y: parameters){\n if (x.getName().equals(y.getName())){\n count++;\n }\n }\n if (count > 1) throw new DuplicateParam();\n }\n }",
"@Test\n public void testRemoveDuplicates() {\n System.out.println(\"removeDuplicates\");\n ArrayList<String> array = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"C.EXAMPLE.COM,1.1.1.3,no,12.1,\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"c.example.com,1.1.1.5,no,12,Case a bit loose\",\n \"e.example.com,1.1.1.6,no,12.3,\",\n \"f.example.com,1.1.1.7,No,12.200,\",\n \"g.example.com,1.1.1.6,no,15.0,Guarded by sharks with lasers on their heads\"\n ));\n ArrayList<String> expResult = new ArrayList<>(Arrays.asList(\n \"A.example.COM,1.1.1.1,NO,11,Faulty fans\",\n \"b.example.com,1.1.1.2,no,13,Behind the other routers so no one sees it\",\n \"d.example.com,1.1.1.4,yes,14,\",\n \"f.example.com,1.1.1.7,No,12.200,\"\n ));\n ArrayList<String> result = BTRouterPatch.removeDuplicates(array);\n assertEquals(expResult, result);\n }",
"void setDupOfSeqObj(List<SeqInfo> seqObjList) {\n\t\tboolean desc=false;\n\t\tCollections.sort(seqObjList, new SeqInfo.CompSeqEncode(desc));\n\t\t//System.out.println(\"Sorted reads: \"+seqObjList.size());\n\t\t//timeStamp=new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t//System.out.println(\"time: \"+timeStamp);\n\t \n\t\tSeqInfo seqObj;\n\t\tSeqInfo seqObj_r0 = null;\n\t\tSeqInfo currSeqObj;\n\t\tSeqInfo currSeqObj2; \n\t List<SeqInfo> querySeqObjList; \n\t\t\n\t int i=0; \n\t int r=0;\n\t //int m=1;\n\t\tfor(int s=0;s<seqObjList.size();s++){\n\t\t currSeqObj=seqObjList.get(s);\t\n\t\t if(!currSeqObj.isDup && currSeqObj.dupNum<0){\n\t\t\t /*\n\t\t\t if((s+1)/500000==m) {\n\t\t\t\ttimeStamp=new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\t\t\tSystem.out.println((s+1)+\" time: \"+timeStamp);\n\t\t\t\tm++;\n\t\t\t }\t\n\t\t\t */\n\t\t\t querySeqObjList=SeqOperation.findSeqObjOfSameEncode(seqObjList,currSeqObj);\n\t\t\t if(querySeqObjList.size()==1) {\n\t\t\t\tcurrSeqObj.isDup=false;\n\t\t\t\tcurrSeqObj.dupNum=0; \n\t\t\t }else if(querySeqObjList.size()>1){\n\t\t\t currSeqObj2=currSeqObj;\n\t\t\t while(currSeqObj2!=null){\t\t \n\t\t\t currSeqObj2=null;\n\t\t\t\t r=0;\n\t\t\t\t i=0;\n\t\t\t\t while(i<querySeqObjList.size()) {\t\n\t\t\t\t seqObj=querySeqObjList.get(i);\t\t \n\t\t\t\t if(seqObj.seq.equalsIgnoreCase(currSeqObj.seq)){\t\t\t\t\n\t\t\t\t\t if(r==0) { \t\t\t\n\t\t\t\t\t seqObj_r0=seqObj;\n\t\t\t\t\t seqObj_r0.isDup=false;\n\t\t\t\t\t }if(r>0) {\t\t\t\t \n\t\t\t\t\t seqObj.isDup=true;\n\t\t\t\t\t seqObj.dupNum=r;\t\n\t\t\t\t\t }\n\t\t\t\t\t seqObj_r0.dupNum=r;\n\t\t\t\t\t querySeqObjList.remove(seqObj);\n\t\t\t\t\t r++;\n\t\t\t\t }else{\n\t\t\t\t\t currSeqObj2=seqObj;\t\n\t\t\t\t\t i++;\t\t\n\t\t\t\t } \t\t \n\t\t\t\t }// while query\n\t\t\t\t if(currSeqObj2!=null) currSeqObj=currSeqObj2;\n\t\t\t }\n\t\t\t }\n\t\t\t querySeqObjList=null;\t \n\t\t }\t \n\t\t}\n\t\t\n\t Collections.sort(seqObjList, new SeqInfo.CompSeqID(desc));\t\n }",
"private Map<ImmutableTriple<String, Long, String>, LocalDateTime> getAllCreatedDateFromSource(\n List<SubmittedVariantEntity> duplicateSves) {\n Map<ImmutableTriple<String, Long, String>, LocalDateTime> targetToSourceCreatedDate = duplicateSves\n .stream().collect(Collectors.toMap(this::getKeyForCreatedDate,\n SubmittedVariantEntity::getCreatedDate,\n (cd1, cd2) -> Collections.min(Arrays.asList(cd1, cd2))));\n\n Map<String, List<SubmittedVariantEntity>> svesBySourceAssembly = duplicateSves\n .stream().collect(Collectors.groupingBy(\n sve -> Objects.isNull(sve.getRemappedFrom()) ? \"\" : sve.getRemappedFrom()));\n\n for (Map.Entry<String, List<SubmittedVariantEntity>> asmAndSves : svesBySourceAssembly.entrySet()) {\n String sourceAsm = asmAndSves.getKey();\n List<SubmittedVariantEntity> svesRemappedFromAsm = asmAndSves.getValue();\n\n // If not remapped, stick with the target created date\n if (sourceAsm.equals(\"\")) {\n continue;\n }\n\n // Otherwise query database for source SVEs with same accession in this assembly to get their created date\n List<Long> targetAccessions = svesRemappedFromAsm\n .stream()\n .map(SubmittedVariantEntity::getAccession)\n .collect(Collectors.toList());\n List<SubmittedVariantEntity> allSourceSvesInAsm = mongoTemplate.find(\n query(where(\"seq\").is(sourceAsm).and(\"accession\").in(targetAccessions)),\n SubmittedVariantEntity.class, collection);\n Map<Long, List<SubmittedVariantEntity>> sourceSvesByAccession = allSourceSvesInAsm\n .stream().collect(Collectors.groupingBy(SubmittedVariantEntity::getAccession));\n\n for (SubmittedVariantEntity sve : svesRemappedFromAsm) {\n List<SubmittedVariantEntity> sourceSves = sourceSvesByAccession.get(sve.getAccession());\n targetToSourceCreatedDate.put(getKeyForCreatedDate(sve), getCreatedDateFromSource(sve, sourceSves));\n }\n }\n\n return targetToSourceCreatedDate;\n }",
"public static void incrDuplicates() { ++duplicates; }",
"protected void removeDuplicates() {\n log.trace(\"Removing duplicated\");\n long startTime = System.currentTimeMillis();\n int initial = size();\n E last = null;\n int index = 0;\n while (index < size()) {\n E current = get(index);\n if (last != null && last.equals(current)) {\n if (log.isTraceEnabled()) {\n log.trace(\"Removing duplicate '\" + current + \"'\");\n }\n remove(index);\n } else {\n index++;\n }\n last = current;\n }\n log.debug(String.format(\"Removed %d duplicates from a total of %d values in %dms\",\n initial - size(), initial, System.currentTimeMillis() - startTime));\n }",
"private static boolean duplicateSetName(String setName){\n boolean duplicate = false;\n for (Set set : SetManager.getInstance().getSets()) {\n if (set.getName() != null) {\n if (set.getName().equals(setName)) {\n duplicate = true;\n }\n }\n }\n return duplicate;\n }",
"private void HaveDuplicate() {\n haveDuplicate = false;\n duplicateCounter = 0;\n try {\n query=\"SELECT * FROM category WHERE category_id = '\"+ txtCategoryNo.getText() +\"' OR category_name = '\"+\n txtCategoryName.getText() + \"'\";\n rset = connection.createStatement().executeQuery(query);\n while (rset.next()) {\n haveDuplicate = true;\n duplicateCounter++;\n }\n\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n\n }",
"private void duplicateTags(Topology topology) {\n // This one pass implementation is dependent on Edges being\n // topologically sorted - ancestor Edges appear before their descendants.\n for (Edge e : topology.graph().getEdges()) {\n Object o = e.getTarget().getInstance();\n if (o instanceof Peek || o instanceof FanOut) {\n duplicateTags(e);\n }\n }\n }",
"public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}",
"private void calculateDuplicate(ArrayList<String> pathList) {\n\n HashMap<String, byte[]> pathMdHashMap = new HashMap<>();\n\n for (int i = 0; i < pathList.size(); i++) {\n\n LinkedHashMap<File, String> uniquePathAndFileHash = new LinkedHashMap<>();\n\n if (pathList.get(i) == null || !(new File(pathList.get(i)).isFile()) || !(new File(pathList.get(i)).exists()))\n continue;\n\n byte[] fileHash1 = Constant.fileHash(new File(pathList.get(i)));\n\n if (fileHash1 == null)\n continue;\n\n for (int j = i + 1; j < pathList.size(); j++) {\n\n String path = pathList.get(j);\n\n if (path == null || !(new File(path).isFile()) || !(new File(path).exists()))\n continue;\n\n byte[] fileHash2;\n\n if (pathMdHashMap.containsKey(path)) {\n fileHash2 = pathMdHashMap.get(path);\n } else {\n fileHash2 = Constant.fileHash(new File(pathList.get(j)));\n pathMdHashMap.put(path, fileHash2);\n }\n\n boolean flag = MessageDigest.isEqual(fileHash1, fileHash2);\n\n if (flag) {\n\n if (!uniquePathAndFileHashCopy.containsValue(pathList.get(i))) {\n uniquePathAndFileHash.put(new File(pathList.get(i)), pathList.get(i));\n }\n\n if (!uniquePathAndFileHashCopy.containsValue(path)) {\n uniquePathAndFileHash.put(new File(path), path);\n }\n }\n }\n\n if (uniquePathAndFileHash.size() > 1) {\n\n index++;\n\n\n LinkedHashMap<Integer, LinkedHashMap<File, String>> similarVideo = new LinkedHashMap<>();\n\n similarVideo.put(index, uniquePathAndFileHash);\n\n similarVideoCopy.put(index, uniquePathAndFileHash);\n\n uniquePathAndFileHashCopy.putAll(uniquePathAndFileHash);\n\n\n new Handler(Looper.getMainLooper()).post(() ->\n responseLiveData.setValue(FileRemoverResponse.success(similarVideo)));\n\n }\n }\n\n }",
"private static Set<String> m23474a(Set<String> set, Set<String> set2) {\n if (set.isEmpty()) {\n return set2;\n }\n if (set2.isEmpty()) {\n return set;\n }\n HashSet hashSet = new HashSet(set.size() + set2.size());\n hashSet.addAll(set);\n hashSet.addAll(set2);\n return hashSet;\n }",
"private void checkDuplicateOfFile(Iterable<FileInfo> files, DuplicateDataDTO data) {\n for(FileInfo nextFile: files) {\n for(FileInfo nextFile2: files) {\n if(nextFile.duplicate(nextFile2)) {\n LOG.info(\"Duplicate - {}\", nextFile);\n\n processDuplicate(nextFile,data);\n }\n }\n }\n }",
"private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }",
"public List<TreeNode> findDuplicateSubtrees(TreeNode root) {\n // like i thought, we can take the advantage of the serialization of the tree node\n // that is how we can put them into the map and check if there already exsit the same serials\n List<TreeNode> ans = new ArrayList<>();\n dfspostorder(root,new HashMap<String,Integer>(),ans);\n return new ArrayList<TreeNode>(ans);\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"private boolean duplicationCheck(String userName) {\n\t\tboolean ret = true;\n\t\tif(obs.isEmpty()) {\n\t\t\tret = true;\n\t\t}\n\t\telse {\n\t\t\tfor(int i=0; i<obs.size(); i++) {\n\t\t\t\tif(obs.get(i).getUserName().compareTo(userName) == 0) {\n\t\t\t\t\tret = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tret = true;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"private SBomCombiner()\n\t{}",
"public void dxDoubleSpeedsDuplicates(String fileName) throws IOException {\n // This method prints all the duplicated DXDoubleSpeeds in the output\n // file.\n\n // concatenate the recorded DXDoubleSpeeds in a string\n ArrayList<String> recordedDXDoubleSpeedsStrings = new ArrayList<String>();\n\n for (Iterator<DXDoubleSpeed> dxDoubleSpeedIterator = dxDoubleSpeeds.iterator(); dxDoubleSpeedIterator\n .hasNext();) {\n recordedDXDoubleSpeedsStrings.add(dxDoubleSpeedIterator.next()\n .toMoRecordString());\n }\n\n ArrayList<String> duplicates = new ArrayList<String>();\n duplicates = saveDuplicates(recordedDXDoubleSpeedsStrings);\n\n // define the header of the output file\n String fileHeader = \"There are \"\n + String.format(\"%s\", duplicates.size()) + \" duplicate(s) \"\n + \"in the input file. The duplicate(s) is(are) :\" + \"\\n\" + \"\\n\";\n\n String recordedDuplicatesStrings = \"\";\n\n // concatenate the recorded DXDoubleSpeed in a string\n for (Iterator<String> it = duplicates.iterator(); it.hasNext();) {\n recordedDuplicatesStrings += it.next() + \"\\n\";\n }\n\n // print the header + DXDoubleSpeed + footer in the output file\n OutputStreamWriter fw = new FileWriter(fileName);\n fw.write(fileHeader + recordedDuplicatesStrings);\n fw.close();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"private Map<Key, Integer> mergeDuplicatedItemsAndDelte0(simpleRingBuffer<byte[]> buff2) {\n\t\t// TODO Auto-generated method stub\n\t\t//Iterator<byte[]> ier0 = buff2.iterator();\t \t\n \n//\t\tMap<Key, Integer> deduplicatedMap = Maps.newLinkedHashMap();\n// \t \t\n//\t\twhile(!buff2.isEmpty()){\n//\t\t\t//delete\n//\t\t\tbyte[] out = buff2.pop();\n//\t\t\t//push to the hash table\n//\t\t\tif(!deduplicatedMap.containsKey( out.key)){\n//\t\t\t\tdeduplicatedMap.put( out.key, out.counter);\t \n//\t\t\t}else{\n//\t\t\t\tdeduplicatedMap.replace(out.key, out.counter+deduplicatedMap.get(out.key));\n//\t\t\t}\n//\t\t}\n//\t\treturn deduplicatedMap;\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n\t\tSet<Puppy> set = new LinkedHashSet<Puppy>(10);\n\t\t\n\t\t// this DS which can hold other object\n\t\tPuppy puppy1=new Puppy(\"Tommy\",10 );\n\t\tPuppy puppy2=new Puppy(\"AHH\", 12);\n\t\tPuppy puppy3=new Puppy(\"MYY\", 5);\n\t\tPuppy puppy4=new Puppy(\"NANY\", 3);\n\t\tPuppy puppy5=new Puppy(\"NANY\", 3);\n\t\t\n\t\t//dog4 and dog5 are duplicate elements\n\t\tset.add(puppy1);\n\t\tset.add(puppy2);\n\t\tset.add(puppy3);\n\t\tset.add(puppy4);\n\t\tset.add(puppy5);\n\t\t\n\t\tSystem.out.println(\"puppy4 . hashCode () = \"+puppy4.hashCode());\n\t\tSystem.out.println(\"puppy5 . hashCode () = \"+puppy5.hashCode());\n\t\t\n\t\tIterator<Puppy> iterator=set.iterator();\n\t\t\n\t\tSystem.out.println(\"Accessing data using Iterator interface!\");\n\t\twhile(iterator.hasNext()){\n\t\t\tPuppy puppy=iterator.next();\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"____________-----\");\n\t\tfor(Puppy puppy:set){\n\t\t\tSystem.out.println(puppy);\n\t\t}\n\t\t\n\t\tPuppy puppy6=new Puppy(\"NANY\", 3);\n\t\t\n\t\tboolean b=set.contains(puppy6);\n\t\tif(b){\n\t\t\tSystem.out.println(\"puppy6 found in set!\"+puppy6);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Run it\");\n\t\t /* final Entry<K,V> getEntry(Object key) {\n\t\t int hash = (key == null) ? 0 : hash(key.hashCode());\n\t\t for (Entry<K,V> e = table[indexFor(hash, table.length)];\n\t\t e != null;\n\t\t e = e.next) {\n\t\t Object k;\n\t\t if (e.hash == hash &&\n\t\t ((k = e.key) == key || (key != null && key.equals(k))))\n\t\t return e;\n\t\t }\n\t\t return null;\n\t\t } */\n\t\t b=set.contains(puppy1);\n\t\tif(b){\n\t\t\tSystem.out.println(b+\"is found in set!\");\n\t\t}\n\t\t\n\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\t TreeSet<String> treeset = new TreeSet<String>();\r\n\t\t treeset.add(\"Good\");\r\n\t\t treeset.add(\"For\");\r\n\t\t treeset.add(\"Health\");\r\n\t\t //Add Duplicate Element\r\n\t\t treeset.add(\"Good\");\r\n\t\t System.out.println(\"TreeSet : \");\r\n\t\t for (String temp : treeset) {\r\n\t\t System.out.println(temp);\r\n\t\t }\r\n\t\t }",
"private String getDuplicateTag(String[] parameters) {\n if (parameters == null) {\n return null;\n }\n Set<String> tags = new HashSet<>();\n for (String param : parameters) {\n String paramTag = param.substring(0, param.indexOf('='));\n if (tags.contains(paramTag)) {\n return paramTag;\n } else {\n tags.add(paramTag);\n }\n }\n return null;\n }",
"public void onDuplicate() {\n }",
"protected boolean allowsDuplicates(Class type) {\n return !Set.class.isAssignableFrom(type);\n }",
"public static ArrayList<String> Externalexp1Sort(ArrayList<String> source)\n throws Exception {\n // file\n // ArrayList<Long> k = new ArrayList<Long>();\n // k.add(0L);\n // k.add(0L);\n // k.add(0L);\n // Long repeat = 0L;\n\n PriorityQueue<KVPair> heap = new PriorityQueue<KVPair>(20,\n new UserPrio());\n ArrayList<CsvReader> readers = new ArrayList<CsvReader>();\n // user_tweets output\n PrintWriter writer = new PrintWriter(new FileWriter(user_tweets));\n\n writer2 = new CsvWriter(new OutputStreamWriter(new FileOutputStream(\n SORT_USER_FN + fileNum + \".csv\"), \"UTF-8\"), ',');\n\n // open files\n for (String fileName : source) {\n // get read csv files\n CsvReader reader = new CsvReader(new InputStreamReader(\n new FileInputStream(fileName), \"UTF-8\"));\n reader.setHeaders(Merge.fields);\n // read a line and put into heap\n if (reader.readRecord()) {\n heap.offer(new KVPair(Merge.readRecord(reader), readers.size()));\n }\n readers.add(reader);\n }\n\n // get same key\n KVPair last = null;\n HashMap<Long, Record> sameRecord = new HashMap<Long, Record>();\n\n while (heap.size() > 0) {\n KVPair tmp = heap.poll();\n\n if (last != null && last.record.userid != tmp.record.userid) {\n writer.println(last.record.userid + \",\" + sameRecord.size());\n\n // print records to file\n writeRecords(sameRecord.values());\n\n sameRecord = new HashMap<Long, Record>();\n\n }\n\n // if (sameRecord.containsKey(tmp.record.tweetid)) {\n // repeat ++;\n // System.out.println(tmp.record.tweetid +\" : \" + repeat);\n // }\n\n sameRecord.put(tmp.record.tweetid, tmp.record);\n\n // read next record in the same file\n if (readers.get(tmp.file).readRecord()) {\n\n // k.set(tmp.file, k.get(tmp.file)+1);\n // System.out.println(k);\n\n heap.offer(new KVPair(Merge.readRecord(readers.get(tmp.file)),\n tmp.file));\n } else {\n readers.get(tmp.file).close();\n }\n last = tmp;\n }\n\n // last part of external sort\n if (sameRecord.size() != 0) {\n writer.println(last.record.userid + \",\" + sameRecord.size());\n\n // print records to file\n writeRecords(sameRecord.values());\n }\n\n writer.close();\n\n writer2.flush();\n writer2.close();\n\n return source;\n }",
"public boolean supportsUnique() {\n \t\treturn true;\n \t}",
"@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }",
"@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }",
"public ArrayList<Affix> removeDuplicateAffix(ArrayList<Affix> affix)\n\t{\n\t\tArrayList<Affix> tempAffix = affix;\n\t\tArrayList<Affix> resultAffix = new ArrayList<Affix>();\n\t\tboolean skip = false;\n\t\tint appearances = 0;\n\n//\t\tfor( int i = 0; i < affix.size(); i++)\n//\t\t{\n//\t\t\tskip = false;\n//\t\t\tfor(int j = 0; j < affix.size(); j++)\n//\t\t\t{\n//\t\t\t\tprintln(\" Comparing \" + tempAffix.get(i).getAffix() + \" and \" + affix.get(j).getAffix() );\n//\t\t\t\tif( skip == true )\n//\t\t\t\t{\n//\t\t\t\t\tbreak;\n//\t\t\t\t}\n//\t\t\t\tif( tempAffix.get(i).getAffix().equalsIgnoreCase(\"\") )\n//\t\t\t\t{\n//\t\t\t\t\tskip = true;\n//\t\t\t\t}\n//\t\t\t\tif( tempAffix.get(i).getAffix().compareTo( affix.get(j).getAffix() ) != 0 && !skip)\n//\t\t\t\t{\n//\t\t\t\t\tprintln(\" Adding2 \" + tempAffix.get(i).getAffix() + \" and \" + affix.get(j).getAffix() );\n//\t\t\t\t\tskip = true;\n//\t\t\t\t\tresultAffix.add(tempAffix.get(i));\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\n\n\n\t\tfor ( int i = 0; i < affix.size(); i++ )\n\t\t{\n\t\t\tskip = false;\n\t\t\tfor( int j = 0; j < tempAffix.size(); j++ )\n\t\t\t{\n\t\t\t\tif( skip == true ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if( tempAffix.get(i).getAffix().equalsIgnoreCase(\"\") && !skip )\n\t\t\t\t{\n\t\t\t\t\tskip = true;\n\t\t\t\t}\n\t\t\t\tif( tempAffix.get(i).getAffix().equalsIgnoreCase( affix.get(j).getAffix() ) && !skip)\n\t\t\t\t{\n\t\t\t\t\tskip = true;\n\t\t\t\t\tappearances++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( appearances == 1) {\n\t\t\t\tresultAffix.add( tempAffix.get(i) );\n\t\t\t}\n\t\t}\n\n\t\treturn resultAffix;\n\t}",
"@ProcessElement\n public void processElement(ProcessContext c) {\n Iterator<String> duplicates = c.element().getValue().iterator();\n\n // Shouldn't really have to check hasNext\n if (duplicates.hasNext()) {\n c.output(duplicates.next());\n }\n }",
"@Override\n public int hashCode() {\n return 0;\n }",
"public static void main(String[] args) {\n\t\tint a[] = {1,2,2,6,7,3,4,4,5,5,6,7};\n\t\t\n\t\t\n\t\tMap<Integer,Integer> map =new HashMap<Integer,Integer>();\n\t\t\n\t\tfor (Integer num :a) {\n\t\t\tInteger Count =map.get(num);\n\t\t\tif(Count==null) {\n\t\t\t\tmap.put(num, 1);\n\t\t\t}else {\n\t\t\t\tmap.put(num, ++Count);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset =map.entrySet();\n\t\tArrayList<Integer> list =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry :entryset) {\n\t\t\tif(entry.getValue()>1) {\n\t\t\t\tlist.add(entry.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Duplicates are \" +list);\n\t\t\n\t\tSet<Entry<Integer, Integer>> entryset1 =map.entrySet();\n\t\tArrayList<Integer> nonduplist =new ArrayList<Integer>();\n\t\tfor(Entry<Integer, Integer> entry1 :entryset1) {\n\t\t\tif(entry1.getValue()==1) {\n\t\t\t\tnonduplist.add(entry1.getKey());\n\t\t\t\t}\n\t\t\t}\n\t\tSystem.out.println(\"Non Duplicates are \" +nonduplist);\n\t\t\n \n}",
"private static void fun2(List<String> ac1, List<List<String>> result, int index) {\n\t\tString key = ac1.get(0);\r\n\t\tfor(int i=index;i<result.size();i++){\r\n\t\t\tList<String> res=result.get(i);\r\n\t\t\tif(res.get(0).equals(key)){\r\n\t\t\t\t//check if any one of the value is repeated\r\n\t\t\t\tboolean check=fun3(res,ac1);\r\n\t\t\t\tif(check){\r\n\t\t\t\t\tfor(int j=1;j<ac1.size();j++){\r\n\t\t\t\t\t\tres.add(ac1.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void testResolvedDuplicate() throws Exception\n {\n String json = MAPPER.writeValueAsString(new DupFieldBean2());\n assertEquals(json, a2q(\"{'z':4}\"));\n }",
"private Combined() {}",
"private boolean allSameClass(List<Instance> instances) {\r\n\r\n\t\tString firstClassFound = (String) instances.get(0).getClassAttribute();//.getAttributes().get(4).getValue();\r\n\t\t// search thru' instances until it finds a different classification to the first one\r\n\t\tfor(Instance ins : instances){\t\t\t\r\n\t\t\t//if(!ins.getAttributes().get(4).getValue().equals(firstClassFound)){\r\n\t\t\tif(!ins.getClassAttribute().equals(firstClassFound)){\r\n\t\t\t\treturn false;\t\t\t\t\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\treturn true;\r\n\t}",
"private TileSet rebuildList(Map<Integer, List<Tile>> index) {\n\t\tTileSet tileset = new TileSet();\n\t\tfor (List<Tile> list : index.values()) {\n\t\t\tfor (Tile tile : list) {\n\t\t\t\tboolean isUnique = true;\n\t\t\t\tfor (Tile uTile : tileset) {\n\t\t\t\t\tif (tile == uTile) {\n\t\t\t\t\t\tisUnique = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isUnique) {\n\t\t\t\t\ttileset.add(tile);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tileset;\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 }",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n \t // create a HashSet using a collection as parameter\r\n \t Set< String > set = new HashSet< String >( collection );\r\n \t System.out.println( \"Nonduplicates are: \" );\r\n \t for ( String s : set )\r\n \t\t System.out.printf( \"%s \", s );\r\n \t System.out.println();\r\n \t }",
"public static void main(String[] args) {\n Set<Integer> S1 = new TreeSet<>();\r\n // add objects\r\n S1.add(65); S1.add(36); S1.add(24); S1.add(36);\r\n \r\n // show the content and assert they are sorted and no duplications\r\n System.out.println(\"set = \" + S1); \r\n //remove elements\r\n S1.remove(36); S1.remove(24);\r\n System.out.println(S1); //assert set = 65\r\n S1.add(15); S1.add(24); S1.add(80); // add 15, 24, 80\r\n System.out.println(\"set = \" +S1); //assert set = 15, 24, 65, 80\r\n \r\n System.out.println(\"Does S1 contain 10?\"\r\n + S1.contains(10)); // assert false\r\n System.out.println(\"S1 has \" + S1.size() +\" objects\"); // assert 4\r\n\r\n // create another Set object implemented using HashSet\r\n Set<Integer> S2 = new HashSet<>();\r\n // add all objects in S1 to S2\r\n S2.addAll(S1);\r\n System.out.println(\"hashset = \" +S2); //assert they may not be ordered\r\n\r\n // create another Set object implemented using LinkedHashSet\r\n Set<Integer> S3 = new LinkedHashSet<>();\r\n S3.add(150); // add 150\r\n S3.addAll(S1);// add all objects in S1 to S2\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[150,15,24,65,80]\r\n \r\n S3.removeAll(S3); // remove all items\r\n System.out.println(\"LinkedHashSet = \" +S3);//assert s3=[]\r\n }",
"@Override\r\n public int hashCode() {\r\n return doc1.hashCode() + doc2.hashCode();\r\n }",
"public boolean hasDuplicates(boolean ignoreWhenIdentical) {\n boolean compareJustClassNames = !ignoreWhenIdentical;\n if (compareJustClassNames) {\n return list.size() > 1;\n }\n\n if (list.size() <= 1) {\n return false;\n }\n\n String previousHash = list.get(0).getHash();\n for (int i = 1; i < list.size(); i++) {\n String currentHash = list.get(i).getHash();\n if (!previousHash.equals(currentHash)) {\n return true;\n }\n }\n\n log.debug(\"ignoring duplicates of class \" + classFilePath + \" since the bytecode matches exactly\");\n\n return false;\n }",
"private SAMRecord markDuplicatesAndGetTheNextAvailable() {\n\n // Check if there are any we can flush output buffer\n { // NB: braces to limit the scope of 'record'\n final SAMRecord record = flush();\n if (null != record) return record;\n }\n\n // Check if there are any more records to read in\n if (!backingIterator.hasNext()) { // no more records to read in\n\n // Check if there are any more to mark\n if (toMarkQueue.isEmpty()) {\n // check if there are any that can be outputted\n if (outputBuffer.isEmpty()) {\n return null;\n } // no need to flush; no records in the queue and buffer\n } else {\n // force marking duplicates on the remaining records\n tryPollingTheToMarkQueue(true, null);\n }\n\n /* Since we have no more records to read in, and no more records that need duplicate marking run, we\n update our coordinate to past the end of the reference\n */\n referenceIndex = header.getSequenceDictionary().getSequences().size();\n\n /* Now we recurse, so that we can flush from the outputBuffer until it is empty, then return null when\n * all of the input, queue, and buffer are empty */\n return markDuplicatesAndGetTheNextAvailable();\n }\n\n /* We need to retrieve more records from the input iterator and duplicate mark, until we can return one that\n * has been through duplicate marking.\n */\n while (backingIterator.hasNext()) {\n\n // NB: we could get rid of this if we made nextRecord into a list...\n // NB: we do not actually remove this record from the backing iterator until much later, to help with processing unmapped reads at the EOF\n SAMRecord record = backingIterator.peek(); // peek: used for unmapped reads\n final SamRecordWithOrdinal samRecordWithOrdinal = new SamRecordWithOrdinalAndSetDuplicateReadFlag(record, backingIteratorRecordIndex);\n\n ReadEndsForMateCigar readEnds = null;\n boolean performedChunkAndMarkTheDuplicates = false;\n\n // remove duplicate information\n record.setDuplicateReadFlag(false);\n\n /* Check for pairs that have both ends mapped and missing mate cigar. */\n if (ignoreDueToMissingMateCigar(samRecordWithOrdinal)) {\n continue;\n }\n\n // check for an unmapped read\n if (record.getReadUnmappedFlag()) {\n // unmapped reads at the end of the file!\n if (-1 == record.getReferenceIndex()) {\n // NB: this may call markDuplicatesAndGetTheNextAvailable if this is the first time a EOF unmapped record has been seen\n return nextIfRecordIsUnmappedAtEOF(record);\n } else if (!record.isSecondaryOrSupplementary()) {\n // update metrics\n final DuplicationMetrics metrics = getMetrics(record);\n ++metrics.UNMAPPED_READS;\n }\n // we will check for unmapped reads later so as not to add them to mark queue\n } else {\n // If not already set, this sets the minimum distance to twice the read length, or 100, whichever is larger\n if (-1 == toMarkQueue.getToMarkQueueMinimumDistance()) {\n // use twice the first read's length\n toMarkQueue.setToMarkQueueMinimumDistance(Math.max(2 * record.getReadBases().length, 100));\n }\n\n // build a read end for use in the toMarkQueue\n readEnds = new ReadEndsForMateCigar(header, samRecordWithOrdinal, opticalDuplicateFinder, libraryIdGenerator.getLibraryId(samRecordWithOrdinal.getRecord()));\n\n // check that the minimumDistance was not too small\n checkForMinimumDistanceFailure(readEnds);\n\n /*\n * If we can do some duplicate marking, lets do it!\n * IMPORTANT: this does not flush the to-mark-queue, so the minimum distance needs to be set for us to infer\n * which records will never be supplemented (i.e. are non-duplicate).\n */\n performedChunkAndMarkTheDuplicates = tryPollingTheToMarkQueue(false, readEnds);\n }\n\n // We can now remove the record from the input\n backingIterator.next();\n\n // Add this to the outputBuffer so it can be tracked. It will not be available to emit until it has been through duplicate marking.\n addRecordToTheOutputBuffer(samRecordWithOrdinal);\n backingIteratorRecordIndex++; // Each record is has an index and is emitted in the same order. This helps that.\n\n // We do not consider secondary, supplementary, or unmapped alignments for duplicate marking. We can thus mark that duplicate marking on them has been completed.\n final DuplicationMetrics metrics = getMetrics(record);\n if (record.isSecondaryOrSupplementary() || record.getReadUnmappedFlag()) {\n outputBuffer.setResultState(samRecordWithOrdinal, false);\n if(record.isSecondaryOrSupplementary()){\n ++metrics.SECONDARY_OR_SUPPLEMENTARY_RDS;\n }\n } else {\n // Bring the simple metrics up to date\n if (!record.getReadPairedFlag() || record.getMateUnmappedFlag()) {\n ++metrics.UNPAIRED_READS_EXAMINED;\n } else {\n ++metrics.READ_PAIRS_EXAMINED; // will need to be divided by 2 at the end\n }\n\n // Add the record for duplicate marking, which may in fact cause it to be duplicate marked or stored for later\n toMarkQueue.add(readEnds, outputBuffer, getMetrics(readEnds.getRecord()));\n }\n\n // Check if there are any we can flush, which happens if we just performed duplicate marking\n if (performedChunkAndMarkTheDuplicates) {\n record = flush();\n if (null != record) return record;\n }\n }\n\n // try again, as we may have records we can flush, or we want to see if we are at the EOF\n return markDuplicatesAndGetTheNextAvailable();\n }",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"static boolean isDuplicated(String mac) {\n for (DeviceDetail detail : deviceDetails) {\n if (detail.macAddress.equals(mac)) {\n return true;\n }\n }\n return false;\n }",
"private List<SuperSetterBasedBuilderField> deduplicateByName(List<SuperSetterBasedBuilderField> fields) {\n List<SuperSetterBasedBuilderField> result = new ArrayList<>();\n for (SuperSetterBasedBuilderField field : fields) {\n if (!alreadyContainsField(result, field)) {\n result.add(field);\n }\n }\n return result;\n }",
"@Override\n public int hashCode() { \n return this.toString().hashCode();\n }",
"private List<String> rmDupInfo(List<String> fields) {\n Set<String> seen = new HashSet<>();\n List<String> uniqueNonEmptyFields = new ArrayList<>();\n for (String i : fields) {\n if (i.isEmpty() || i.equals(\".\")) {\n continue;\n } else {\n String fieldName = i.split(\"=\")[0];\n if (!seen.contains(fieldName)) {\n uniqueNonEmptyFields.add(i);\n seen.add(fieldName);\n }\n }\n }\n return uniqueNonEmptyFields;\n }",
"public void addCount() {\n \t\tdupCount++;\n \t}",
"public static void main(String[] args) {\n ArrayList<Integer> nums = new ArrayList<>();\n nums.addAll( Arrays.asList(100, 2000, 50, 50, 100, 200, 300, 50));\n nums=new ArrayList<>(new TreeSet<>(nums));\n System.out.println(nums);\n\n String str1 = \"babababC\";\n str1 = new TreeSet<>( Arrays.asList(str1.split(\"\")) ).toString();\n System.out.println(str1);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - 2. Write a program that can REMOVE THE DUPLICATES from an ArrayList. DO NOT change the ORDER\n * -> LinkedHashSet -> Remove Duplicates and Keeps the Insertion Order\n */\n ArrayList<Integer> list = new ArrayList<>(Arrays.asList(6,6,6,6,5,5,5,4,4,4,4));\n list=new ArrayList<>(new LinkedHashSet<>(list));\n System.out.println(list);\n\n\n /**\n * - 1. Write a program that can remove the duplicated characters from String and store them into variable\n */\n String str = \"ABABABCDEF\";\n String[] arr = str.split(\"\");\n str = new LinkedHashSet<>(Arrays.asList(arr)).toString().replace(\", \", \"\");\n System.out.println(str);\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * -> Does not accept duplicates, and sort the objects\n * -> HashSet accepts null\n * -> HashSet is faster than TreeSet\n */\n HashSet<Integer> numbers = new HashSet<>(Arrays.asList(10,9,10, 9, 8, 7, 8, 7, 6, 5, 6, 1));\n System.out.println(numbers ); // -> [1, 5, 6, 7, 8, 9, 10]\n\n\n System.out.println(\"=========================================================================================\");\n\n /**\n * - ITERATOR: -> is the only way to remove duplicates from collection\n * - removeIf -> removes numbers because it is uses the iterator interface internally. Iterator implicitly\n *\n * - hasNext() method only can go forward cant go backward. it stars from next index\n * - when we use it our loop hasNext() iterates from the next index\n * - iterator(); - hasNext(); - next(); - remove();\n */\n ArrayList<Integer> list2 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n list2.removeIf( p -> p < 4 );\n System.out.println(list2);\n\n\n ArrayList<Integer> list3 = new ArrayList<>(Arrays.asList(1,1,2,2,3,3,4,4,5,5));\n Iterator<Integer> it =list3.iterator(); // - this method will return iterator\n while( it.hasNext() ){ // - iterator explicitly. While loop only accept boolean\n if( it.next() < 4 ){\n it.remove();\n }\n }\n System.out.println(list3);\n\n\n ArrayList<Integer> list4 = new ArrayList<>(Arrays.asList(1,1,2,3,3,4,4,5,5));\n // - hasNext(); will iterate all the indexes. We do not need extra iterator in the loop\n for(Iterator<Integer> I = list4.iterator(); I.hasNext(); ){\n if( I.next() < 4) {\n I.remove();\n }\n }\n System.out.println(list4);\n\n\n\n LinkedHashSet<String> names = new LinkedHashSet<>();\n names.addAll(Arrays.asList( \"Mehmet\",\"Mohammed\",\"Yucel\",\"Sha\",\"Ozgur\", \"Ahmet\",\"Osmanj\",\"Ozgur\",\"Ozgur\",\"Irina\"));\n System.out.println(names);\n Iterator<String> it3 = names.iterator();\n while( it3.hasNext() ){\n String s = it3.next();\n if(s.contains(\"m\") || s.contains(\"M\")){ // - s.toLowerCase.contains(\"m\")\n it3.remove();\n }\n }\n System.out.println(names);\n\n /*\n ===============================================================\n for(Iterator<String> it3 = names.iterator(); it3.hasNext() ; ){\n String s = it3.next();\n if(s.toLowerCase().contains(\"m\")){\n it3.remove();\n }\n }\n ================================================================\n names.removeIf( s -> s.contains(\"m\") || s.contains(\"M\") );\n ================================================================\n names.removeAll( Arrays.asList( \"Mehmet\", \"Ozgur\", \"Mohammed\" ));\n ================================================================\n names.retainAll( Arrays.asList( \"Yucel\", \"Sha\", \"Ahmet\" ) );\n ================================================================\n boolean result = list.containsAll( Arrays.asList(5, 6, 9, 8, 11 ));\n */\n\n\n\n\n\n\n\n System.out.println(\"=========================================================================================\");\n\n\n\n\n\n }",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\n public final int hashCode() {\n return super.hashCode();\n }",
"public synchronized void addUniqueMultiple(List<kelondroRow.Entry> rows) throws IOException {\n TreeMap<Integer, byte[]> indexed_result = super.addMultiple(rows);\r\n // indexed_result is a Integer/byte[] relation\r\n // that is used here to store the index\r\n Iterator<Map.Entry<Integer, byte[]>> i = indexed_result.entrySet().iterator();\r\n Map.Entry<Integer, byte[]> entry;\r\n while (i.hasNext()) {\r\n entry = i.next();\r\n index.puti(entry.getValue(), entry.getKey().intValue());\r\n }\r\n assert this.size() == index.size() : \"content.size() = \" + this.size() + \", index.size() = \" + index.size();\r\n \t\t\r\n }",
"public static void main(String[] args) {\n\t\tA1 a1=new A1(\"ram\",1,\"ram\");\n\t\tA1 a2=new A1(\"ram\",1,\"ram\");\n\t\tHashSet<A1> set=new HashSet<A1>();\n\t System.out.println(a1.getName());\n\t System.out.println(a2.getName());\n\t set.add(a1);\n\t set.add(a2);\n\t System.out.println(set.size());\n\t}",
"private void printNonDuplicates( Collection< String > collection )\r\n {\r\n // create a HashSet \r\n Set< String > set = new HashSet< String >( collection ); \r\n\r\n System.out.println( \"\\nNonduplicates are: \" );\r\n\r\n for ( String s : set )\r\n System.out.printf( \"%s \", s );\r\n\r\n System.out.println();\r\n }",
"void modusponens(){\n\t\tHashMap<String,HashSet<Hypothesis> > temp_lhs_hypo = new HashMap<String,HashSet<Hypothesis> >();\n\t\tHashSet<Hypothesis> new_hypos = new HashSet<Hypothesis>();\n\t\t\n\t\t//Utils.println(\"hypothesis list\");\n\t\tIterator it = hypothesis.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t String A = (String)pairs.getKey();\n\t //Utils.println(\"hypothesis A : \"+A);\n\t HashSet<Hypothesis> A_B = new_lhs_hypo.get(A);\n\t if(A_B == null) {\n\t \t//Utils.println(\"No match\");\n\t \tcontinue;\n\t \t}\n\t else{\n\t \t//Utils.println(\"Matched: \"+A_B.size());\n\t \tIterator bit = A_B.iterator();\n\t \twhile (bit.hasNext()) {\n\t \t Hypothesis A_B_hypo = (Hypothesis)bit.next();\n\t\t \tHypothesis mp_hypo = makeHypothesis(A_B_hypo.rhs, 1, -1, A, A_B_hypo.expression);\n\t\t \tif(mp_hypo!=null) {\n\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t \t\t//Utils.println(\"Existing MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t \t\t//already existing\n\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t \t//Utils.println(\"New MP result: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t\t\t }\n\t\t \t}else{\n\t\t \t\t//Utils.println(\"MP Not Valid: \"+A_B_hypo.rhs+\" on \"+A+\" and \"+A_B_hypo.expression);\n\t\t \t}\n\t\t }\n\t }\n\t }\n\t \n\t //Utils.println(\"new hypothesis list\");\n\t it = new_lhs_hypo.entrySet().iterator();\n\t while (it.hasNext()) {\n\t Map.Entry pairs = (Map.Entry)it.next();\n\t HashSet<Hypothesis> hypos = (HashSet<Hypothesis>) pairs.getValue();\n\t Iterator<Hypothesis> Ait = hypos.iterator();\n\t while(Ait.hasNext()){\n\t \tString A = ((Hypothesis)Ait.next()).expression;\n\t \t//Utils.println(\"hypothesis A : \"+A);\n\t \tHashSet<String> B_set = lhs_hypo.get(A);\n\t \tif(B_set == null){\n\t \t\t//Utils.println(\"No match\");\n\t \t\tcontinue;\n\t \t\t}\n\t \telse{\n\t \t\t//Utils.println(\"Matched: \"+B_set.size());\n\t \t\tIterator Bit = B_set.iterator();\n\t\t \twhile(Bit.hasNext()){\n\t\t \t\tString B_str = (String) Bit.next();\n\t\t \t\tString A_B_exp = Utils.expression(A, B_str);\n\t\t \t\tHypothesis mp_hypo = makeHypothesis(B_str, 1, -1, A, A_B_exp);\n\t\t \t\tif(mp_hypo!=null) {\n\t\t\t \t\tnew_hypos.add(mp_hypo);\n\t\t\t\t \tif(hypothesis.containsKey(mp_hypo.expression)) {\n\t\t\t\t \t\t//Utils.println(\"Existing MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t \t\t//already existing\n\t\t\t\t\t }else{// new hypothesis has resulted\n\t\t\t\t\t \t//Utils.println(\"New MP result: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t\t\t }\n\t\t\t \t}else{\n\t\t\t \t\t//Utils.println(\"MP Not Valid: \"+B_str+\" on \"+A+\" and \"+A_B_exp);\n\t\t\t \t}\n\t\t \t}\n\t \t}\n\t \t\n\t }\n\t }\n\t \n\t //Utils.println(\"Size of new_hypos: \"+new_hypos.size());\n\t \n\t Iterator<Hypothesis> hit = new_hypos.iterator();\n\t while(hit.hasNext()){\n\t \tHypothesis mp_hypo = hit.next();\n\t \tboolean b = insertHypothesis(mp_hypo);\n\t \tif(b){\n\t \t\tHashSet<Hypothesis> temp_hypos = temp_lhs_hypo.get(mp_hypo.lhs);\n\t \tif(temp_hypos == null){\n\t \t\ttemp_hypos = new HashSet<Hypothesis>();\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t\ttemp_lhs_hypo.put(mp_hypo.lhs, temp_hypos);\n\t \t}else{\n\t \t\ttemp_hypos.add(mp_hypo);\n\t \t}\n\t \t//Utils.printHypothesis(mp_hypo);\n\t \t}\n\t }\n\t \n\n\t //Utils.println(\"Size of temp_lhs_hypo: \"+temp_lhs_hypo.size());\n\t \n\t new_lhs_hypo.clear();\n\t new_lhs_hypo = temp_lhs_hypo;\n\t if(new_lhs_hypo.size()!=0) modusponens();\n\t}",
"public static void main(String[] args) {\n countDuplicateCharacters(\"My name is Fernando\");\n\n //2. Reverse an Arraylist.\n reverseArrayList();\n\n //3. Check if a particular key exists in HashMap.\n //4. Convert keys of a map to a list.\n checkKeyAndCreateList();\n\n //5. Copy all elements of a HashSet to an Object array.\n hashToObject();\n\n //6. Get highest and lowest value stored in TreeSet\n maxAndMinValueTreeSet();\n\n //7. Sort ArrayList of Strings alphabetically.\n sortArrayList();\n\n //8. Get Set view of keys from HashTable.\n getViewsHashTable();\n\n }",
"public interface EntityAddManager {\r\n\r\n /**\r\n * Save entity/address/phone number/entity_class\r\n *\r\n * @param inputRecord\r\n * @return\r\n */\r\n EntityAddInfo saveEntity(Record inputRecord);\r\n\r\n /**\r\n * Validate county code for premise address and save entity data.\r\n * Save activity history if necessary:\r\n *\r\n * @param inputRecord\r\n * @param shouldSaveActivityHist\r\n * @return\r\n */\r\n EntityAddInfo validateAddrAndSaveEntity(Record inputRecord, boolean shouldSaveActivityHist);\r\n\r\n /**\r\n * Save activityHistory after adding entity\r\n *\r\n * @param inputRecord\r\n */\r\n void saveActivityHistForAddEntity(Record inputRecord);\r\n\r\n\r\n /**\r\n * Converts an XML document with data about possible duplicate entities to an\r\n * ArrayList of Strings.\r\n *\r\n * Xml doc is in the following format:\r\n * <duplicates>\r\n * <duplicate>\r\n * <entityPK><![CDATA[1049344]]></entityPK>\r\n * <clientID><![CDATA[AH1043]]></clientID>\r\n * <taxID><![CDATA[999999999]]></taxID>\r\n * <fullName><![CDATA[Wood, Thomas F,]]></fullName>\r\n * <addr1><![CDATA[]]></addr1>\r\n * <addr2><![CDATA[]]></addr2>\r\n * <cityState><![CDATA[Somewhere, MA]]></cityState>\r\n * <zipcode><![CDATA[]]></zipcode>\r\n * <license><![CDATA[]]></license>\r\n * <email><![CDATA[]]></email>\r\n * </duplicate>\r\n *</duplicates>\r\n *\r\n * @param xmlDoc XML document with duplicates.\r\n * @param includeDupTaxID Whether or not to include tax ID with entity duplicates info.\r\n * @return List<String> - String list for duplicate entities. String will be in format like\r\n * Full name: Wood, Thomas F, - Client ID: AH1043 - Tax ID: 999999999 - City, State: Somewhere, MA\r\n */\r\n List<String> getEntityDupListFromXMLDoc(Document xmlDoc, boolean includeDupTaxID);\r\n\r\n}",
"private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }",
"public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }",
"public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }",
"public void testEquals() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeries s1b = new TaskSeries(\"S\");\n s1b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2b = new TaskSeries(\"S\");\n s2b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c2 = new TaskSeriesCollection();\n c2.add(s1b);\n c2.add(s2b);\n }",
"@Override\r\n\t\tpublic int hashCode() {\n\t\t\treturn 0;\r\n\t\t}",
"@Override\r\n public Integer countingDuplicates(String match) {\r\n if(duplicates == null) { // if it's not already located\r\n duplicates = new HashMap<>();\r\n for (Core str : pondred) {\r\n for (String term:str.abstractTerm){\r\n if (duplicates.containsKey(term) )\r\n duplicates.put(term, duplicates.get(term) + 1);\r\n else {\r\n duplicates.put(term, 1);\r\n }\r\n }\r\n }\r\n }\r\n return duplicates.get(match);\r\n }",
"private boolean isEqual(Iterator<?> instance, OasisList<?> baseList) {\n\n boolean equal = true;\n int i = 0;\n while (instance.hasNext()) {\n if (!baseList.get(i++).equals(instance.next())) {\n equal = false;\n break;\n }\n }\n\n return equal;\n }",
"public void duplicate() {\n System.out.println(\"Je bent al in bezit van deze vragenlijst!\");\n }",
"private String checkDuplicateName(List<VMResource> result, String fileName, Extension extension, int index) {\n String childFileName = fileName;\n int num = index;\n if (num > 0) {\n childFileName = fileName + num;\n }\n boolean isAlreadyExist = false;\n for (VMResource resource : result) {\n if (resource instanceof VMFile) {\n VMFile file = (VMFile) resource;\n if (file.getName().equals(childFileName) && file.getExtension().equals(extension)) {\n isAlreadyExist = true;\n break;\n }\n }\n }\n if (isAlreadyExist) {\n childFileName = checkDuplicateName(result, fileName, extension, ++num);\n }\n return childFileName;\n }",
"boolean isIsUnique();",
"public static void main(String[] args) {\nLinkedHashSet<String> name_set=new LinkedHashSet<String>();\nname_set.add(\"John\");\nname_set.add(\"Fletcher\");\nname_set.add(\"Kirill\");\nname_set.add(\"Kowing\");\n//Adding same Record again to Linked Hash Set , will not add duplicate record\nname_set.add(\"John\");\nSystem.out.println(\" Record Set\"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Johncena : \"+name_set.contains(\"Johncena\"));\nname_set.remove(\"Kowing\");\nSystem.out.println(\"-----------------------------------------------\");\n\nSystem.out.println(\"Updated Record Set: \"+name_set);\nSystem.out.println(\"Size of the Set: \"+name_set.size());\nSystem.out.println(\"Set Contains Kirill: \"+name_set.contains(\"Kirill\"));\nSystem.out.println(\"Set Contains Kowing : \"+name_set.contains(\"Kowing\"));\n\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"public void HashsetBasicExanple() {\n\t\t\n\t\tHashSet<String> hs = new HashSet<String>();\n\t\ths.add(\"Sudha\");\n\t\ths.add(\"Yog\");\n\t\ths.add(\"Sathya\");\n\t\ths.add(\"Sadhana\");\n\t\ths.add(null);\n\t\ths.add(\"Aadhav\");\n\t\ths.add(\"Yog\");\n\t\t\n\t\t//Insertion order is not mainted and duplicate value is not allowed.\n\t\tSystem.out.println(hs);//[Yog, null, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.contains(null));//true\n\t\t\n\t\ths.remove(null);\n\t\tSystem.out.println(hs);//[Yog, Sudha, Sathya, Aadhav, Sadhana]\n\t\t\n\t\tHashSet<String> hs1 = new HashSet<String>();\n\t\ths1.add(\"a\");\n\t\ths1.add(\"b\");\n\t\ths1.add(\"c\");\n\t\ths1.add(\"e\");\n\t\tSystem.out.println(hs1);//[a, b, c, e]\n\t\t\n\t\ths.addAll(hs1);\n\t\tSystem.out.println(hs);//[Yog, a, b, Sudha, c, Sathya, e, Aadhav, Sadhana]\n\t\t\n\t\tSystem.out.println(hs.containsAll(hs1));//true\n\t\t\n\t\t\n\t\t//Iterator using iterator\n\t\t\n\t\tIterator<String> iterator = hs.iterator();\n\t\twhile(iterator.hasNext()) {\n\t\tSystem.out.println(\"Iterate using Iterator \" + iterator.next());\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tHashSet<String> obj = new HashSet<String>();\n\t\t\n\t\tobj.add(\"Apple\");\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\t//adding duplicate elements\n\t\tobj.add(\"Mango\");\n\t\tobj.add(\"Grapes\");\n\t\t\n\t\tobj.add(null);\n\t\tobj.add(null);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\t\t\t\n\t}",
"private void copySTLs()\n\t{\n\t\tint u = 0;\n\t\tfor(int i = 0; i < astl.size(); i++)\n\t\t{\n\t\t\tfor(int subMod1 = 0; subMod1 < astl.get(i).size(); subMod1++)\n\t\t\t{\n\t\t\t\tString s = astl.get(i).fileItCameFrom(subMod1);\n\t\t\t\tastl.get(i).setUnique(subMod1, u);\n\t\t\t\tfor(int j = 0; j < i; j++)\n\t\t\t\t{\n\t\t\t\t\tfor(int subMod2 = 0; subMod2 < astl.get(j).size(); subMod2++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(s.equals(astl.get(j).fileItCameFrom(subMod2)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tastl.get(i).setUnique(subMod1, astl.get(j).getUnique(subMod2));\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(astl.get(i).getUnique(subMod1) == u)\n\t\t\t\t{\n\t\t\t\t\tcopyFile(s, rfoDir + stlName(u));\n\t\t\t\t\tu++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t}"
] | [
"0.60114664",
"0.57431746",
"0.56449807",
"0.55998313",
"0.5587534",
"0.55460954",
"0.55074614",
"0.5464166",
"0.54353034",
"0.54114395",
"0.53600955",
"0.534453",
"0.5287509",
"0.5287321",
"0.5274732",
"0.52571183",
"0.52565444",
"0.52393967",
"0.5236257",
"0.5232509",
"0.52214473",
"0.52057755",
"0.51993316",
"0.5190761",
"0.51903516",
"0.5178427",
"0.51596326",
"0.51557755",
"0.5150898",
"0.51436317",
"0.5120344",
"0.51146454",
"0.51146454",
"0.51146454",
"0.51146454",
"0.5104425",
"0.510388",
"0.5101698",
"0.5100483",
"0.509957",
"0.5097538",
"0.5097374",
"0.5076301",
"0.5070671",
"0.5067821",
"0.5066961",
"0.5045341",
"0.5040571",
"0.503634",
"0.50297487",
"0.50285476",
"0.50277233",
"0.5020579",
"0.50107306",
"0.50088096",
"0.50083005",
"0.49997824",
"0.4997002",
"0.4996621",
"0.4995958",
"0.4991057",
"0.49906012",
"0.49897155",
"0.4974946",
"0.4971224",
"0.49701563",
"0.49669638",
"0.4963431",
"0.4963431",
"0.4963431",
"0.49534002",
"0.4951093",
"0.4950006",
"0.4944998",
"0.493957",
"0.4937991",
"0.49367532",
"0.4935628",
"0.4931305",
"0.4927901",
"0.49267888",
"0.49211803",
"0.49158275",
"0.4905252",
"0.49041653",
"0.49023712",
"0.49003023",
"0.4900126",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.489923",
"0.48985326",
"0.4896163",
"0.4891181"
] | 0.0 | -1 |
TODO working on it | public static int deleteFriendRequest(int myid, int requestid){
try {
Statement st = conn.createStatement();
String sqlString = String.format("UPDATE users SET friendreq = array_remove(friendreq, '%d') WHERE userid=%d;", requestid, myid);
st.execute(sqlString);
st.close();
return SUCCESS;
}catch (SQLException e){
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void strin() {\n\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\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 anular() {\n\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private void getStatus() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"private void kk12() {\n\n\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public void identify() {\n\n\t}",
"public void method_4270() {}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"private static void iterator() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"public void mo38117a() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tprotected void parseResult() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tprotected void processInit() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void parseData() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"public void mo4359a() {\n }",
"public abstract void mo70713b();",
"private void m50366E() {\n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\n }",
"@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\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n void init() {\n }",
"protected void mo6255a() {\n }"
] | [
"0.56442004",
"0.5567495",
"0.5546923",
"0.5523479",
"0.5502171",
"0.546509",
"0.54558957",
"0.54297566",
"0.541737",
"0.53996485",
"0.5358301",
"0.53529567",
"0.5322165",
"0.5288107",
"0.5288107",
"0.52779657",
"0.52732706",
"0.5251013",
"0.5244994",
"0.520692",
"0.51990664",
"0.5191811",
"0.5179316",
"0.51619834",
"0.5154743",
"0.5144755",
"0.5127174",
"0.5121387",
"0.51200426",
"0.51149505",
"0.51117927",
"0.51106703",
"0.50977784",
"0.5085566",
"0.5061894",
"0.5060623",
"0.50529236",
"0.5051807",
"0.50508624",
"0.5044564",
"0.5044564",
"0.50443006",
"0.5034863",
"0.50315183",
"0.50315183",
"0.50280064",
"0.50100404",
"0.50056064",
"0.5003317",
"0.49992135",
"0.49901363",
"0.49840274",
"0.497738",
"0.497738",
"0.497738",
"0.497738",
"0.497738",
"0.4968087",
"0.4968087",
"0.4968087",
"0.4962463",
"0.49610788",
"0.49582452",
"0.49571615",
"0.49534068",
"0.49495587",
"0.49475536",
"0.49441317",
"0.49441317",
"0.49401474",
"0.49326256",
"0.49324515",
"0.49282798",
"0.4922815",
"0.4922528",
"0.49196905",
"0.49196905",
"0.49196905",
"0.49196905",
"0.49196905",
"0.49196905",
"0.49165934",
"0.4915199",
"0.49147508",
"0.49132246",
"0.4912353",
"0.49123287",
"0.49099585",
"0.49071348",
"0.49062276",
"0.49047697",
"0.4898358",
"0.4898358",
"0.4898358",
"0.4898186",
"0.489343",
"0.48891556",
"0.4886963",
"0.48851117",
"0.4881281",
"0.4877567"
] | 0.0 | -1 |
get task info in new IndvInvite | public static String getNewInvite(int userId){
try {
Statement st = conn.createStatement();
String getNewInvite = "select newtaskinvite from users where userid = " + userId;
ResultSet newIndvInviteResult = st.executeQuery(getNewInvite);
if(newIndvInviteResult.next()){
Long[] newIndvTaskIds = (Long[]) newIndvInviteResult.getArray(1).getArray();
newIndvInviteResult.close();
String newIndvTasks = Arrays.toString(newIndvTaskIds);
int last = newIndvTasks.length() - 1;
newIndvTasks = newIndvTasks.substring(1, last);
JSONArray jsonArray = new JSONArray();
//if there is no new invitation, return empty string
if(newIndvTasks.length() == 0) {
return jsonArray.toString();
}
String getInviteTaskInfo = "select * from grouptask where taskid in ( " + newIndvTasks + ")";
ResultSet inviteTaskInfoResult = st.executeQuery(getInviteTaskInfo);
String[] jasonIds =
{"taskid", "creatorid", "taskname", "repetition","frequency", "deadline", "member", "taskicon"};
String[] columnName =
{"taskid", "creatorid", "taskname", "repetition","frequency", "deadline", "member", "taskicon"};
while(inviteTaskInfoResult.next()) {
JSONObject jObj = new JSONObject();
for(int c = 0; c < 8; c++) {
jObj.put(jasonIds[c], inviteTaskInfoResult.getObject(columnName[c]));
}
jsonArray.put(jObj);
}
st.close();
return jsonArray.toString();
} else {
return "failure";
}
}catch (SQLException e){
return "failure";
//or some universal error control
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"List<Task> getTaskdetails();",
"public Task gatherTaskInfo() {\n \t\n \tString title;\n \t\n \tEditText getTitle = (EditText)findViewById(R.id.titleTextBox);\n \t//EditText itemNum = (EditText)findViewById(R.id.showCurrentItemNum);\n \t \t\n \t//gathering the task information\n \ttitle = getTitle.getText().toString();\n\n \t//validate input \n \tboolean valid = validateInput(title);\n \t\n \t//if valid input and we have the properties create a task and return it\n \tif(valid && propertiesGrabbed) {\n \t\t\n\t \t//creating a task\n\t \tTask t = new TfTask();\n\t \tt.setTitle(title);\n\t \t\n\t \t//setting the visibility enum\n\t \tif(taskVisibility.equals(\"Public\")) { \t\t\n\t \t\tt.setVisibility(Visibility.PUBLIC); \t\t\n\t \t}else{\n\t \t\tt.setVisibility(Visibility.PRIVATE); \t\t\n\t \t}\n\t \t\n\t \t//creating each individual item\n\t \taddItemsToTask(t);\n\t \t\t \t\n\t \t//set the description\n\t \tt.setDescription(taskDescription);\n\n\t \t//set the email to respond to\n\t \tt.setEmail(taskResponseString);\n\t \t\n\t \t//return the task\t \t\n\t \treturn t;\n\t \t\n \t}else{\n \t\t//task not correct\n \t\treturn null;\n \t}\n }",
"public String getTask(){\n\treturn task;\n}",
"@Override\n public String toString() {\n return \"Task no \"+id ;\n }",
"public Task getTask(Integer tid);",
"@Override\n public String getTask(String id) {\n JSONObject response = new JSONObject();\n try {\n ITaskInstance task = dataAccessTosca.getTaskInstance(id);\n if (task != null) {\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(id);\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n\n return response.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public String getTask() {\n return task;\n }",
"public String getTask() {\n return task;\n }",
"@GET(\"/task/.json\")\n Call<Map<String, Task>> getAllTasks();",
"public ITask getTask() {\n \t\treturn task;\n \t}",
"int getTask() {\n return task;\n }",
"Object getTaskId();",
"@Override\n public String getPresentationDetails(String task) {\n try {\n ITaskInstance taskInstance = dataAccessTosca.getTaskInstance(task);\n if (taskInstance != null) {\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", taskInstance.getPresentationName());\n presentation.put(\"subject\", taskInstance.getPresentationSubject());\n presentation.put(\"description\", taskInstance.getPresentationDescription());\n return presentation.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }",
"ITaskView getTaskView();",
"@Override\r\n\tpublic ExecuteTask get(int memberId,int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_member_id = ? AND er_task_id = ?\";\r\n\t\treturn get(sql,memberId,taskId);\r\n\t}",
"@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}",
"@Override\n\tpublic Teatask getById(int taskid)\n\t{\n\t\treturn teataskMapper.getById(taskid);\n\t}",
"public String GiveTask(){\n return \"[\" + getStatusIcon() + \"] \" + this.description;\n }",
"public Task getTask(){\n return punchTask;\n }",
"public Task getTask() { return task; }",
"public String getTaskName();",
"public void showTask(View v) {\n String taskIdStr = txtId.getText().toString();\n if (taskIdStr.isEmpty() || taskIdStr == null) {\n Toast.makeText(this, \"Please Insert task ID\", Toast.LENGTH_LONG).show();\n } else {\n try {\n int taskId = Integer.parseInt(taskIdStr);\n TaskModel taskmodel = taskManager.getTaskById(taskId);\n txtTaskName.setText(taskmodel.getTaskName());\n txtTaskDescription.setText(taskmodel.getTaskDescription());\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }",
"public ArrayList<Task> retrieveTaskList() {\r\n\r\n\r\n return taskList;\r\n }",
"public List<TempWTask> getTaskList(){return taskList;}",
"String getTaskId();",
"public String get_task_description()\n {\n return task_description;\n }",
"public void initiateValues(Task task)\r\n {\n int icon;\r\n switch (task.getType()) {\r\n case Task.TASK_DELIVERY:\r\n icon = R.drawable.ic_delivery;\r\n break;\r\n case Task.TASK_PICKUP:\r\n icon = R.drawable.ic_pickup;\r\n break;\r\n default:\r\n icon = R.drawable.ic_delivery;\r\n }\r\n ((Toolbar)findViewById(R.id.package_toolbar)).setNavigationIcon(icon);\r\n\r\n //task fields\r\n TextView number = (TextView)findViewById(R.id.route_id_field);\r\n TextView type = (TextView)findViewById(R.id.task_type_field);\r\n TextView address = (TextView)findViewById(R.id.task_address_field);\r\n TextView timeslot = (TextView)findViewById(R.id.task_timeslot_field);\r\n\r\n number.setText(task.getId()+\"\");\r\n type.setText(((task.getType()==0)?\"Levering\":\"Henting\")+ \" (\" + task.getSize() + \" kolli)\");\r\n address.setText(task.getAddress() + \", \" + task.getZip() + \" \" + task.getCity());\r\n long timeSlotStart = task.getTimeSlotStart();\r\n long timeSlotEnd = task.getTimeSlotEnd();\r\n //set timeslot for package if it exists\r\n if(timeSlotStart != 0 && timeSlotEnd != 0)\r\n timeslot.setText(task.getTimeSlotStartString() + \" - \" + task.getTimeSlotEndString());\r\n\r\n //sender fields\r\n TextView sender_name = (TextView)findViewById(R.id.sender_name_field);\r\n TextView sender_phone = (TextView)findViewById(R.id.sender_phone_field);\r\n TextView sender_address = (TextView)findViewById(R.id.sender_address_field);\r\n\r\n sender_name.setText(task.getSender().getName());\r\n sender_phone.setText(task.getSender().getPhone());\r\n sender_address.setText(task.getSender().getAddress());\r\n\r\n //receiver fields\r\n TextView receiver_name = (TextView)findViewById(R.id.receiver_name_field);\r\n TextView receiver_phone = (TextView)findViewById(R.id.receiver_phone_field);\r\n TextView receiver_address = (TextView)findViewById(R.id.receiver_address_field);\r\n\r\n receiver_name.setText(task.getReceiver().getName());\r\n receiver_phone.setText(task.getReceiver().getPhone());\r\n receiver_address.setText(task.getReceiver().getAddress());\r\n }",
"TrackerTasks getTrackerTasks(final Integer id);",
"String getTaskName();",
"String getTaskName();",
"public Task getTask() {\n return task;\n }",
"public DescribeTaskInfoResponse DescribeTaskInfo(DescribeTaskInfoRequest req) throws TencentCloudSDKException{\n JsonResponseModel<DescribeTaskInfoResponse> rsp = null;\n try {\n Type type = new TypeToken<JsonResponseModel<DescribeTaskInfoResponse>>() {\n }.getType();\n rsp = gson.fromJson(this.internalRequest(req, \"DescribeTaskInfo\"), type);\n } catch (JsonSyntaxException e) {\n throw new TencentCloudSDKException(e.getMessage());\n }\n return rsp.response;\n }",
"com.google.cloud.aiplatform.v1.PipelineTaskDetail getTaskDetails(int index);",
"@Override\n\tpublic int getActivityInfo() {\n\t\treturn Constants.ActivityInfo.ACTIVITY_ADDWAITACTIVITY;\n\t}",
"public String taskViewForm() throws ActivityNotFoundException, Exception{\n\t\tActivityInstanceUUID aiid=new ActivityInstanceUUID(uuid);\r\n\t\tActivityInstance ai=BPMModule.getInstance().getActivityInstance(aiid);\r\n\t\ttaskInstance=new SimpleActivity();\r\n\t\ttaskInstance.setRootProcessNameOrUrl(ai.getProcessDefinitionUUID().getValue());\r\n\t\tString url=BPMUtil.getUserXPTaskUrl(ai.getProcessDefinitionUUID().getValue(), ai.getActivityDefinitionUUID().getValue(),ai.getUUID().getValue(), null,null,true,true);\r\n\t\ttaskInstance.setTaskNameOrUrl(url);\r\n\t\treturn SUCCESS;\r\n\t}",
"public java.lang.Object getTaskID() {\n return taskID;\n }",
"@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}",
"public TaskDetails getSpecificTask (int position){\n return taskList.get(position);\n }",
"public interface GetTaskInterface extends publiceviewinterface {\n void gettaskdetails(MyTaskBean myTaskBean);\n void accepttask();\n void gettaskfall();\n}",
"List<ExtDagTask> taskList(ExtDagTask extDagTask);",
"public String get_task_title()\n {\n return task_title;\n }",
"TaskList getList();",
"public void showAllTask(View v){\n Cursor res = taskManager.showAllTask();\n if(res.getCount()==0){\n //Toast.makeText(this,\"No Data Available\",Toast.LENGTH_LONG).show();\n showTaskMessage(\"Error\",\"No Data Found\");\n return;\n }else{\n StringBuffer buffer = new StringBuffer();\n while(res.moveToNext()){\n buffer.append(\"taskId : \"+res.getString(0)+\"\\n\");\n buffer.append(\"taskName : \"+res.getString(1)+\"\\n\");\n buffer.append(\"taskDescription : \"+res.getString(2)+\"\\n\");\n }\n showTaskMessage(\"Data\",buffer.toString());\n }\n }",
"public Task getTask(int index)\n {\n return tasks.get(index);\n }",
"private Task getFirstTestTask() {\n Task task = new Task();\n task.setName(\"Buy Milk\");\n task.setCalendarDateTime(TODAY);\n task.addTag(\"personal\");\n task.setCompleted();\n return task;\n }",
"public void fetchTaskDetailsFromDB() {\n TaskInfo taskInfo = TaskInfo.getOrBadRequest(userTaskUUID);\n taskParams = Json.fromJson(taskInfo.getDetails(), UniverseDefinitionTaskParams.class);\n }",
"@RequestMapping(value = \"/get-task/{taskName}\", method = RequestMethod.GET)\r\n\tpublic Task getTask(@PathVariable(\"taskName\") String taskName) {\r\n\t\tTask dumyTask = new Task();\r\n\t\tdumyTask.setTaskName(taskName);\r\n\t\treturn dumyTask;\r\n\t}",
"public abstract String getTaskName();",
"public Subtask getSubtask(String task_name, int project_id) {\n try {\n Connection con = DBManager.getConnection();\n String SQL = \"SELECT subtask_id, task_name FROM subtask where task_name = ? AND project_id = ?;\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ps.setString(1, task_name);\n ps.setInt(2, project_id);\n\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n int id = rs.getInt(\"subtask_id\");\n Subtask subtask = new Subtask(id, task_name, project_id);\n return subtask;\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n return null;\n }",
"List<Task> getAllTasks();",
"@Override\n public String getInputParameter(String task) {\n try {\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task);\n JSONArray response = new JSONArray();\n if (inputParameters != null) {\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"id\", input.getId());\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n i.put(\"tiid\", task);\n response.add(i);\n }\n return response.toString();\n }\n return null;\n\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\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 void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }",
"public List<WTask> getTaskList(){return taskList;}",
"public Task getTask(String taskId) throws DaoException, DataObjectNotFoundException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId);\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n if(task!=null) {\r\n //Task task = (Task)col.iterator().next();\r\n //task.setLastModifiedBy(UserUtil.getUser(task.getLastModifiedBy()).getName());\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(dao.selectReassignments(taskId));\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID));\r\n return task;\r\n }\r\n return null;\r\n }",
"@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}",
"public List<Task> listTasks(String extra);",
"@Override\n public GetFuotaTaskResult getFuotaTask(GetFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeGetFuotaTask(request);\n }",
"@GetMapping(path=\"/{id}/getTasks\")\n public @ResponseBody List<Task> getTasksForMember(@PathVariable long id){\n return taskRepository.findByTeammember(teamMemberRepository.getOne(id));\n }",
"public List<TaskDescription> getActiveTasks();",
"public void get(final Task task) {\n }",
"@Override\n public String getAllTaskTaskType(String typeId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByTaskType(typeId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }",
"@SuppressWarnings(\"unchecked\")\r\n public List<UserPlanTask> UserPlanTaskEdit(long task_id) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n\r\n List<UserPlanTask> EditTask = null;\r\n try {\r\n EditTask = session.createQuery(\"from UserPlanTask where taskId='\" + task_id + \"'\").list();\r\n } catch (HibernateException HE) {\r\n System.out.println(HE);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return EditTask;\r\n }",
"public int getTaskID() {\n\t\treturn taskID;\n\t}",
"public String getTaskName(){\r\n\t\treturn this.taskName;\r\n\t}",
"void addSubTask(AuctionTask task);",
"_task selectByPrimaryKey(Integer taskid);",
"List<Workflow> findByIdTask( int nIdTask );",
"public boolean getShowInTaskInfo() {\n return showInTaskInfo;\n }",
"Task<?> addInvitationForSendingUser(Invitation invitation);",
"String getTaskId(int index);",
"public String getTaskName() {\n return taskName;\n }",
"public String getTaskName() {\n return taskName;\n }",
"public String getTaskName() {\n return taskName;\n }",
"public String getTaskName() {\n return taskName;\n }",
"@Transactional(Transactional.TxType.REQUIRES_NEW)\n public TaskDef retrieve(Long task_id) {\n return TaskDefIntegrationService.find(task_id);\n }",
"public void findClick(View v){\n String taskName = justAddedTextView.getText().toString();\n PlannerDBHandler handler = new PlannerDBHandler(this);\n\n //Task task = handler.findTask(taskName);\n }",
"public String getTaskName() {\n return this.taskDescription;\n }",
"@GetMapping(\"/userTasks\")\n\tResponseEntity getUserTasks() {\n\t\tString username = this.tokenUtils.getUsernameFromToken(this.httpServletRequest.getHeader(\"X-Auth-Token\"));\n\t\tSystem.out.println(\"Trazim taskove za: \" + username);\n\t\tfinal List<TaskDto> tasks = rspe.getTasks(null, username);\n\t\tSystem.out.println(\"User ima : \" + tasks.size() + \" taskova\");\n\n\t\treturn ResponseEntity.ok(tasks);\n\n\t}",
"Task<?> addInvitationForReceivingUser(Invitation invitation);",
"public List<TaskItem> zGetTasks() throws HarnessException {\n\n\t\tList<TaskItem> items = new ArrayList<TaskItem>();\n\n\t\t// The task page has the following under the zl__TKL__rows div:\n\t\t// <div id='_newTaskBannerId' .../> -- enter a new task\n\t\t// <div id='_upComingTaskListHdr' .../> -- Past due\n\t\t// <div id='zli__TKL__267' .../> -- Task item\n\t\t// <div id='zli__TKL__299' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- Upcoming\n\t\t// <div id='zli__TKL__271' .../> -- Task item\n\t\t// <div id='zli__TKL__278' .../> -- Task item\n\t\t// <div id='zli__TKL__275' .../> -- Task item\n\t\t// <div id='_upComingTaskListHdr' .../> -- No due date\n\t\t// <div id='zli__TKL__284' .../> -- Task item\n\t\t// <div id='zli__TKL__290' .../> -- Task item\n\n\t\t// How many items are in the table?\n\t\tString rowLocator = \"//div[@id='\" + Locators.zl__TKL__rows + \"']/div\";\n\t\tint count = this.sGetXpathCount(rowLocator);\n\t\tlogger.debug(myPageName() + \" zGetTasks: number of rows: \" + count);\n\n\t\t// Get each conversation's data from the table list\n\t\tfor (int i = 1; i <= count; i++) {\n\n\t\t\tString itemLocator = rowLocator + \"[\" + i + \"]\";\n\n\t\t\tString id;\n\t\t\ttry {\n\t\t\t\tid = this.sGetAttribute(\"xpath=(\" + itemLocator + \")@id\");\n\t\t\t} catch (SeleniumException e) {\n\t\t\t\t// Make sure there is an ID\n\t\t\t\tlogger.warn(\"Task row didn't have ID. Probably normal if message is 'Could not find element attribute' => \"+ e.getMessage());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString locator = null;\n\t\t\tString attr = null;\n\n\t\t\t// Skip any invalid IDs\n\t\t\tif ((id == null) || (id.trim().length() == 0))\n\t\t\t\tcontinue;\n\n\t\t\t// Look for zli__TKL__258\n\t\t\tif (id.contains(Locators.zli__TKL__)) {\n\t\t\t\t// Found a task\n\n\t\t\t\tTaskItem item = new TaskItem();\n\n\t\t\t\tlogger.info(\"TASK: \" + id);\n\n\t\t\t\t// Is it checked?\n\t\t\t\t// <div id=\"zlif__TKL__258__se\" style=\"\"\n\t\t\t\t// class=\"ImgCheckboxUnchecked\"></div>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//div[contains(@class, 'ImgCheckboxUnchecked')]\";\n\t\t\t\titem.gIsChecked = this.sIsElementPresent(locator);\n\n\t\t\t\t// Is it tagged?\n\t\t\t\t// <div id=\"zlif__TKL__258__tg\" style=\"\"\n\t\t\t\t// class=\"ImgBlank_16\"></div>\n\t\t\t\tlocator = itemLocator + \"//div[contains(@id, '__tg')]\";\n\t\t\t\t// TODO: handle tags\n\n\t\t\t\t// What's the priority?\n\t\t\t\t// <td width=\"19\" id=\"zlif__TKL__258__pr\"><center><div style=\"\"\n\t\t\t\t// class=\"ImgTaskHigh\"></div></center></td>\n\t\t\t\tlocator = itemLocator\n\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div\";\n\t\t\t\tif (!this.sIsElementPresent(locator)) {\n\t\t\t\t\titem.gPriority = \"normal\";\n\t\t\t\t} else {\n\t\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t\t+ \"//td[contains(@id, '__pr')]/center/div)@class\";\n\t\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\t\tif (attr.equals(\"ImgTaskHigh\")) {\n\t\t\t\t\t\titem.gPriority = \"high\";\n\t\t\t\t\t} else if (attr.equals(\"ImgTaskLow\")) {\n\t\t\t\t\t\titem.gPriority = \"low\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Is there an attachment?\n\t\t\t\t// <td width=\"19\" class=\"Attach\"><div id=\"zlif__TKL__258__at\"\n\t\t\t\t// style=\"\" class=\"ImgBlank_16\"></div></td>\n\t\t\t\tlocator = \"xpath=(\" + itemLocator\n\t\t\t\t+ \"//div[contains(@id, '__at')])@class\";\n\t\t\t\tattr = this.sGetAttribute(locator);\n\t\t\t\tif (attr.equals(\"ImgBlank_16\")) {\n\t\t\t\t\titem.gHasAttachments = false;\n\t\t\t\t} else {\n\t\t\t\t\t// TODO - handle other attachment types\n\t\t\t\t}\n\n\t\t\t\t// See http://bugzilla.zmail.com/show_bug.cgi?id=56452\n\n\t\t\t\t// Get the subject\n\t\t\t\tlocator = itemLocator + \"//td[5]\";\n\t\t\t\titem.gSubject = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the status\n\t\t\t\tlocator = itemLocator + \"//td[6]\";\n\t\t\t\titem.gStatus = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the % complete\n\t\t\t\tlocator = itemLocator + \"//td[7]\";\n\t\t\t\titem.gPercentComplete = this.sGetText(locator).trim();\n\n\t\t\t\t// Get the due date\n\t\t\t\tlocator = itemLocator + \"//td[8]\";\n\t\t\t\titem.gDueDate = this.sGetText(locator).trim();\n\n\t\t\t\titems.add(item);\n\t\t\t\tlogger.info(item.prettyPrint());\n\n\t\t\t}\n\n\t\t}\n\n\t\t// Return the list of items\n\t\treturn (items);\n\n\t}",
"java.util.List<com.google.cloud.aiplatform.v1.PipelineTaskDetail> \n getTaskDetailsList();",
"Task selectByPrimaryKey(String taskid);",
"public String taskName() {\n return this.taskName;\n }",
"@Override\n\tpublic DetailedTask selectTask(int id) throws SQLException, ClassNotFoundException\n\t{\n\t\t DetailedTask returnValue = null;\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectTask)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task WHERE id=\"+id+\";\" );\n\t rs.next();\n\n\t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t returnValue = new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class),\n\t \t\t rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\"));\n\t \n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t return returnValue;\n\t}",
"@Override\r\n @SuppressWarnings(\"empty-statement\")\r\n public Object createTaskData(int taskid) { \r\n List curPara = new ArrayList();\r\n ArrayList<String[]> regArgs1=new ArrayList<String[]>();\r\n String [] regArgs2 = null;\r\n synchronized(lock){\r\n curPara = paramList.get(taskid); \r\n }\r\n \r\n String _taskType = curPara.get(2).toString();\r\n String _info1 = curPara.get(4).toString();\r\n String _info2 = curPara.get(5).toString();\r\n if(_taskType.equals(\"c4c\")){ \r\n String _tupleTag = curPara.get(1).toString();\r\n HashMap<String,Object> requestArgs ;\r\n if (_info2.equals(\"MET\")) {\r\n try {\r\n Thread.sleep(100);\r\n System.out.println(\"[Notification-createTaskData] metadata array to send \"+C4CHelper.regArgs2.size());\r\n Thread.sleep(100);\r\n regArgs1=C4CHelper.regArgs2;\r\n Thread.sleep(10000);\r\n System.out.println(\"[Notification-createTaskData] metadata completed\");\r\n C4CHelper.uploadModel=true;\r\n } catch (Exception ex) {\r\n Logger.getLogger(FedMeteorPublisherMaster.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n } else if (_info2.equals(\"VER\")){\r\n try {\r\n Thread.sleep(100);\r\n System.out.println(\"[Notification-createTaskData] version array to send \"+C4CHelper.regArgs1.size());\r\n Thread.sleep(100);\r\n regArgs1=C4CHelper.regArgs1;\r\n Thread.sleep(10000);\r\n System.out.println(\"[Notification-createTaskData] version completed\");\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(FedMeteorPublisherMaster.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n } else if (_info1.equals(\"CONFIG\")){\r\n try {\r\n ArrayList<String[]> result=new ArrayList<String[]>();\r\n String[] res=new String[10];\r\n System.out.println(\"[Notification-createTaskData] config array to send: \"+C4CHelper.resultConfig.length());\r\n Thread.sleep(100);\r\n Pattern pattern = Pattern.compile(\"<IPAddress>(.*?)</IPAddress>\");\r\n Pattern pattern2 = Pattern.compile(\"<Port>(.*?)</Port>\");\r\n Matcher matcher = pattern.matcher(C4CHelper.resultConfig);\r\n Matcher matcher2 = pattern2.matcher(C4CHelper.resultConfig);\r\n while ((matcher.find()) && (matcher2.find())){\r\n res[0]=matcher.group(1);\r\n res[1]=matcher2.group(1);\r\n //System.out.println(\"[Notification-createTaskData] 1111 config completed \"+res[0] +\"-\"+res[1]);\r\n result.add(new String[] {res[0],res[1]});\r\n \r\n } \r\n regArgs1=result;\r\n //System.out.println(\"[Socket getInterfaceData] configuring ...end \"+result.get(0)[0]);\r\n //System.out.println(\"[Socket getInterfaceData] configuring ...end \"+result.get(0)[1]);\r\n System.out.println(\"[Notification-createTaskData] config completed\");\r\n \r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(FedMeteorPublisherMaster.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n } else { \r\n \r\n System.out.println(\"[Notification-createTaskData] fetch received\");\r\n }\r\n return (Object) regArgs1;\r\n \r\n }else if(_taskType.equals(\"C4C\")){\r\n String _tupleTag = curPara.get(1).toString();\r\n HashMap<String,Object> requestArgs ;\r\n if(_tupleTag.equals(\"CPT\")){\r\n requestArgs = (HashMap<String,Object>)curPara.get(9);\r\n }else{\r\n regArgs1 = null;\r\n }\r\n return (Object) regArgs1;\r\n }else{\r\n return null;\r\n } \r\n }",
"public void populateTaskList(String _task){\n\t\ttaskList.getItems().add(_task);\n\t}",
"@Override\n public String getAllTaskUser(String userId) {\n try {\n Set<ITaskInstance> allTasks = dataAccessTosca.getTasksByUser(userId);\n JSONArray fullResponse = new JSONArray();\n //if allTasks is null, then no tasks for this user was found\n if (allTasks != null) {\n // create a JSON-Object for every task and add it to fullresponse\n for (ITaskInstance task : allTasks) {\n JSONObject response = new JSONObject();\n //get the belonging work item\n List<IWorkItem> workItem = dataAccessTosca.getWorkItems(task.getId());\n //get the presentationDetails\n JSONObject presentation = new JSONObject();\n presentation.put(\"title\", task.getPresentationName());\n presentation.put(\"subject\", task.getPresentationSubject());\n presentation.put(\"description\", task.getPresentationDescription());\n //get inputParameters\n Set<IInputParameter> inputParameters = dataAccessTosca.getInputParametersByTask(task.getId());\n\n //get outputParameters\n Set<IOutputParameter> outputParameters = dataAccessTosca.getOutputParametersByTask(task.getId());\n //put information in response\n response.put(\"id\", task.getId());\n response.put(\"name\", task.getName());\n JSONArray taskTypes = new JSONArray();\n taskTypes.addAll(dataAccessTosca.getTaskTypeByTask(task.getId()));\n response.put(\"taskTypes\", taskTypes);\n //response.put(\"taskType\", \"Noch einfügen\");\n response.put(\"priority\", task.getPriority());\n response.put(\"status\", task.getStatus().name().toLowerCase());\n if (workItem.get(0).getAssignee() != null) {\n response.put(\"claimedBy\", workItem.get(0).getAssignee().getUserId());\n }\n response.put(\"presentationDetails\",presentation);\n if (inputParameters != null) {\n JSONArray inputs = new JSONArray();\n for (IInputParameter input : inputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", input.getLabel());\n i.put(\"value\", input.getValue());\n inputs.add(i);\n }\n response.put(\"inputParameters\", inputs);\n }\n if (outputParameters != null) {\n JSONArray outputs = new JSONArray();\n for (IOutputParameter output : outputParameters) {\n JSONObject i = new JSONObject();\n i.put(\"label\", output.getLabel());\n i.put(\"value\", output.getValue());\n outputs.add(i);\n }\n response.put(\"outputParameters\",outputs);\n }\n fullResponse.add(response);\n }\n return fullResponse.toString();\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return null;\n }",
"@Override\r\n\tpublic List<ExecuteTask> getByType(String taskType) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_task_id IN(SELECT task_id FROM task WHERE task_type = ?)\";\r\n\t\treturn getForList(sql,taskType);\r\n\t}",
"@Override\n public String toString() {\n\treturn \"Primzahlen von Task \" + taskID + \" \" + primzahlenListe;\n }",
"public void addTask(View v) {\n int taskId = Integer.parseInt(txtId.getText().toString());\n String tskName = txtTaskName.getText().toString();\n String taskDesc = txtTaskDescription.getText().toString();\n ContentValues values = new ContentValues();\n values.put(\"taskId\", taskId);\n values.put(\"taskName\", tskName);\n values.put(\"taskDescription\", taskDesc);\n try {\n taskManager.addTask(values);\n Toast.makeText(this, \"Data Inserted\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n int relpos = position - 1;\n Intent intent = new Intent();\n intent.setClass(InspectTaskList.this, InspectTaskDetail.class);\n // getEntity\n if (list != null && list.size() > relpos) {\n Task task = list.get(relpos);\n String json = new Gson().toJson(task);\n intent.putExtra(AeaConstants.EXTRA_TASK, json);\n startActivityForResult(intent, REQUEST_CODE_TASK_REPORT);\n }\n selectedId = relpos;\n }",
"public void showTaskDetail(ProntoTask prontoTask) {\n try {\n taskNameEditText.setText(prontoTask.getTitle());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n taskDescriptionEditText.setText(prontoTask.getDescription());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n int priority = prontoTask.getPriority();\n if (priority > 0){\n switch (priority){\n case Constants.PRIORITY_LOW:\n lowPriorityButton.setChecked(true);\n break;\n case Constants.PRIORITY_MEDIUM:\n mediumPriorityButton.setChecked(true);\n break;\n case Constants.PRIORITY_HIGH:\n highPriorityButton.setChecked(true);\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n String formattedDueDate = TimeUtils.getReadableDateWithoutTime(prontoTask.getReminder().getDateAndTime());\n dateTextView.setText(formattedDueDate);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n try {\n String formattedDueTime = DateHelper.getTimeShort(activity, prontoTask.getReminder().getDateAndTime());\n timeTextView.setText(formattedDueTime);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n try {\n onFolderSelected(currentTask.getFolder());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //Show Tags assigned to this prontoTask\n if (currentTask.getTags() != null && currentTask.getTags().size() > 0){\n String tagText = \"\";\n for (ProntoTag prontoTag : currentTask.getTags()){\n tagText = tagText + \"#\" + prontoTag.getTagName() + \", \";\n }\n tagsTextView.setText(tagText);\n tagsTextView.setTextColor(ContextCompat.getColor(activity, R.color.primary_dark));\n tagsTextView.setTypeface(tagsTextView.getTypeface(), Typeface.BOLD);\n }\n }",
"public String addTaskDetails(TasksModel obj)\n\t{\n\t\t\tString memo=\"\"; \n\t\t\tif(obj.getMemo()!=null)\n\t\t\t{\n\t\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setMemo(memo);\n\t\t\t\n\t\t\tString commnets=\"\"; \n\t\t\tif(obj.getComments()!=null)\n\t\t\t{\n\t\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setComments(commnets);\n\t\t\t\t\n\t\t\tString stepsToReproduce=\"\"; \n\t\t\tif(obj.getTaskStep()!=null)\n\t\t\t{\n\t\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setTaskStep(stepsToReproduce);\n\t\t\t\n\t\t\tCalendar cal = Calendar.getInstance(); \n\t\t\tTimestamp timestamp = new Timestamp(cal.getTimeInMillis());\n\t\t\t\n\t\t query=new StringBuffer();\t\t \n\t\t query.append(\" Insert into TaskDetails (taskID,actualTime,status,usercomments,DateTime,UserId)\");\n\t\t query.append(\" values(\"+obj.getTaskid()+\",\"+obj.getActualNumber()+\",\"+obj.getStatusKey()+\",'\"+obj.getComments()+\"','\"+timestamp+\"',\"+obj.getCreatedUserID()+\")\");\n\t\t return query.toString();\n\t}",
"public Task getTask(int index) {\n return records.get(index);\n }",
"public Task getTask(int i) {\n return this.tasks.get(i);\n }",
"void sendEmail(Task task, String taskTypeName, String plantName);",
"public TaskName getTaskName() {\n return this.taskName;\n }",
"public Task get(int index){\n return tasks.get(index);\n }"
] | [
"0.6837046",
"0.65906835",
"0.6359873",
"0.63137347",
"0.6307033",
"0.6259327",
"0.6162684",
"0.6162684",
"0.59930074",
"0.59705055",
"0.595553",
"0.5952735",
"0.5946492",
"0.5935428",
"0.59337026",
"0.5927943",
"0.5874035",
"0.5866605",
"0.5864612",
"0.58532774",
"0.5853251",
"0.584592",
"0.5841234",
"0.578756",
"0.57841176",
"0.5772917",
"0.5759464",
"0.5754558",
"0.5753172",
"0.5753172",
"0.5742432",
"0.57418936",
"0.57418144",
"0.5735747",
"0.5725944",
"0.5720151",
"0.5719213",
"0.5706827",
"0.57050866",
"0.5695897",
"0.56729996",
"0.5639671",
"0.5629458",
"0.5628812",
"0.5628153",
"0.56165904",
"0.56152415",
"0.56043327",
"0.5591616",
"0.5588312",
"0.5586588",
"0.5583876",
"0.5582265",
"0.55805385",
"0.55800754",
"0.5579172",
"0.55753624",
"0.55620617",
"0.5542913",
"0.5539862",
"0.5505733",
"0.55040467",
"0.5498975",
"0.54982936",
"0.54949623",
"0.54931116",
"0.54902554",
"0.5487212",
"0.54843074",
"0.5470943",
"0.5464323",
"0.54523695",
"0.54514027",
"0.54514027",
"0.54514027",
"0.54514027",
"0.54473495",
"0.5444276",
"0.5443568",
"0.543803",
"0.54319036",
"0.5431878",
"0.5422287",
"0.5410918",
"0.5392986",
"0.5391489",
"0.5391143",
"0.5389112",
"0.5379367",
"0.53777325",
"0.53728956",
"0.5371836",
"0.5364001",
"0.53601986",
"0.5352601",
"0.53449744",
"0.53448284",
"0.5343626",
"0.533869",
"0.53366077"
] | 0.56424737 | 41 |
add progress update, when a task owner does something, return update number of this task | public static int addProgressUpdate(int taskid, String image, int myId){
try {
Statement st = conn.createStatement();
int updateNum;
//select supervisors for this task
String getSupervisors = "select member from grouptask where taskid = " + taskid;
ResultSet supvResult = st.executeQuery(getSupervisors);
if(supvResult.next()) {
Long[] supervisors = (Long[]) supvResult.getArray(1).getArray();
supvResult.close();
//find number of update for this task
ResultSet maxUpdateNum = st.executeQuery("select max(updatenum) from progressupdate");
maxUpdateNum.next();
String updateNumStr = maxUpdateNum.getString(1);
updateNum = (updateNumStr == null) ? 1 : Integer.parseInt(updateNumStr) + 1;
String updateProgress = "INSERT INTO progressupdate VALUES(%d, %d, -1,'{%s}', %d)";
String sndBaseString = String.format(updateProgress, updateNum, taskid, image, myId);
PreparedStatement ps = conn.prepareStatement(sndBaseString);
ps.executeUpdate();
ps.close();
//update user for supervisors for this task
for(Long supv: supervisors) {
st.executeUpdate("UPDATE users SET otherstaskupdate = array_append(otherstaskupdate, '" + updateNum +"') WHERE userid = " + supv);
System.out.println("update otherstaskupdate in users for members " + supv);
}
} else {
return SERVER_FAILURE;
}
st.close();
return updateNum;
} catch (SQLException e) {
return SERVER_FAILURE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Long getProgressTotalToDo();",
"public int getProgress();",
"public Long getProgressDone();",
"public void onProgressUpdate(int numRouleau,String prochain);",
"int getProgress(int index);",
"int getProgress(int index);",
"int getProgress(int index);",
"public void progressMade();",
"private void updateTaskActivityLabel()\r\n {\r\n setLabelValue(\"Tile Downloads \" + myActiveQueryCounter.intValue());\r\n setProgress(myDoneQueryCounter.doubleValue() / myTotalSinceLastAllDoneCounter.doubleValue());\r\n }",
"public void increase() {\r\n\t\t\tsynchronized (activity.getTaskTracker()) {\r\n\t\t\t\tactivity.getTaskTracker().count++;\r\n\t\t\t\tLog.d(LOGTAG, \"Incremented task count to \" + count);\r\n\t\t\t}\r\n\t\t}",
"int getProgressCount();",
"int getProgressCount();",
"int getProgressCount();",
"public void increment() { this.progressBar.setValue(++this.progressValue); }",
"public void updateTask() {}",
"public float getProgress() {\n // Depends on the total number of tuples\n return 0;\n }",
"public int progress() {\n return _progress;\n }",
"private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}",
"public int getProgress(){\n return -1;\n }",
"public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }",
"public int getProgress() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return -1;\n \n int num = (int)((System.currentTimeMillis()-startTime)*100/d);\n if(num>=100) num=99;\n return num;\n }",
"void progress(int pUnitsCompleted);",
"protected void onProgressUpdate(Integer... progress) {\n\t\t}",
"public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}",
"@Override\n\t\t\tprotected Integer doInBackground(Integer... params) {\n\t\t\t\t\n\t\t\t\tInteger counter = params[0];\n\t\t\t\tstop = false;\n\t\t\t\twhile(!stop){\n\t\t\t\t\tpublishProgress(counter);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tcounter ++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn counter;\n\t\t\t}",
"private int getCompleteProgress()\n {\n int complete = (int)(getProgress() * 100);\n \n if (complete >= 100)\n complete = 100;\n \n return complete;\n }",
"void reportProgress(List<Node> update);",
"public int getProgress() {\n\t\treturn mProgress;\n\t}",
"@Override\n protected Integer doInBackground(Void... params) {\n count++;\n\n return count;\n }",
"protected void onProgressUpdate(Integer... progress){\n\t Utils.logThreadSignature(this.tag);\n\t this.reportThreadSignature();\n\n\t //will be called multiple times\n\t //triggered by onPostExecute\n\t Integer i = progress[0];\n\t r.reportBack(tag, \"Progress:\" + i.toString());\n\t pd.setProgress(i);\n }",
"@Override\n\t\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\t\tsuper.onProgressUpdate(values);\n\t\t\t\tiCounterCallback.counter(values[0]);\n\t\t\t}",
"@Override protected void onProgressUpdate(Integer... vals) {\n updateProgressBar(vals[0].intValue());\n }",
"public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n }",
"@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t}",
"@Override\n\t\t\tpublic void onAsyncTaskProgressUpdate(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onAsyncTaskProgressUpdate(CustomAsyncTask customAsyncTask) \n\t\t\t{\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic int estimateCurrentProgress() {\n\t\treturn counter.getCurrent();\n\t}",
"protected void onProgressUpdate(Integer... progress) {\n }",
"@Override\r\n protected void onProgressUpdate(Integer... progress) {\n }",
"public void setProgress(int value);",
"@Override\n public boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus)\n throws IOException, InterruptedException {\n superStepCount = taskStatus.getSuperstepCount();\n return true;\n }",
"@Override\n public void update(final Progress progress) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n progressBar.setValue(progress.getIntPercentage());\n progressField.setText(roundToSingleDigit(progress.getPercentage()) + \"%\");\n }\n });\n }",
"public void incrementProcess() {\n this.currProcessProgressValue++; \n this.pbarProcess.setValue(this.currProcessProgressValue); \n this.lblProgressCaption.setText(processCaption +\" \" +currProcessProgressValue+\n \" of \" + maximumchars+\" \"+processingCaption+\" \");\n //this.lblTimeCaption.setText(\"Time Remaining :\"+(maximumtime-this.currTimeProgressValue));\n decrementTime();\n }",
"protected void updateProgress(Progress prog) {\r\n \t// if this is called then ensure the no tasks msg is not also displayed\r\n \tshowNoTaskMsg(false);\r\n \t\r\n\t\tint done = prog.getWork();\r\n\t\tString status = getStatusDesc(prog);\r\n\r\n\t\tfinal ProgressUIControl progressUIControl = findOrCreateUIControl(prog);\r\n\t\tprogressUIControl.showMsg(status);\r\n\t\tprogressUIControl.showPercent(done);\r\n\t\t\r\n\t\tif (prog.isFinished() && !progressUIControl.isFinishNotified) {\r\n\t\t\tLog.i(TAG, \"Job finished:\"+prog.getJobName());\r\n\t\t\tprogressUIControl.isFinishNotified = true;\r\n\t\t\tjobFinished(prog);\r\n\t\t}\r\n }",
"private void updateProgress() {\n progressBar.setProgress( (1.0d * currentQuestion) / numQuestions);\n }",
"public int getAmountDone();",
"public void incrementFileProcess() {\n this.setCurrFileName(files.elementAt(\n this.currFileProgressValue).toString());\n this.currFileProgressValue++;\n this.pbarFileProcess.setValue(this.currFileProgressValue);\n this.lblFileProcessCaption.setText(processCaption+\" \"+currFileProgressValue+\" of \"+\n maxfiles); \n }",
"@Override\r\n\tpublic void updateProgress(int arg0) {\n\t\t System.out.println(\"arg0.progress=\" + arg0);\r\n\t\tmHandler.obtainMessage(100, arg0, arg0).sendToTarget();\r\n\t}",
"public int getProgress() {\n return Math.round(mProgress);\n }",
"public void updateTaskProgress(Integer newDownloadProgress)\n {\n lastDownloadProgress = newDownloadProgress;\n downloadListener.onUpdateDownloadProgress(newDownloadProgress);\n }",
"public void onProgress(int pos);",
"public static int supvCheck(int myId, int taskid, int updatenum){\n try {\n Statement st = conn.createStatement();\n\n //add checkerid in indvprogressupdate for this updatenum\n String addChecker = \"UPDATE progressupdate SET checkerid = %d WHERE updatenum = \" + updatenum ;\n st.executeUpdate(String.format(addChecker, myId));\n\n //remove updatenum from indvsupvupdate in user for supv\n //TODO remove all otherstaskupdate of all group member\n String getMembersCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskid;\n ResultSet taskInfo = st.executeQuery(getMembersCommand);\n taskInfo.next();\n Long[] members = (Long[])taskInfo.getArray(\"member\").getArray();\n for(Long memberid : members){\n String removeUpdate = \"UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = \" + memberid ;\n st.executeUpdate(String.format(removeUpdate, updatenum));\n }\n\n //update task owner progress(increment) in individual TODO:check deadline, repetition etc.\n //String updateMyIndv = \"UPDATE grouptask SET progress = progress + 1 WHERE taskid =\" + taskid;\n //st.executeUpdate(updateMyIndv);\n\n //add updatenum to indvupdate in user\n ResultSet ownerResult = st.executeQuery(\"SELECT userid FROM progressupdate WHERE updatenum =\" + updatenum);\n ownerResult.next();\n int ownerid = Integer.parseInt(ownerResult.getString(\"userid\"));\n String addIndvUpdate = \"UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;\";\n st.execute(String.format(addIndvUpdate, updatenum , ownerid));\n\n //TODO update progress\n String progressTrackCommand = String.format(\n \"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d\",\n taskid, ownerid);\n st.executeUpdate(progressTrackCommand);\n\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"public abstract long getNumUpdate();",
"private void updateProgress(int progress) {\n if (myHost != null && progress != previousProgress) {\n myHost.updateProgress(progress);\n }\n previousProgress = progress;\n }",
"protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n }",
"void onTaskProgress(ProgressInfo progressInfo);",
"@Override\n protected void onProgressUpdate(Integer... progress) {\n ProgressBar pbFileIO = (ProgressBar)findViewById(R.id.pbFileIO);\n pbFileIO.setProgress(progress[0]);\n }",
"public int getProgress(int index) {\n return progress_.get(index);\n }",
"public int getProgress(int index) {\n return progress_.get(index);\n }",
"public int getProgress(int index) {\n return progress_.get(index);\n }",
"public long getTotalUpdates() {\n return executor.getTotalUpdates();\n }",
"private void updateProgress(int progress) {\n if (myHost != null) {\n myHost.updateProgress(progress);\n } else {\n System.out.println(\"Progress: \" + progress + \"%\");\n }\n }",
"@Override\n\tpublic void count(float elapsed) {\n\t\tmProgress += elapsed;\n\t}",
"public double getProgress()\n {\n return ((double)getCount() / (double)getGoal());\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n\n\n // Do things like update the progress bar\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgress(int index) {\n return progress_.get(index);\n }",
"public int getProgress(int index) {\n return progress_.get(index);\n }",
"public int getProgress(int index) {\n return progress_.get(index);\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n super.onProgressUpdate(values);\n\n progressBar.setProgress(values[0].intValue());\n\n }",
"private synchronized void incrementPending() {\n\t\tpending++;\n\t}",
"@Override\n\tprotected void onProgressUpdate(Integer... values) {\n\t\tint len = progressBar.getProgress() + values[0];\n\t\tprogressBar.setProgress(len);\n\t\tString str = progressBar.getProgress() * 100 / progressBar.getMax()\n\t\t\t\t+ \"%\";\n\t\ttv.setText(\"下载完成\" + str);\n\t\tsuper.onProgressUpdate(values);\n\t}",
"protected void onProgressUpdate(String fileName, Integer... progress) {\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"public int getProgressCount() {\n return progress_.size();\n }",
"@Override\n\tpublic void onProgressUpdate() {\n\n\t}",
"@Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount());\n mProgressBar.setProgress((int) progress);\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n }",
"@Override\n protected void onProgressUpdate(Integer... values) {\n }",
"@Override\n\t\tprotected void onProgressUpdate(Integer... progress) {\n\t\t\tprogressBar.setVisibility(View.VISIBLE);\n\n\t\t\t// updating progress bar value\n\t\t\tprogressBar.setProgress(progress[0]);\n\n\t\t\t// updating percentage value\n\t\t\ttxtPercentage.setText(String.valueOf(progress[0]) + \"%\");\n\t\t}",
"void setProgress(int progress);",
"void setProgress(int progress);",
"public void increment() {\n sync.increment();\n }",
"@Override\n public void transferred(long num) {\n publishProgress((int) ((num / (float) totalSize) * 100));\n }",
"public synchronized void updateProgress(boolean completedOK) {\n\n if (completedOK) mCompletedOKCount++;\n\n mCompletedCount++;\n\n double total = mMusicObjectList.size();\n double count = mCompletedCount;\n int percent = (int) ((count / total) * 100d);\n\n mDownloadListener.onUpdate(percent);\n }",
"protected void updateProgress(Integer progress) {\n // Note to self: We don't bother updating the local \"job\" batch data\n batchService.updateBatchJobProgress(jobContext.getInstanceId(), progress);\n }",
"public String getProgress() {\n return this.progress;\n }",
"@Override\n \tpublic void updateProgress(int messageId) {\n \t}",
"@Override\r\n\t\tprotected void onProgressUpdate(Integer... values) {\n\t\t\tsuper.onProgressUpdate(values);\r\n\t\t\tsetProgress(values[0]);\r\n\t\t\t\r\n\r\n\t\t}",
"private void notifyTaskProgress(int action, int status, int progress) {\n Intent intent = new Intent(LocalAction.ACTION_BACKUP_SERVICE_RUNNING);\n intent.putExtra(ACTION, action);\n intent.putExtra(PROGRESS_STATUS, status);\n intent.putExtra(PROGRESS_VALUE, progress);\n intent.putExtra(CALLER_ID, mCallerId);\n mBroadcastManager.sendBroadcast(intent);\n // update the notification if required\n if (mNotificationBuilder != null) {\n mNotificationBuilder.setContentText(getNotificationContentText(status));\n mNotificationBuilder.setProgress(100, progress, false);\n startForeground(NotificationContract.NOTIFICATION_ID_BACKUP_PROGRESS, mNotificationBuilder.build());\n }\n }",
"public int getProgress() {\n\t\treturn activeQuest.getThreshold() - getRemaining();\n\t}"
] | [
"0.7056212",
"0.6892035",
"0.67945886",
"0.67724466",
"0.66650003",
"0.66650003",
"0.66650003",
"0.66494983",
"0.65871996",
"0.6559836",
"0.653933",
"0.653933",
"0.653933",
"0.6539064",
"0.6454606",
"0.64507484",
"0.6448521",
"0.64085364",
"0.63630897",
"0.63204205",
"0.6317541",
"0.63110054",
"0.62394434",
"0.6213822",
"0.6212497",
"0.62108016",
"0.6209107",
"0.62051105",
"0.61994934",
"0.61802346",
"0.617916",
"0.61507654",
"0.61425704",
"0.61415756",
"0.61415756",
"0.6123319",
"0.6104404",
"0.6104404",
"0.6102402",
"0.6101159",
"0.60808337",
"0.6079035",
"0.6073046",
"0.6062214",
"0.60519695",
"0.6044223",
"0.6041437",
"0.60355854",
"0.6034124",
"0.60182273",
"0.599635",
"0.5993241",
"0.59897053",
"0.5987139",
"0.5983379",
"0.5971941",
"0.59696066",
"0.5966613",
"0.59662116",
"0.5965187",
"0.59576106",
"0.59576106",
"0.59576106",
"0.59435093",
"0.5942758",
"0.5942021",
"0.59410006",
"0.59393734",
"0.5938122",
"0.5938122",
"0.5932876",
"0.5930573",
"0.5930573",
"0.5930573",
"0.5914098",
"0.5914098",
"0.5914098",
"0.58812785",
"0.5876013",
"0.5874603",
"0.58676344",
"0.5864361",
"0.5864361",
"0.5864361",
"0.5862754",
"0.5848807",
"0.5845352",
"0.5845352",
"0.5845338",
"0.5844701",
"0.5844701",
"0.58440554",
"0.58241254",
"0.5822826",
"0.58181363",
"0.5813411",
"0.58069277",
"0.5786601",
"0.57773566",
"0.5762062"
] | 0.68382186 | 2 |
push task update to supervisors | public static String supvUpdate(int supvid) { //taskid and update number
int failureid = -1;
try {
Statement st = conn.createStatement();
//select update numbers for tasks that this supervisor supervises
String getUpdate = "select otherstaskupdate from users where userid = " + supvid;
ResultSet updateResult = st.executeQuery(getUpdate);
if(updateResult.next()) {
Long[] updateNums = (Long[]) updateResult.getArray(1).getArray();
updateResult.close();
failureid = -2;
JSONArray updates = new JSONArray();
//for each update number get taskid in indvprogressupdate
for (Long num : updateNums) {
PreparedStatement ps = conn.prepareStatement("select * from progressupdate where updatenum = " + num);
ResultSet taskUpdates = ps.executeQuery();
failureid = -3;
taskUpdates.next();
failureid = -6;
String image = taskUpdates.getString(4);
failureid = -7;
int taskid = Integer.parseInt(taskUpdates.getString(2));
int userId = Integer.parseInt(taskUpdates.getString(5));
failureid = -4;
taskUpdates.close();
JSONObject update = new JSONObject();
update.put("TaskID", taskid);
update.put("UpdateNumber", num);
update.put("userId", userId);
update.put("image", image);
updates.put(update);
ps.close();
failureid = -5;
}
st.close();
return updates.toString();
}else {
return "failure";
}
} catch (SQLException e) {
return "" + failureid;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateTask() {}",
"boolean updateActiveTask(Task task);",
"boolean updateTask(Task updatedTask);",
"void refreshTaskInformation();",
"public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);",
"@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}",
"public void setTask(Task inTask){\n punchTask = inTask;\n }",
"@Override\r\n\tpublic void subTask(String name) {\n\t}",
"void addSubTask(AuctionTask task);",
"public void updateTasks(List<Task> listOfTasks);",
"public void startUpdateTask() {\n VoxelGamesLib.newChain().delay(config.signUpdateInterval, TimeUnit.SECONDS).sync(this::updateSigns).execute(this::startUpdateTask, (e, t) -> {\n log.warning(\"Error while updating signs, trying again...\");\n e.printStackTrace();\n startUpdateTask();\n });\n\n if (dirty) {\n persistenceHandler.getProvider().saveSigns(signLocations);\n if (markedForRemoval != null && markedForRemoval.size() > 0) {\n persistenceHandler.getProvider().deleteSigns(markedForRemoval);\n markedForRemoval.clear();\n }\n dirty = false;\n }\n }",
"public void submit(Runnable task){\n\t\tStatusTask stask = new StatusTask(task,this);\n\t\tpending.add(stask);\n\t}",
"@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}",
"public void submitSyncAppsTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncAppsTrafficTask()...\");\n\t\taddTask(new SyncAppsTrafficTask());\n\t}",
"protected abstract Version executeTaskLocal(Version theTask);",
"String addTask(Task task);",
"void pushToFirebase(Task task) {\n un_FirebaseRef_tasks.push().setValue(task);\n }",
"public void add(Task task){ this.tasks.add(task);}",
"@Override\n public CommandResult execute() {\n tasks.add(taskToAdd);\n try {\n storage.appendToFile(taskToAdd);\n return new CommandResult(String.format(MESSAGE_SUCCESS, taskToAdd));\n } catch (IOException e) {\n return new CommandResult(e.getMessage());\n }\n }",
"@Override\n\tpublic void task() {\n\t\tst.subTask();\n System.out.println(\"This is UI Task\");\n\t}",
"@Test\n\tpublic void updateTask() {\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\tfinal Task task = new Task(\"Task 1\", 1, 1, asgn.getID());\n\t\tasgn.addTask(task);\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\ttask.setPercentComplete(0.174);\n\t\tStorageService.updateTask(task);\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}",
"public void subTask(String name) {\n\r\n\t}",
"private void submitCollectSysTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectSysTrafficTask()...\");\n\t\taddTask(new CollectSysTrafficTask());\n\t}",
"@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}",
"public void submitSyncDeviceTrafficTask() {\n\t\tL.i(this.getClass(), \"SyncDeviceTrafficTask()...\");\n\t\taddTask(new SyncDeviceTrafficTask());\n\t}",
"@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }",
"@Override\n\tpublic void addTask(ISimpleTask task) {\n\t\ttry {\n\t\t\tqueue.put(task);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n\tpublic void testUpdateTask() {\n\t}",
"public void submit(Task task) {\n\t\tthis.engine.pushTask(task);\n\t}",
"void notifyMessage(Task task);",
"public void startTask() {\n\t}",
"void addTask(Task task);",
"public void execute() {\n\t\tthis.badgeId = studentWorkerOperation.AddNewBadge(this.badgeName, this.badgeDescription);\n\t}",
"@Override\n public void taskStarting() {\n\n }",
"int insertTask(TaskInfo taskInfo);",
"@EventListener(condition = \"!#event.domainObject.new\")\n\tpublic void onApplicationEventLookForUpdate(DomainObjectStoreEvent<Task> event) {\n\t\tEditeTask editeTask = new EditeTask();\n\t\tediteTask.setId(UUID.randomUUID().toString());\n\t\tTask task = event.getDomainObject();\n\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tUser cs = principal.getUser();\n\t\tif (cs.getIsAdmin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tSet<String> set = task.getDirtyAttributes();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator1 = set.iterator();\n\t\tList<String> list = new ArrayList<>();\n\t\twhile (iterator1.hasNext()) {\n\t\t\tlist.add((String) iterator1.next());\n\t\t}\n\n\t\tif (list.size() == 1 && list.contains(\"status\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString temp = (String) iterator.next();\n\t\t\tswitch (temp) {\n\t\t\tcase \"description\":\n\t\t\t\tediteTask.setDescription((String) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"deadline\":\n\t\t\t\tediteTask.setDeadline((LocalDateTime) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tediteTask.setType((TaskType) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"project\":\n\t\t\t\tediteTask.setProject((Project) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"taskPerformer\":\n\t\t\t\tediteTask.setTaskPerformer((User) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tediteTask.setTaskId(task.getId());\n\t\tediteTaskRepository.save(editeTask);\n\t\tif (!cs.getIsAdmin()) {\n\t\t\ttask.setIsCheck(false);\n\t\t\ttask.setStatus(Status.CLOSED);\n\t\t} else {\n\t\t\ttask.setIsCheck(true);\n\t\t}\n\t}",
"@Override\n public boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus)\n throws IOException, InterruptedException {\n superStepCount = taskStatus.getSuperstepCount();\n return true;\n }",
"TaskResponse updateTask(TaskRequest taskRequest, Long taskId);",
"public void addTask(Task t){\n\t\ttry {\n\t\t\taction.put(t);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void updateTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n todoTaskGui(\"Update\", task);\r\n }\r\n }",
"void setAggregatedTask(Task aggregatedTask);",
"void updateTask(UserDto user);",
"@Override\n public void run() {\n ShellResponse response =\n getNodeManager().nodeCommand(NodeManager.NodeCommandType.Configure, taskParams());\n processShellResponse(response);\n\n if (taskParams().type == UpgradeUniverse.UpgradeTaskType.Everything\n && !taskParams().updateMasterAddrsOnly) {\n // Check cronjob status if installing software.\n response = getNodeManager().nodeCommand(NodeManager.NodeCommandType.CronCheck, taskParams());\n\n // Create an alert if the cronjobs failed to be created on this node.\n if (response.code != 0) {\n Universe universe = Universe.getOrBadRequest(taskParams().universeUUID);\n Customer cust = Customer.get(universe.customerId);\n String alertErrCode = \"CRON_CREATION_FAILURE\";\n String nodeName = taskParams().nodeName;\n String alertMsg =\n \"Universe %s was successfully created but failed to \"\n + \"create cronjobs on some nodes (%s)\";\n\n // Persist node cronjob status into the DB.\n UniverseUpdater updater =\n new UniverseUpdater() {\n @Override\n public void run(Universe universe) {\n UniverseDefinitionTaskParams universeDetails = universe.getUniverseDetails();\n NodeDetails node = universe.getNode(nodeName);\n node.cronsActive = false;\n LOG.info(\n \"Updated \"\n + nodeName\n + \" cronjob status to inactive from universe \"\n + taskParams().universeUUID);\n }\n };\n saveUniverseDetails(updater);\n\n // Create new alert or update existing alert with current node name if alert already exists.\n if (Alert.exists(alertErrCode, universe.universeUUID)) {\n Alert cronAlert = Alert.list(cust.uuid, alertErrCode, universe.universeUUID).get(0);\n List<String> failedNodesList =\n universe\n .getNodes()\n .stream()\n .map(nodeDetail -> nodeDetail.nodeName)\n .collect(Collectors.toList());\n String failedNodesString = String.join(\", \", failedNodesList);\n cronAlert.update(String.format(alertMsg, universe.name, failedNodesString));\n } else {\n Alert.create(\n cust.uuid,\n universe.universeUUID,\n Alert.TargetType.UniverseType,\n alertErrCode,\n \"Warning\",\n String.format(alertMsg, universe.name, nodeName));\n }\n }\n\n // We set the node state to SoftwareInstalled when configuration type is Everything.\n // TODO: Why is upgrade task type used to map to node state update?\n setNodeState(NodeDetails.NodeState.SoftwareInstalled);\n }\n }",
"boolean addTask(Task newTask);",
"public static int addProgressUpdate(int taskid, String image, int myId){\n try {\n Statement st = conn.createStatement();\n int updateNum;\n //select supervisors for this task\n String getSupervisors = \"select member from grouptask where taskid = \" + taskid;\n ResultSet supvResult = st.executeQuery(getSupervisors);\n if(supvResult.next()) {\n Long[] supervisors = (Long[]) supvResult.getArray(1).getArray();\n supvResult.close();\n //find number of update for this task\n ResultSet maxUpdateNum = st.executeQuery(\"select max(updatenum) from progressupdate\");\n maxUpdateNum.next();\n String updateNumStr = maxUpdateNum.getString(1);\n updateNum = (updateNumStr == null) ? 1 : Integer.parseInt(updateNumStr) + 1;\n String updateProgress = \"INSERT INTO progressupdate VALUES(%d, %d, -1,'{%s}', %d)\";\n String sndBaseString = String.format(updateProgress, updateNum, taskid, image, myId);\n PreparedStatement ps = conn.prepareStatement(sndBaseString);\n ps.executeUpdate();\n ps.close();\n //update user for supervisors for this task\n for(Long supv: supervisors) {\n st.executeUpdate(\"UPDATE users SET otherstaskupdate = array_append(otherstaskupdate, '\" + updateNum +\"') WHERE userid = \" + supv);\n System.out.println(\"update otherstaskupdate in users for members \" + supv);\n }\n } else {\n return SERVER_FAILURE;\n }\n st.close();\n return updateNum;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"private void queueTask(Version theTask) {\n\tsynchronized(_taskQueue) {\n\t _taskQueue.add(theTask);\n\t}\n }",
"synchronized void putWork(PartialSolution sp) {\n\t\ttasks.add(sp);\n\t\t/* anuntam unul dintre workerii care asteptau */\n\t\tthis.notify();\n\n\t}",
"public void submitMonitorDeviceTrafficTask() {\n\t\tL.i(this.getClass(), \"MonitorDeviceTrafficTask()...\");\n\t\taddTask(new MonitorDeviceTrafficTask());\n\t}",
"public void addTask(Task task) {\n\t\tMessage msg=new Message(null, null, task);\n\t\ttry {\n\t\t\tchannel.send(msg);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\t//Runtime exception with info for use in debugging\n\t\t\tthrow new RuntimeException(ex.getMessage());\n\t\t}\n\t}",
"public interface TaskBase {\n\t/**\n\t * @return Returns the name of the task\n\t */\n\tpublic String GetName();\n\n\t/**\n\t * Called upon entering autonomous mode\n\t */\n\tpublic void Initialize();\n\n\t/**\n\t * Called every autonomous update\n\t * \n\t * @return Return task result enum\n\t */\n\tpublic TaskReturnType Run();\n\n}",
"void event(long t) {\n\r\n \r\n\r\n Job temp;\r\n if (this.TempListMigrating.front != null) { //if there are any new migrating tasks\r\n TempListMigrating.insertionSortIdentifier(this.TempListMigrating.front); //order the TempList, from smallest-largest\r\n\r\n while (this.TempListMigrating.front != null) {\r\n //TempList.calculateD(t);\r\n temp = TempListMigrating.remove();\r\n int assignedProcessor = this.getNextProcessor(temp);\r\n\r\n //add this task to the processor\r\n this.servers[this.Tasks[temp.identifier].index[assignedProcessor]].addToMigratingPool(temp);\r\n\r\n }\r\n }\r\n\r\n while (this.TempListFixed.front != null) {\r\n\r\n temp = TempListFixed.remove();\r\n this.servers[this.Tasks[temp.identifier].index[0]].pool.insertionSortDeadline(temp, t);\r\n\r\n }\r\n\r\n //add things to the processor now\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n if (this.servers[i].executing.top != null) { //not empty, there is a job present\r\n //check for migrating tasks\r\n if (this.servers[i].migratingPool.front != null) {\r\n //there are migrating Tasks, and something on the stack\r\n if (this.Tasks[this.servers[i].executing.top.identifier].numMigrations < 2 || this.Tasks[this.servers[i].executing.top.identifier].fixed == true) { //executing is a fixed task\r\n if (servers[i].migratingPool.front != null) {\r\n //switch\r\n temp = servers[i].executing.top;\r\n servers[i].executing.top = servers[i].migratingPool.remove();\r\n servers[i].pool.insertionSortDeadline(temp, t);\r\n this.preemptions++;\r\n\r\n }\r\n } //if both migrating tasks\r\n else if (this.servers[i].migratingPool.front.identifier < servers[i].executing.top.identifier) {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n } else if (this.servers[i].pool.front != null)//check for fixed tasks\r\n {\r\n if (this.servers[i].pool.front.deadline < servers[i].executing.top.deadline) {\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n this.preemptions++;\r\n }\r\n }\r\n\r\n } else if (this.servers[i].migratingPool.front != null) //it was empty, add now migrating\r\n {\r\n temp = servers[i].migratingPool.remove();\r\n servers[i].executing.top=temp;\r\n \r\n \r\n\r\n } else if (this.servers[i].pool.front != null) //executing was empty, and migratingPool was empty, add from fixed list\r\n {\r\n\r\n temp = servers[i].pool.remove();\r\n servers[i].executing.top = temp; //add to the EMPTY stack\r\n }\r\n\r\n }\r\n }",
"@Override\r\n\tpublic void doTask() {\n\t}",
"protected void postTask(Task __task) {\r\n\t\tlock.lock();\r\n\t\ttry {\r\n\t\t\ttaskList.addLast(__task);\r\n\t\t\tcondition.signalAll();\r\n\t\t} finally {\r\n\t\t\tlock.unlock();\r\n\t\t}\r\n\t}",
"@Transactional \n public void start(){\n\t \n System.out.println(repositoryService.createDeployment().addClasspathResource(\"diagrams/taskProcess.bpmn\").deploy().getName());\n Map<String, Object> vars1 = new HashMap<String, Object>();\n\t \n\tString procId = runtimeService.startProcessInstanceByKey(\"myProcess\", vars1).getId();\n \n System.out.println(\"启动流程流程id=\"+procId);\n \n // 获得第一个任务\n List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(\"bin\").list();\n //List<Task> tasks = taskService.createTaskQuery().taskCandidateUser(\"test\").list();\n for (Task task : tasks) {\n System.out.println(\"要分配的任名称 \" + task.getName());\n //分配的用户\n taskService.claim(task.getId(), \"bin\");\n }\n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n for (Task task : tasks) {\n System.out.println(\"接收到的任务 \" + task.getName());\n // 执行(完成)任务\n taskService.complete(task.getId());\n } \n \n tasks = taskService.createTaskQuery().taskCandidateGroup(\"management\").list();\n for (Task task : tasks) {\n System.out.println(\"分配任务\" + task.getName());\n // 分配给的人\n taskService.claim(task.getId(), \"bin\");\n \n }\n \n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n \n for (Task task : tasks) {\n \t System.out.println(\"收到的任务\" + task.getName());\n taskService.complete(task.getId());\n }\n \n \n }",
"public void updateTaskStatus(CaptureTask task, String status, String description) {\n\t\t\r\n\t}",
"@Override\n public void run() {\n if (this.nodeEventUpdateRequest.getAndSet(false)) {\n nodeEventPush.send(FirePushEventsEnum.NODE_EVENT.getMessage());\n }\n if (this.runTaskEventUpdateRequest.getAndSet(false)) {\n runTaskPush.send(FirePushEventsEnum.RUN_TASK_EVENT.getMessage());\n }\n }",
"private void submitCollectAppsTrafficTask() {\n\t\tL.i(this.getClass(), \"CollectAppsTrafficTask()...\");\n\t\taddTask(new CollectAppsTrafficTask());\n\t}",
"public void addTask(final BTask t) {\n\t\tbloc.addLast(t);\n\t}",
"protected void startProcessAndCompleteUserTask() {\n runtimeService.startProcessInstanceByKey(\"HistoryLevelTest\");\n Task task = taskService.createTaskQuery().singleResult();\n taskService.complete(task.getId());\n }",
"public void taskexecution(Task task) {\n synchronized (list) {\n list.add(task);\n list.notify();\n }\n }",
"public void executeTask(Version theTask) {\n\n\tif (_stoppedTasks.contains(theTask)) {\n\t // todo: what to do here???\n\t // this task obviously didn't perform well .. \n\t // and now, there's another request to run it!\n\t if (true) {\n\t\t// either try the task again ... \n\t\t_stoppedTasks.remove(theTask);\n\t } else {\n\t\t// or, refuse to run it at all \n\t\treturn;\n\t }\n\t}\n\t\n\t// System.out.println(\" - - - - - - - - - - - PSL! entered executeTask, parameter version> \" + theTask);\n\t// if (_versionCache.contains(theTask)) return;\n\n\n\t// add the pre-execution task to our knowledge base\n\t// replicate it so that in case of a crash we may recover\n\t_versionCache.addVersion(theTask);\n\treplicate(theTask);\n\n\t// tell replicators that we are about to start executing\n\talertReplicatorsExecutingTask(theTask);\n\n\tString taskName = ((TaskDefinition)theTask.data()).getName();\n\n\t// execute the task and get the next task\n\tVersion nextTask = executeTaskLocal(theTask);\n\t_log.completedTaskLocal(theTask);\n\n\tif (_stoppedTasks.contains(theTask)) {\n\t // this task was supposed to be stopped .. can ignore result\n\t _stoppedTasks.remove(theTask);\n\t _log.ignoreResultsOfStoppedTask(theTask);\n\t} else if (nextTask == null) { \n\t // this only happens if we have reached\n\t // the end of the workflow execution \n\t // tell replicators that everything is done.\n\t System.out.println(\"WORKFLOW IS DONE\");\n\t alertReplicatorsDoneExecutingTask(theTask);\n\t} else {\n\t nextTask.append(taskName);\n\t // todo: we need to find a way to replicate the \n\t // post-execution task in a clean way. The here-under\n\t // commented code does not work as it creates a version clash.\n\t // todo: 16-Feb maybe uncomment this??\n\t // _versionCache.addVersion(nextTask);\n\n\t // set the next task for execution\n\t queueTask(nextTask);\n\t // tell the replicators we are done executing the task, they\n\t // don't have to worry about things anymore.\n\t alertReplicatorsDoneExecutingTask(theTask);\n\t}\n }",
"void add(final Task task);",
"protected void setupTask(Task task) {\n }",
"void sendScheduledNotifications(JobProgress progress);",
"public void add(Task task)\n {\n this.tasks.add(task);\n }",
"public void subTask(String tr) {\n\t\t\n\t}",
"public static int supvCheck(int myId, int taskid, int updatenum){\n try {\n Statement st = conn.createStatement();\n\n //add checkerid in indvprogressupdate for this updatenum\n String addChecker = \"UPDATE progressupdate SET checkerid = %d WHERE updatenum = \" + updatenum ;\n st.executeUpdate(String.format(addChecker, myId));\n\n //remove updatenum from indvsupvupdate in user for supv\n //TODO remove all otherstaskupdate of all group member\n String getMembersCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskid;\n ResultSet taskInfo = st.executeQuery(getMembersCommand);\n taskInfo.next();\n Long[] members = (Long[])taskInfo.getArray(\"member\").getArray();\n for(Long memberid : members){\n String removeUpdate = \"UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = \" + memberid ;\n st.executeUpdate(String.format(removeUpdate, updatenum));\n }\n\n //update task owner progress(increment) in individual TODO:check deadline, repetition etc.\n //String updateMyIndv = \"UPDATE grouptask SET progress = progress + 1 WHERE taskid =\" + taskid;\n //st.executeUpdate(updateMyIndv);\n\n //add updatenum to indvupdate in user\n ResultSet ownerResult = st.executeQuery(\"SELECT userid FROM progressupdate WHERE updatenum =\" + updatenum);\n ownerResult.next();\n int ownerid = Integer.parseInt(ownerResult.getString(\"userid\"));\n String addIndvUpdate = \"UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;\";\n st.execute(String.format(addIndvUpdate, updatenum , ownerid));\n\n //TODO update progress\n String progressTrackCommand = String.format(\n \"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d\",\n taskid, ownerid);\n st.executeUpdate(progressTrackCommand);\n\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"@Override\r\n\tpublic Task addTask(Task task) {\n\t\treturn taskRepository.save(task);\r\n\t}",
"private void addTaskToServer() {\n\t\twriter.println();\n\t\tSystem.out.println();\n\t\tNumberFormat formatter = new DecimalFormat(\"#0.00000\");\n\t\tfor (Iterator<Task> iterator = this.generatedTasks.iterator(); iterator.hasNext();) {\n\t\t\tTask t = iterator.next();\n\t\t\twriter.println(\"current time=\" + currentTime + \" ,tasks not assigned \" + t.getArrivalTime() + \" \"\n\t\t\t\t\t+ t.getprocessingTime());\n\t\t\tSystem.out.println(\"current time=\" + currentTime + \" ,tasks not assigned \" + t.getArrivalTime() + \" \"\n\t\t\t\t\t+ t.getprocessingTime());\n\t\t\tif (t.getArrivalTime() == currentTime || t.isLateProcessing()) {\n\t\t\t\t// if it can be dispatched\n\t\t\t\tif (this.scheduler.dispatchTask(t) == true)\n\t\t\t\t\titerator.remove();\n\t\t\t\telse\n\t\t\t\t\tt.setLateProcessing(true);\n\t\t\t}\n\t\t}\n\t}",
"public void execute(Ui ui, TaskList tasklist){\r\n tasklist.addTask(task);\r\n ui.printMessage(\"Got it. I've added this task: \");\r\n ui.printMessage(task.getTaskDetails());\r\n }",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\t\t\t\tif(mSp.getBoolean(\"auto_update\", true)){\r\n\t\t\t\t\tupdateUtils.getCloudVersion();//当获取当前包名后就发出请求\r\n\t\t\t\t}else{\r\n\t\t\t\t\tupdateUtils.enterHome();\r\n\t\t\t\t}\t\r\n\t\t\t}",
"private void updateTask(ICompositeCheatSheetTask task) {\n \t\tif (task==null || task != selectedTask) return;\n \t\tif ( task instanceof EditableTask) {\n \t\t\tEditableTask editable = (EditableTask)task;\n \t\t\tif (editable.getState() == ICompositeCheatSheetTask.IN_PROGRESS) {\n \t\t\t\tshowEditor(editable);\n \t\t\t\treturn;\n \t\t\t} else if (editable.isUnderReview()) {\n \t\t\t\tif (editable.getState() == ICompositeCheatSheetTask.COMPLETED) {\n \t\t\t\t\tshowEditor(editable);\n \t\t\t\t} else {\n \t\t\t\t\tendReview(editable);\n \t\t\t\t}\n \t\t\t\treturn;\n \t\t\t}\n \t\t} \n \t\tshowDescription(task);\n \t}",
"public void setTask(Task task) {\n this.task = task;\n }",
"public BotTaskExecutor(SlackSession session) {\n LOG.info(\"Start time: {}\", String.format(\"%1$-2d:%2$-2d\", START_HOUR, START_MIN));\n\n SlackChannel channelBotMain = session.findChannelByName(Constants.BOT_MAIN_CHANNEL);\n\n // Enable/disabe the Meetup bot\n if (PropertiesUtil.getBooleanProperty(Constants.MEETUP_ENABLE, true)) {\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start MEETUP task\");\n SlackBot.messageAdmins(session, \"Failed to start MEETUP task\");\n } else {\n TASKS.add(new MeetupBotTask(EXECUTOR_SERVICE, \"MEETUP\", START_HOUR, START_MIN, session, channelBotMain));\n }\n }\n\n if (PropertiesUtil.getBooleanProperty(Constants.BOT_TEST, false)) {\n channelBotMain = session.findChannelByName(\"random\");\n } else {\n channelBotMain = session.findChannelById(PropertiesUtil.getProperty(Constants.WBB_CHANNEL_ID));\n }\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start WBB task\");\n SlackBot.messageAdmins(session, \"Failed to start WBB task\");\n } else {\n TASKS.add(new WbbBotTask(EXECUTOR_SERVICE, \"WBB\", START_HOUR, START_MIN, session, channelBotMain));\n }\n\n channelBotMain = session.findChannelByName(Constants.BOT_MAIN_CHANNEL);\n if (channelBotMain == null) {\n LOG.warn(\"Failed to start UPGRADE task\");\n SlackBot.messageAdmins(session, \"Failed to start UPGRADE task\");\n } else {\n // Start the upgrade task at 0600\n TASKS.add(new UpgradeTask(EXECUTOR_SERVICE, \"UPGRADE\", 6, 0, session, channelBotMain));\n }\n\n startAll();\n }",
"@Override\n\t\t\tpublic void beginTask(String name, int totalWork) {\n\t\t\t\t\n\t\t\t}",
"public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}",
"void addDoneTasks(List<Task> task);",
"@Override\n public int update(PWsdTaskdataDomain pWsdTaskdataDomain) {\n return getPersistanceManager().update(getNamespace() + \".update\", pWsdTaskdataDomain);\n }",
"public void add(final Task task) {\n }",
"@Override\n public void saveTask(TaskEntity task) {\n this.save(task);\n }",
"@Override\n public void execute(TaskListHandler handler, Storage storage, String input) throws DukeException {\n ArrayList<Task> taskList = handler.getTasks();\n handler.addToList(newTask);\n Ui.printSuccess(\"add\", newTask, taskList);\n handler.saveCurrentTaskList(input);\n storage.saveToFile(taskList);\n }",
"public interface UploadTaskService {\n void submitTask(UploadTask task);//添加任务\n}",
"public abstract void task();",
"@Override\n\tpublic void addTask(Teatask ta)\n\t{\n\t\tteataskMapper.addTask(ta);\n\t}",
"public void onClick(View v) {\n Task task = new Task();\n task.setTask_id(key); // Use the generated key from the database as id.\n task.setMessage(editText.getText().toString());\n String rating = spinner.getSelectedItem().toString();\n task.setPriority(rating);\n\n // we need to convert our model into a Hashmap since Firebase cannot save custom classes.\n // String/ArrayList/Integer and Hashmap are the only supported types.\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put( key, task.toFirebaseObject());\n\n database.child(\"users\").child(currentUserID).child(\"taskList\").updateChildren(childUpdates, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n // Return to previous activity\n finish();\n }\n }\n });\n }",
"public void updateStatus() {\n var taskStatuses = new ArrayList<OptimizationTaskStatus>();\n\n synchronized (tasks) {\n for (var task : tasks.values()) {\n taskStatuses.add(task.getStatus());\n }\n }\n\n wrapper.setStatus(JsonSerializer.toJson(new OptimizationToolStatus(taskStatuses)));\n }",
"@Override\n public void execute() {\n pickUp.collect();\n \n }",
"private void assignWork(String worker, String task) {\n System.out.println(\"assign work and create node \" + worker + \"/task\");\n zk.setData(worker, task.getBytes(), -1,\n (rc, path, ctx, data) -> {\n System.out.println(KeeperException.Code.get(rc));\n logger.info(\"DISTMASTER: task \" + task + \" has been created\");\n }, null);\n }",
"public void updateTaskViews(){\n for (Task task : taskManager.getTasksList()){\n TextView textToChange = (TextView) root.findViewById(task.getIdInView());\n if (textToChange == null){\n submit(task.getName(), task.getIdInView(), task.getTimeForTask(), task.isFinished());\n } else {\n textToChange.setText(task.getName());\n }\n }\n }",
"void addDoneTask(Task task);",
"@Override\n\tpublic Task processTasks(Task task) {\n\t\tint[] solution =knapsackSolverService.solve(task);\n\t\tif(solution!= null) {\n\t\t\ttask =persistTaskAndSolution(task, solution);\n\t\t}\n\t\treturn task;\n\t}",
"@Override\n public void run() {\n task.run();\n }",
"private void updateFinishedTask(DataSnapshot dataSnapshot) {\n finished_firebaseRef_tasks.push().setValue(dataSnapshot);\n }",
"@Override\n public UpdateFuotaTaskResult updateFuotaTask(UpdateFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateFuotaTask(request);\n }",
"public void onTempPowerSaveWhitelistChanged(AppStateTracker sender) {\n updateAllJobs();\n }",
"@Override\n\tpublic void initTask() {\n\t\tRankTempInfo rankInfo = RankServerManager.getInstance().getRankTempInfo(player.getPlayerId());\n\t\tif(rankInfo!=null){\n\t\t\tgetTask().getTaskInfo().setProcess((int)rankInfo.getSoul());\n\t\t}\n\t}",
"private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"abstract ClusterTask getSessionUpdateTask();",
"public void updateTask() {\n super.updateTask();\n bean.getLookHelper().setLookPosition((double) bean.getPosition().getX() + 0.5D, (double) (this.destinationBlock.getY() + 1), (double) this.destinationBlock.getZ() + 0.5D, 10.0F, (float) bean.getVerticalFaceSpeed());\n\n if (this.getIsAboveDestination()) {\n World world = bean.world;\n BlockPos blockpos = this.destinationBlock.up();\n IBlockState iblockstate = world.getBlockState(blockpos);\n Block block = iblockstate.getBlock();\n\n if (plantAndCollect) {\n System.out.println(\"Work bean! [\" + bean.getPosition().toString() + \"]\");\n }\n\n if (this.currentTask == 0 && block instanceof BlockCropPinto && ((BlockCropPinto) block).isMaxAge(iblockstate)) {\n world.destroyBlock(blockpos, true);\n } else if (this.currentTask == 1 && iblockstate.getMaterial() == Material.AIR) {\n //BEAN NEEDS INVENTORY FOR THIS TO BE ENABLED\n if (plantAndCollect) {\n System.out.println(\"Work bean! [\" + bean.getPosition().toString() + \"]\");\n ItemStackHandler inventory = ((EntityWorkBean)bean).getWorkBeanInventory();\n\n for (int i = 0; i < inventory.getSlots(); ++i) {\n ItemStack itemstack = inventory.getStackInSlot(i);\n boolean flag = false;\n\n if (itemstack.getItem() instanceof ItemBeanPinto) {\n world.setBlockState(blockpos, ModBlocks.blockCropPinto.getDefaultState(), 3);\n flag = true;\n }\n\n //If we want it to harvest all kinds of crops\n// if (!itemstack.isEmpty()) {\n// if (itemstack.getItem() instanceof net.minecraftforge.common.IPlantable) {\n// if (((net.minecraftforge.common.IPlantable) itemstack.getItem()).getPlantType(world, blockpos) == net.minecraftforge.common.EnumPlantType.Crop) {\n// world.setBlockState(blockpos, ((net.minecraftforge.common.IPlantable) itemstack.getItem()).getPlant(world, blockpos), 3);\n// flag = true;\n// }\n// }\n// }\n\n if (flag) {\n itemstack.shrink(1);\n\n if (itemstack.isEmpty()) {\n inventory.setStackInSlot(i, ItemStack.EMPTY);\n }\n\n break;\n }\n }\n }\n }\n\n this.currentTask = -1;\n this.runDelay = 10;\n }\n }",
"public void increase() {\r\n\t\t\tsynchronized (activity.getTaskTracker()) {\r\n\t\t\t\tactivity.getTaskTracker().count++;\r\n\t\t\t\tLog.d(LOGTAG, \"Incremented task count to \" + count);\r\n\t\t\t}\r\n\t\t}",
"private void alertReplicatorsExecutingTask(Version theTask) {\n\tsynchronized(_replicatorQueue) {\n\t for (int i = 0; i < _replicatorQueue.size(); i++) {\n\t\tReplicatorHandle rh = (ReplicatorHandle) \n\t\t _replicatorQueue.get(i);\n\t\trh.alertExecutingTask(theTask, this);\n\t }\n\t}\t\n }"
] | [
"0.74720377",
"0.63416535",
"0.6335162",
"0.6305148",
"0.61655",
"0.61461747",
"0.61138874",
"0.6101877",
"0.60840976",
"0.60628945",
"0.60186934",
"0.6008036",
"0.59972245",
"0.5976257",
"0.5950469",
"0.5905499",
"0.58980906",
"0.5889272",
"0.58704096",
"0.58703464",
"0.5859345",
"0.58371687",
"0.582787",
"0.58219695",
"0.579413",
"0.57851624",
"0.57784486",
"0.57513535",
"0.5721051",
"0.5719692",
"0.57177615",
"0.5713783",
"0.56978685",
"0.5682518",
"0.567936",
"0.5660586",
"0.56599915",
"0.56306297",
"0.56272566",
"0.56267893",
"0.5612044",
"0.56114167",
"0.5600555",
"0.55684483",
"0.55624247",
"0.5552854",
"0.55453575",
"0.55321485",
"0.550434",
"0.5502401",
"0.5498066",
"0.54954445",
"0.5494484",
"0.5494151",
"0.54886377",
"0.5486596",
"0.5477954",
"0.54750216",
"0.5469831",
"0.5469705",
"0.54658705",
"0.54651177",
"0.54618496",
"0.5421989",
"0.5421498",
"0.54200137",
"0.54170525",
"0.5415037",
"0.54131156",
"0.5412905",
"0.5406836",
"0.5403379",
"0.5399241",
"0.5398309",
"0.53974324",
"0.53907096",
"0.53880966",
"0.53863406",
"0.53827554",
"0.53653497",
"0.53618044",
"0.5361744",
"0.53613746",
"0.5354671",
"0.5353652",
"0.53513926",
"0.53463274",
"0.5346005",
"0.5345082",
"0.534477",
"0.5343628",
"0.53432536",
"0.5342307",
"0.53355587",
"0.5334327",
"0.5330226",
"0.53241247",
"0.531208",
"0.53083086",
"0.530683",
"0.5305945"
] | 0.0 | -1 |
when a supervisor check a task, myid is supervisor id | public static int supvCheck(int myId, int taskid, int updatenum){
try {
Statement st = conn.createStatement();
//add checkerid in indvprogressupdate for this updatenum
String addChecker = "UPDATE progressupdate SET checkerid = %d WHERE updatenum = " + updatenum ;
st.executeUpdate(String.format(addChecker, myId));
//remove updatenum from indvsupvupdate in user for supv
//TODO remove all otherstaskupdate of all group member
String getMembersCommand = "SELECT * FROM grouptask WHERE taskid = " + taskid;
ResultSet taskInfo = st.executeQuery(getMembersCommand);
taskInfo.next();
Long[] members = (Long[])taskInfo.getArray("member").getArray();
for(Long memberid : members){
String removeUpdate = "UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = " + memberid ;
st.executeUpdate(String.format(removeUpdate, updatenum));
}
//update task owner progress(increment) in individual TODO:check deadline, repetition etc.
//String updateMyIndv = "UPDATE grouptask SET progress = progress + 1 WHERE taskid =" + taskid;
//st.executeUpdate(updateMyIndv);
//add updatenum to indvupdate in user
ResultSet ownerResult = st.executeQuery("SELECT userid FROM progressupdate WHERE updatenum =" + updatenum);
ownerResult.next();
int ownerid = Integer.parseInt(ownerResult.getString("userid"));
String addIndvUpdate = "UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;";
st.execute(String.format(addIndvUpdate, updatenum , ownerid));
//TODO update progress
String progressTrackCommand = String.format(
"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d",
taskid, ownerid);
st.executeUpdate(progressTrackCommand);
st.close();
return SUCCESS;
} catch (SQLException e) {
return SERVER_FAILURE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void checkTask(String task){\r\n\t\t\r\n\t}",
"protected void checkMyTask(GWCTask task) {\n \tcheckArgument(task.getJob()==this, \"Task %s does not belong to Job %s\", task.getTaskId(), this.getId());\n }",
"public Task getTask(Integer tid);",
"@Override\n\t\t\tpublic void subTask(String name) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\tpublic void subTask(String arg0) {\n\n\t\t}",
"@Override\n public String toString() {\n return \"Task no \"+id ;\n }",
"void claimTask(String userId, Long taskId);",
"Object getTaskId();",
"@Override\r\n\tpublic void subTask(String name) {\n\t}",
"public void subTask(String tr) {\n\t\t\n\t}",
"public void subTask(String name) {\n\r\n\t}",
"String getTaskId();",
"public void checkTask(String task){\r\n\t\tif (task == \"Shower\") {\r\n\t\tshower();\r\n\t\t}\r\n\t}",
"public void setTask(Task inTask){\n punchTask = inTask;\n }",
"public static ITask findTaskUserHasPermissionToSee(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n try {\r\n TaskQuery taskQuery1 = TaskQuery.create().where().taskId().isEqual(taskId);\r\n TaskQuery taskQuery2 = TaskQuery.create().where().currentUserIsInvolved();\r\n IUser user = Ivy.session().getSessionUser();\r\n if (user == null) {\r\n return null;\r\n }\r\n for (IRole role : user.getRoles()) {\r\n taskQuery2 = taskQuery2.where().or().roleIsInvolved(role);\r\n }\r\n return Ivy.wf().getTaskQueryExecutor().getFirstResult(taskQuery1.where().and(taskQuery2));\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }",
"boolean updateActiveTask(Task task);",
"@Override\n\tpublic Teatask getById(int taskid)\n\t{\n\t\treturn teataskMapper.getById(taskid);\n\t}",
"int createSubtask(int parentId);",
"boolean setTask(UUID uuid, IAnimeTask task);",
"@Override\n public void onTaskSelected(String taskId) {\n }",
"private void derivedTask(Task task) {\r\n if (task.aboveThreshold()) {\r\n float budget = task.getBudget().singleValue();\r\n float minSilent = parameters.SILENT_LEVEL / 100.0f;\r\n if (budget > minSilent)\r\n report(task.getSentence(), false); // report significient derived Tasks\r\n newTasks.add(task);\r\n }\r\n }",
"public void setTaskID(java.lang.Object taskID) {\n this.taskID = taskID;\n }",
"void delegateTask(Long taskId, String sourceUserId, String targetUserId);",
"@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n public List<UserPlanTask> UserPlanTaskEdit(long task_id) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n\r\n List<UserPlanTask> EditTask = null;\r\n try {\r\n EditTask = session.createQuery(\"from UserPlanTask where taskId='\" + task_id + \"'\").list();\r\n } catch (HibernateException HE) {\r\n System.out.println(HE);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return EditTask;\r\n }",
"void addSubTask(AuctionTask task);",
"@Override\n public void activateTask(@NonNull String taskId) {\n }",
"public void showTask(View v) {\n String taskIdStr = txtId.getText().toString();\n if (taskIdStr.isEmpty() || taskIdStr == null) {\n Toast.makeText(this, \"Please Insert task ID\", Toast.LENGTH_LONG).show();\n } else {\n try {\n int taskId = Integer.parseInt(taskIdStr);\n TaskModel taskmodel = taskManager.getTaskById(taskId);\n txtTaskName.setText(taskmodel.getTaskName());\n txtTaskDescription.setText(taskmodel.getTaskDescription());\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }",
"protected abstract TaskNode verify();",
"void nominateTask(String userId, List<String> userList, Long taskId);",
"@Override\n public boolean deleteTask(String id) {\n boolean deleted = false;\n try {\n deleted = dataAccessTosca.deleteHumanTaskInstance(id);\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return deleted;\n }",
"public int getCustTask()\n\t{\n\t\treturn task;\n\t}",
"@Transactional \n public void start(){\n\t \n System.out.println(repositoryService.createDeployment().addClasspathResource(\"diagrams/taskProcess.bpmn\").deploy().getName());\n Map<String, Object> vars1 = new HashMap<String, Object>();\n\t \n\tString procId = runtimeService.startProcessInstanceByKey(\"myProcess\", vars1).getId();\n \n System.out.println(\"启动流程流程id=\"+procId);\n \n // 获得第一个任务\n List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup(\"bin\").list();\n //List<Task> tasks = taskService.createTaskQuery().taskCandidateUser(\"test\").list();\n for (Task task : tasks) {\n System.out.println(\"要分配的任名称 \" + task.getName());\n //分配的用户\n taskService.claim(task.getId(), \"bin\");\n }\n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n for (Task task : tasks) {\n System.out.println(\"接收到的任务 \" + task.getName());\n // 执行(完成)任务\n taskService.complete(task.getId());\n } \n \n tasks = taskService.createTaskQuery().taskCandidateGroup(\"management\").list();\n for (Task task : tasks) {\n System.out.println(\"分配任务\" + task.getName());\n // 分配给的人\n taskService.claim(task.getId(), \"bin\");\n \n }\n \n \n tasks = taskService.createTaskQuery().taskAssignee(\"bin\").list();\n \n for (Task task : tasks) {\n \t System.out.println(\"收到的任务\" + task.getName());\n taskService.complete(task.getId());\n }\n \n \n }",
"@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public void startTask(Long taskId, String userId) {\n TaskServiceSession taskSession = null;\n try {\n taskSession = taskService.createSession();\n Task taskObj = taskSession.getTask(taskId);\n int sessionId = taskObj.getTaskData().getProcessSessionId();\n \n taskSession.taskOperation(Operation.Start, taskId, userId, null, null, null);\n eventSupport.fireTaskStarted(taskId, userId);\n }catch(Exception x) {\n throw new RuntimeException(\"startTask\", x);\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }",
"public int getTaskID() {\n\t\treturn taskID;\n\t}",
"int createParentTask();",
"_task selectByPrimaryKey(Integer taskid);",
"public Task getTask(String taskId, String userId) throws DaoException, DataObjectNotFoundException, SecurityException\r\n {\n dao = (TaskManagerDao) getDao();\r\n Task task = dao.selectTask(taskId,userId);\r\n if(task!=null) {\r\n // Task task = (Task)col.iterator().next();\r\n task.setAttendees(getAssignees(taskId));\r\n task.setReassignments(getReassignments(taskId));\r\n ResourceManager rm = (ResourceManager)Application.getInstance().getModule(ResourceManager.class);\r\n task.setResources(rm.getBookedResources(task.getId(),CalendarModule.DEFAULT_INSTANCE_ID)); return task;\r\n }else throw new DataObjectNotFoundException(); \r\n }",
"private void processTask(Task task) throws SQLException, DaoException {\n if (!task.isChanged()) {\n processTaskList(task.getSubTaskList());\n return;\n }\n\n if (task.isForDeletion()) {\n deleteTask(task);\n return;\n } else if (task.getId() != -1) {\n updateTask(task);\n } else {\n insertTask(task);\n }\n\n processTaskList(task.getSubTaskList());\n\n }",
"int insertTask(TaskInfo taskInfo);",
"void deleteTask(int id);",
"@Override\n\tpublic MemberVO idCheck(String userid) {\n\t\treturn sqlSession.selectOne(\"com.coderdy.myapp.member.dao.mapper.MemberMapper.idCheck\", userid);\n\t}",
"public void setTaskId(UUID taskId) {\n this.taskId = taskId;\n }",
"public void setTaskId(Integer taskId) {\n this.taskId = taskId;\n }",
"public void setTaskId(Integer taskId) {\n this.taskId = taskId;\n }",
"int getTask() {\n return task;\n }",
"boolean hasTask();",
"public java.lang.Object getTaskID() {\n return taskID;\n }",
"@Override\r\n\tpublic void deleteByTask(int taskId) {\n\t\tString sql = \"DELETE FROM executetask WHERE et_task_id = ?\";\r\n\t\tupdate(sql,taskId);\r\n\t}",
"@Override\r\n\tpublic ExecuteTask get(int memberId,int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_member_id = ? AND er_task_id = ?\";\r\n\t\treturn get(sql,memberId,taskId);\r\n\t}",
"public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }",
"private void alertReplicatorsExecutingTask(Version theTask) {\n\tsynchronized(_replicatorQueue) {\n\t for (int i = 0; i < _replicatorQueue.size(); i++) {\n\t\tReplicatorHandle rh = (ReplicatorHandle) \n\t\t _replicatorQueue.get(i);\n\t\trh.alertExecutingTask(theTask, this);\n\t }\n\t}\t\n }",
"public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);",
"public void execute(HashMap taskparams) {\n\t\t\n\t\tLOGGER.info(\"Starting ReminderDuplicateID Scheduled Task \");\n\t\t\n\t\tlookup= Platform.getService(tcLookupOperationsIntf.class);\n\t\t//userRepository=Platform.getService(UserRepository.class);\n\t\t//usrInfo = Platform.getService(UserInfo.class);\n\t\temailIntf = Platform.getService(tcEmailOperationsIntf.class);\n\t\tString lookupName= (String) taskparams.get(\"Lookup Name\");\n\t\tString emailTemp = (String) taskparams.get(\"Email Template\");\n\t\tLOGGER.info(\"lookupName \"+lookupName);\n\t\tLOGGER.info(\"emailTemp \"+emailTemp);\n\t\tHashMap<String,String> reminderDetMap = readLookupValues(lookup,lookupName);\n\t\tLOGGER.info(\"Lookup Map \"+reminderDetMap);\n\t\t\n\t\tif (reminderDetMap!=null && reminderDetMap.size()>0){\n\t\t\tfor (Entry<String, String> entry : reminderDetMap.entrySet()){\n\t\t\t\t//LOGGER.info(\"Inside for Loop \");\n\t\t\t\tString uid= entry.getKey();\n\t\t\t\tString decodeValue= entry.getValue();\n\t\t\t\tif (decodeValue!=null ){\n\t\t\t\t\t//LOGGER.info(\"Inside if and for \");\n\t\t\t\t\tString [] datenHrUid = decodeValue.split(\",\");\n\t\t\t\t\tString reminderDate = datenHrUid[0];\n\t\t\t\t\tString hrUID = datenHrUid[1];\n\t\t\t\t\tString attr= datenHrUid[2];\n\t\t\t\t\t//LOGGER.info(\" reminderDate\"+reminderDate+\" \"+hrUID);\n\t\t\t\t\tif (noOfDaysSinceCreation(reminderDate)==0){\n\t\t\t\t\t\tLOGGER.info(\"Now the reminder email would be sent\");\n\t\t\t\t\t\tsendNotification(uid,hrUID,emailTemp,attr);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tremoveLookupValues(lookup,lookupName);\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\n public boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus)\n throws IOException, InterruptedException {\n superStepCount = taskStatus.getSuperstepCount();\n return true;\n }",
"public String getTaskId(){\r\n\t\treturn this.taskId;\r\n\t}",
"Task selectByPrimaryKey(String taskid);",
"public void findClick(View v){\n String taskName = justAddedTextView.getText().toString();\n PlannerDBHandler handler = new PlannerDBHandler(this);\n\n //Task task = handler.findTask(taskName);\n }",
"public void deleteTask(Integer tid);",
"public void commissionRunway(String id);",
"@Override\n\tpublic void deleteByid(int taskid)\n\t{\n\t\tteataskMapper.deleteByid(taskid);\n\t}",
"public int getTaskId() {\n return taskId;\n }",
"public boolean submitTask(Task task) {\n\t\ttask.setId(UUID.randomUUID().toString());\n\n//\t\tif (m_tasks.size() % 2 == 0) {\n//\t\t\ttask.setStatus(TaskStatus.DONE);\n//\t\t} else {\n\t\ttask.setStatus(TaskStatus.PENDING);\n//\t\t}\n\t\tif(task.getFeature()==null || task.getFeature().equals(\"\"))\n\t\t\treturn false;\n\t\tString[] jobs = task.getFeature().split(\"\\\\|\");\n\t\t\n\t\tfor(int i=0; i<jobs.length; ++i) {\n\t\t\tString str = job.replaceFirst(\"@uuid\", task.getId());\n\t\t\tstr = str.replaceFirst(\"@run_id\", task.getId()+i);\n\t\t\tif(task.getHost() != null) \n\t\t\t\tstr = str.replaceFirst(\"@host\", task.getHost());\n\t\t\telse\n\t\t\t\tstr = str.replaceFirst(\"@host\", \"\");\n\t\t\tstr = str.replaceFirst(\"@job\", \"http://192.168.8.45:81/svn/dianping/dptest/dpautomation/\" + jobs[i]);\n\t\t\tif(task.getEnv() != null)\n\t\t\t\tstr = str.replaceFirst(\"@env\", task.getEnv());\n\t\t\telse\n\t\t\t\tstr = str.replaceFirst(\"@env\", \"\");\n\t\t\tstr = str.replaceFirst(\"@port\", \"\"+task.getPort());\n//\t\t\tString str = job.replaceAll(\"@uuid\", task.getId()).replaceFirst(\"@host\", task.getHost()).replaceFirst(\"@port\", \"\"+task.getPort()).replaceFirst(\n//\t\t\t\t\t\"@job\", \"http://192.168.8.45:81/svn/dianping/dptest/dpautomation/\" + jobs[i]).replaceFirst(\"@env\", task.getEnv());\n\t\t\tjedis.rpush(\"task\", str);\n\t\t\tSystem.out.println(str);\n\t\t}\n\t\t\n\t\tm_tasks.add(task);\n\t\treturn true;\n\t}",
"public void setTask(PickingRequest task) {\n this.task = task;\n }",
"public void setTaskId(String taskId) {\r\n\t\tthis.taskId=taskId;\r\n\t}",
"void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n\n MyApplication application = (MyApplication) this.getApplication();\n if( application.isCurrentTaskExist() && application.getCurrentTaskRecord().isExecuting()) {\n return START_REDELIVER_INTENT;\n }\n\n application.setCurrentTaskRecord(TaskRecord.getNextTaskRecord());\n\n if( application.isCurrentTaskExist() ){\n prepare( application.getCurrentTaskRecord() );\n }\n return START_REDELIVER_INTENT;\n }",
"@Override\n\tpublic void preExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Task begin execute!\");\n\t}",
"public void setTaskId(Integer taskId) {\n\t\tthis.taskId = taskId;\n\t}",
"@Test\n public void testStartTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n this.services.startTask(t.getId(), \"user1\");\n \n org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assert.assertEquals(Status.IN_PROGRESS, t.getStatus());\n }",
"public String getTaskId() {\n return this.taskId;\n }",
"public String getTask(){\n\treturn task;\n}",
"public void checkForSubtask(int i) throws IllegalCommandArgumentException {\n if (wordsOfInput[i].indexOf('@') == 0) {\n if ((!containsStartDate || !containsStartTime) && index > i) {\n index = i;\n tpsIndex = i;\n }\n String id = wordsOfInput[i].substring(1);\n try {\n builder.subTaskOf(Integer.parseInt(id));\n } catch (NumberFormatException e) {\n throw new IllegalCommandArgumentException(Constants.FEEDBACK_INVALID_SUBTASK,\n Constants.CommandParam.SUBTASKOF);\n }\n }\n }",
"@Override\r\n\tpublic List<ExecuteTask> getByTask(int taskId) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\"\r\n\t\t\t\t+ \" WHERE et_task_id = ?\";\r\n\t\treturn getForList(sql,taskId);\r\n\t}",
"@EventListener(condition = \"!#event.domainObject.new\")\n\tpublic void onApplicationEventLookForUpdate(DomainObjectStoreEvent<Task> event) {\n\t\tEditeTask editeTask = new EditeTask();\n\t\tediteTask.setId(UUID.randomUUID().toString());\n\t\tTask task = event.getDomainObject();\n\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tUser cs = principal.getUser();\n\t\tif (cs.getIsAdmin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tSet<String> set = task.getDirtyAttributes();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator1 = set.iterator();\n\t\tList<String> list = new ArrayList<>();\n\t\twhile (iterator1.hasNext()) {\n\t\t\tlist.add((String) iterator1.next());\n\t\t}\n\n\t\tif (list.size() == 1 && list.contains(\"status\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString temp = (String) iterator.next();\n\t\t\tswitch (temp) {\n\t\t\tcase \"description\":\n\t\t\t\tediteTask.setDescription((String) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"deadline\":\n\t\t\t\tediteTask.setDeadline((LocalDateTime) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tediteTask.setType((TaskType) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"project\":\n\t\t\t\tediteTask.setProject((Project) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"taskPerformer\":\n\t\t\t\tediteTask.setTaskPerformer((User) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tediteTask.setTaskId(task.getId());\n\t\tediteTaskRepository.save(editeTask);\n\t\tif (!cs.getIsAdmin()) {\n\t\t\ttask.setIsCheck(false);\n\t\t\ttask.setStatus(Status.CLOSED);\n\t\t} else {\n\t\t\ttask.setIsCheck(true);\n\t\t}\n\t}",
"public boolean containsTask(final int taskid) {\n return tasks.containsKey(taskid);\n }",
"public void createTasks(Integer _optID, String _tupleTag, String _taskType, String _info1, String _info2, String _destIP, String _port, String _location, long timestamp, Object _appSpecific){ \r\n //System.out.print(\"Create tasks\");\r\n boolean flag = false;\r\n String defaultIP = \"-1\";\r\n String defaultPort = \"-1\";\r\n \r\n //use wildcard to let one worker randomly choose the job to run\r\n //System.out.println(\"---What is optID: \" +_optID);\r\n if(_destIP.equals(\"RANDOM\")){\r\n int tempTaskID = getUpdatedTaskID();\r\n \r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,defaultIP,_info1,_info2,defaultPort,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n }\r\n //send tuples to all\r\n else if(_destIP.equals(\"ALL\")){\r\n //Iterate through all sites that subscribe to certain types of task \r\n //System.out.println(\"infoSys.getSiteList(): \"+infoSys.getSiteList());\r\n Iterator it = infoSys.getSiteList().entrySet().iterator();\r\n while (it.hasNext()) {\r\n Map.Entry entry = (Map.Entry) it.next();\r\n _destIP = ((String) entry.getKey());\r\n ConcurrentHashMap<String, String> subscribeType = (ConcurrentHashMap<String, String>) entry.getValue();\r\n \r\n //option 2, if there is multiple subscribers of a certain taskType in one site\r\n Iterator subIt = subscribeType.entrySet().iterator();\r\n while (subIt.hasNext()) {\r\n Map.Entry subEntry = (Map.Entry) subIt.next();\r\n String[] typeAndAssociate = subEntry.getValue().toString().split(\",\");\r\n if (typeAndAssociate[0].equals(_tupleTag) && typeAndAssociate[1].equals(_taskType)) {\r\n _port = subEntry.getKey().toString();\r\n\r\n int tempTaskID = getUpdatedTaskID();\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP, _info1,_info2,_port,_location, timestamp,_appSpecific);\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n //------THE TASK IS INSERTED HERE\r\n insertTask(tempTaskID);\r\n \r\n }\r\n }\r\n }\r\n }\r\n //if user choose one specific worker, only send the message to it\r\n else{ \r\n //System.out.println(infoSys.getSiteList());\r\n //Check if this subscriber exists\r\n if (infoSys.hasAssociateSubscriber(_destIP, _port)) {\r\n int tempTaskID = getUpdatedTaskID();\r\n //System.out.println(\"Master out: \"+\"--\"+_tupleTag+\"--\"+_taskType+\"--\"+_optID+\"--\"+_destIP+\"--\"+_budget+\"--\"+_deadline+\"--\"+_port);\r\n insertIntoParaList(tempTaskID, _optID, _tupleTag, _taskType,_destIP,_info1,_info2,_port,_location, timestamp,_appSpecific);\r\n flag = true;\r\n addEntryToResultList(_optID,flag);\r\n insertTask(tempTaskID);\r\n } else {\r\n System.out.println(\"Incorrect destIP or destPort for creating task!\");\r\n }\r\n } \r\n //create entry in resultList\r\n addEntryToResultList(_optID,flag);\r\n }",
"public static ITask findTaskById(final long taskId) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<ITask>() {\r\n public ITask call() throws Exception {\r\n ITask t = null;\r\n try {\r\n TaskQuery query = TaskQuery.create().where().taskId().isEqual(taskId);\r\n t = Ivy.wf().getGlobalContext().getTaskQueryExecutor().getResults(query).get(0);\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n }\r\n return t;\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }",
"void claimTask(String userId, List<TaskSummary> taskList);",
"public User_Task createUser_Task(String usertaskid, long user_task, long task_task, Date lastupdate, int status) {\r\n\t\t\t\tContentValues values = new ContentValues();\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKUSERFID,user_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKTASKFID, task_task);\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKLASTUPDATE, lastupdate.toString());\r\n\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKSTATUS, status);\r\n\t\t\t\t\r\n\t\t\t\tString[] str = {usertaskid};\r\n\t\t\t\t\r\n\t\t\t\tint affectedRows = database.update(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t\tvalues, MySQLHelper.COLUMN_USERTASKID + \" = ?\",\r\n\t\t\t\t\t\tstr);\r\n\t\t\t\t\r\n\t\t\t\tif (affectedRows == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tCursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + usertaskid, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tvalues.put(MySQLHelper.COLUMN_USERTASKID, usertaskid);\r\n\t\t\t\t\tlong insertId = database.insert(MySQLHelper.TABLE_USER_TASK, null,\r\n\t\t\t\t\t values);\r\n\t\t\t\t\t Cursor cursor = database.query(MySQLHelper.TABLE_USER_TASK,\r\n\t\t\t\t\t allColumns, MySQLHelper.COLUMN_USERTASKID + \" = \" + insertId, null,\r\n\t\t\t\t\t null, null, null);\r\n\t\t\t\t\t cursor.moveToFirst();\r\n\t\t\t\t\t User_Task newUser_Task = cursorToUser_Task(cursor);\r\n\t\t\t\t\t cursor.close();\r\n\t\t\t\t\t return newUser_Task;\r\n\t\t\t\t}\r\n\t\t\t}",
"@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)\n public void claimTask(Long taskId, String idRef, String userId, List<String> roles) throws TaskException {\n TaskServiceSession taskSession = null;\n try {\n taskSession = taskService.createSession();\n taskSession.taskOperation(Operation.Claim, taskId, userId, null, null, roles);\n Task taskObj = taskSession.getTask(taskId);\n int sessionId = taskObj.getTaskData().getProcessSessionId();\n eventSupport.fireTaskClaimed(taskId, userId);\n } catch(javax.persistence.RollbackException x) {\n Throwable firstCause = x.getCause();\n Throwable secondCause = null;\n if(firstCause != null) {\n secondCause = firstCause.getCause();\n }\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(\"claimTask() 1. exception = : \"+x);\n sBuilder.append(taskId);\n sBuilder.append(\"\\n\\tcause(s) = \"+x.getCause()+\"\\n\\t\"+secondCause);\n log.error(sBuilder.toString());\n throw new PermissionDeniedException(sBuilder.toString());\n }catch(RuntimeException x) {\n Throwable firstCause = x.getCause();\n Throwable secondCause = null;\n if(firstCause != null) {\n secondCause = firstCause.getCause();\n }\n StringBuilder sBuilder = new StringBuilder();\n sBuilder.append(\"claimTask() 2. exception = : \"+x);\n sBuilder.append(taskId);\n sBuilder.append(\"\\n\\tcause(s) = \"+x.getCause()+\"\\n\\t\"+secondCause);\n log.error(sBuilder.toString());\n throw new PermissionDeniedException(sBuilder.toString());\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n }",
"void removeSubTask(AuctionTask task);",
"@Override\n\tpublic void startRequest(int taskId) {\n\n\t}",
"void onTaskSelected(T t) {\n metrics.markSelection(t);\n for (CompletableTask.Listener<T> listener : listeners) {\n listener.onCreate(t);\n }\n }",
"@Override\n\tpublic int getStatus(Integer id) {\n\t\tint status = taxTaskDao.getStatus(id);\n\t\treturn status;\n\t}",
"private synchronized void startTask(Task task) {\n if (_scheduledTasks.get(task.table) == task) {\n _scheduledTasks.remove(task.table);\n }\n _runningTask = task;\n }",
"@Override\n public void activateFlower(@NonNull String taskId) {\n }",
"@Override\n\tpublic void task() {\n\t\tst.subTask();\n System.out.println(\"This is UI Task\");\n\t}",
"@Override\r\n\tpublic Optional<Task> findTask(Integer taskId) {\n\t\treturn taskRepository.findById(taskId);\r\n\t}",
"@Override\n\tpublic ZgTaskEntity selectTaskInfo(Integer id,String schedulingId) {\n\t\tzgTaskDao.updateIsRead(id);\n\t\tZgTaskEntity zgTask = zgTaskDao.selectTask(id);\n\t\tif(StringUtils.isNotBlank(schedulingId)){\n\t\t\tList<Long> joinPeople = ejSchedulingPeopleDao.selectJoinPeople(schedulingId);\n\t\t\tEjSchedulingEntity ejSchedulingEntity = ejSchedulingDao.selectById(schedulingId);\n\t\t\tzgTask.setJoinPeopleList(joinPeople);\n\t\t\tzgTask.setSchedulingCompere(ejSchedulingEntity.getCompere());\n\t\t\tzgTask.setSchedulingCreateUser(ejSchedulingEntity.getCreateUser());\n\t\t}\n//\t\tzgTaskEntityVo.setId(zgTask.getId());\n//\t\tzgTaskEntityVo.setCreateTime(zgTask.getCreateTime());\n//\t\tzgTaskEntityVo.setTaskType(zgTask.getTaskType());\n//\t\tzgTaskEntityVo.setUserId(zgTask.getUserId());\n//\t\tzgTaskEntityVo.setWorkTask(zgTask.getWorkTask());\n\t\t//查询完成情况\n\t\tList<ZgTaskFinishEntity> completionList = zgTaskFinishDao.selectCompletion(id);\n\t\t//查询督办情况\n\t\tList<ZgTaskFinishEntity> rigorousList = zgTaskFinishDao.selectRigorous(id);\n\t\tzgTask.setCompletionList(completionList);\n\t\tzgTask.setRigorousList(rigorousList);\n\t\tList<ZgTaskFinishEntity> finishList = zgTaskFinishDao.selectList(new EntityWrapper<ZgTaskFinishEntity>().and(\"task_id =\"+zgTask.getId()).and(\"schedule != 0\").orderBy(\"create_time asc\"));\n\t\tif(finishList.size() > 0){\n for (ZgTaskFinishEntity zgTaskFinishEntity:finishList) {\n List<EjSchedulingFileEntity> fileList = ejSchedulingFileDao.selectList(new EntityWrapper<EjSchedulingFileEntity>().and(\"finish_id =\"+zgTaskFinishEntity.getId()));\n zgTaskFinishEntity.setFileList(fileList);\n }\n }\n\t\tzgTask.setFinishList(finishList);\n\t\treturn zgTask;\n\t}",
"abstract boolean shouldTaskActivate();",
"public interface ITask {\n\n String getId();\n boolean isComplete();\n\n}",
"private boolean containsTask(Task task) {\n Iterator<Task> iterator = tasks.iterator();\n while (iterator.hasNext()) {\n Task nextTask = iterator.next();\n if (nextTask.getIdentifier().equals(task.getIdentifier())) {\n return true;\n }\n }\n\n return true;\n }",
"Map<String, Object> forceStartTaskInstance(User loginUser, int queueId);",
"public void setTask(Task task) {\n this.task = task;\n }",
"public void activatedTask(BudgetValue budget, Sentence sentence, boolean isInput) {\r\n Task task = new Task(sentence, budget, this);\r\n newTasks.add(task);\r\n }",
"public void inputTask(Task task) {\n \tif (task != null) {\n if (task.aboveThreshold()) { // set a threshold?\n report(task.getSentence(), true); // report input\n newTasks.add(task); // wait to be processed in the next cycle\n }\n }\n }",
"boolean isBlockedBy(Task otherTask);",
"private Integer mapTaskID(Integer id)\r\n {\r\n Integer mappedID = m_clashMap.get(id);\r\n if (mappedID == null)\r\n {\r\n mappedID = id;\r\n }\r\n return (mappedID);\r\n }",
"@Override\n\t\tpublic void beginTask(String arg0, int arg1) {\n\n\t\t}"
] | [
"0.62400794",
"0.60860324",
"0.6037184",
"0.6017282",
"0.60105836",
"0.59678006",
"0.5932362",
"0.5916747",
"0.5849862",
"0.5806753",
"0.5746514",
"0.57459897",
"0.5723548",
"0.56819403",
"0.56674993",
"0.5649417",
"0.5636871",
"0.56218463",
"0.5612923",
"0.5576012",
"0.55699867",
"0.5567715",
"0.55173075",
"0.5515055",
"0.5470839",
"0.5465432",
"0.54278535",
"0.5426439",
"0.54209226",
"0.5403665",
"0.5402249",
"0.5395261",
"0.53906745",
"0.5380714",
"0.5374529",
"0.53744775",
"0.5372657",
"0.53687894",
"0.5352065",
"0.53498983",
"0.53465843",
"0.534271",
"0.533338",
"0.5296315",
"0.5296315",
"0.52854747",
"0.5283638",
"0.52813464",
"0.5279907",
"0.5273963",
"0.5266287",
"0.5264073",
"0.52611977",
"0.5254492",
"0.5252778",
"0.5243998",
"0.5241609",
"0.5240633",
"0.52391493",
"0.52328736",
"0.52264225",
"0.52258134",
"0.52207106",
"0.5216635",
"0.5210373",
"0.519377",
"0.519322",
"0.51858497",
"0.51799065",
"0.51797974",
"0.51766837",
"0.5168173",
"0.51644015",
"0.51635075",
"0.5156784",
"0.5156512",
"0.51450574",
"0.51403284",
"0.51376766",
"0.5137585",
"0.51331854",
"0.5127916",
"0.51265454",
"0.5126158",
"0.51247203",
"0.51219285",
"0.51211065",
"0.5115762",
"0.51156294",
"0.5115284",
"0.5114106",
"0.5106995",
"0.5104545",
"0.50876004",
"0.5086933",
"0.5077656",
"0.50673914",
"0.5061812",
"0.50591767",
"0.50569886"
] | 0.5583983 | 19 |
when task owner get the indvupdate //error: always empty | public static String checkedNotification(int myId) {
try {
Statement st = conn.createStatement();
//find list of update number in user
String getUpdate = "select mytaskupdate from users where userid = " + myId;
ResultSet updateResult = st.executeQuery(getUpdate);
JSONArray jsonArray = new JSONArray();
if(updateResult.next()) {
Long[] updateNums = (Long[]) updateResult.getArray(1).getArray();
for (Long num : updateNums) {
ResultSet taskResult = st.executeQuery("SELECT * FROM progressupdate WHERE updatenum =" + num);
if(taskResult.next()) {
int taskid = Integer.parseInt(taskResult.getString("taskid"));
int checkerid = Integer.parseInt(taskResult.getString("checkerid"));
JSONObject jobj = new JSONObject();
jobj.put("TaskID", taskid);
jobj.put("UpdateNum", num);
jobj.put("CheckerID", checkerid);
jsonArray.put(jobj);
taskResult.close();
//delete entries in indvprogressupdate DON'T DELETE FOR HISTORY
// String deleteEntries = "DELETE FROM indvprogressupdate WHERE updatenum = " + num ;
// st.executeUpdate(deleteEntries);
}
}
}
//empty individual update in user
String deleteUpdate = "UPDATE users SET mytaskupdate = '{}' where userid = " + myId;
st.executeUpdate(deleteUpdate);
updateResult.close();
st.close();
return jsonArray.toString();
} catch (SQLException e) {
throw new RuntimeException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void updateTask() {}",
"@EventListener(condition = \"!#event.domainObject.new\")\n\tpublic void onApplicationEventLookForUpdate(DomainObjectStoreEvent<Task> event) {\n\t\tEditeTask editeTask = new EditeTask();\n\t\tediteTask.setId(UUID.randomUUID().toString());\n\t\tTask task = event.getDomainObject();\n\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tUser cs = principal.getUser();\n\t\tif (cs.getIsAdmin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tSet<String> set = task.getDirtyAttributes();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator1 = set.iterator();\n\t\tList<String> list = new ArrayList<>();\n\t\twhile (iterator1.hasNext()) {\n\t\t\tlist.add((String) iterator1.next());\n\t\t}\n\n\t\tif (list.size() == 1 && list.contains(\"status\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString temp = (String) iterator.next();\n\t\t\tswitch (temp) {\n\t\t\tcase \"description\":\n\t\t\t\tediteTask.setDescription((String) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"deadline\":\n\t\t\t\tediteTask.setDeadline((LocalDateTime) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tediteTask.setType((TaskType) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"project\":\n\t\t\t\tediteTask.setProject((Project) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"taskPerformer\":\n\t\t\t\tediteTask.setTaskPerformer((User) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tediteTask.setTaskId(task.getId());\n\t\tediteTaskRepository.save(editeTask);\n\t\tif (!cs.getIsAdmin()) {\n\t\t\ttask.setIsCheck(false);\n\t\t\ttask.setStatus(Status.CLOSED);\n\t\t} else {\n\t\t\ttask.setIsCheck(true);\n\t\t}\n\t}",
"boolean updateActiveTask(Task task);",
"boolean updateTask(Task updatedTask);",
"public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);",
"public static int supvCheck(int myId, int taskid, int updatenum){\n try {\n Statement st = conn.createStatement();\n\n //add checkerid in indvprogressupdate for this updatenum\n String addChecker = \"UPDATE progressupdate SET checkerid = %d WHERE updatenum = \" + updatenum ;\n st.executeUpdate(String.format(addChecker, myId));\n\n //remove updatenum from indvsupvupdate in user for supv\n //TODO remove all otherstaskupdate of all group member\n String getMembersCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskid;\n ResultSet taskInfo = st.executeQuery(getMembersCommand);\n taskInfo.next();\n Long[] members = (Long[])taskInfo.getArray(\"member\").getArray();\n for(Long memberid : members){\n String removeUpdate = \"UPDATE users SET otherstaskupdate = array_remove(otherstaskupdate, '%d') WHERE userid = \" + memberid ;\n st.executeUpdate(String.format(removeUpdate, updatenum));\n }\n\n //update task owner progress(increment) in individual TODO:check deadline, repetition etc.\n //String updateMyIndv = \"UPDATE grouptask SET progress = progress + 1 WHERE taskid =\" + taskid;\n //st.executeUpdate(updateMyIndv);\n\n //add updatenum to indvupdate in user\n ResultSet ownerResult = st.executeQuery(\"SELECT userid FROM progressupdate WHERE updatenum =\" + updatenum);\n ownerResult.next();\n int ownerid = Integer.parseInt(ownerResult.getString(\"userid\"));\n String addIndvUpdate = \"UPDATE users SET mytaskupdate = array_append(mytaskupdate, '%d') WHERE userid=%d;\";\n st.execute(String.format(addIndvUpdate, updatenum , ownerid));\n\n //TODO update progress\n String progressTrackCommand = String.format(\n \"UPDATE progresstrack SET progress = progress+1, checkcount = checkcount+1 WHERE taskid = %d AND memberid = %d\",\n taskid, ownerid);\n st.executeUpdate(progressTrackCommand);\n\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"void refreshTaskInformation();",
"ConversationalObject getTaskOwner();",
"public void updateTaskViews(){\n for (Task task : taskManager.getTasksList()){\n TextView textToChange = (TextView) root.findViewById(task.getIdInView());\n if (textToChange == null){\n submit(task.getName(), task.getIdInView(), task.getTimeForTask(), task.isFinished());\n } else {\n textToChange.setText(task.getName());\n }\n }\n }",
"public void updateTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n todoTaskGui(\"Update\", task);\r\n }\r\n }",
"public String showUpdate(Task t) {\n String updateMessage = \"Got it! I'm updatin' this task to:\\n\" + t;\n return updateMessage;\n }",
"protected abstract Version executeTaskLocal(Version theTask);",
"public static String supvUpdate(int supvid) { //taskid and update number\n int failureid = -1;\n try {\n Statement st = conn.createStatement();\n //select update numbers for tasks that this supervisor supervises\n String getUpdate = \"select otherstaskupdate from users where userid = \" + supvid;\n ResultSet updateResult = st.executeQuery(getUpdate);\n if(updateResult.next()) {\n Long[] updateNums = (Long[]) updateResult.getArray(1).getArray();\n updateResult.close();\n failureid = -2;\n JSONArray updates = new JSONArray();\n //for each update number get taskid in indvprogressupdate\n for (Long num : updateNums) {\n PreparedStatement ps = conn.prepareStatement(\"select * from progressupdate where updatenum = \" + num);\n ResultSet taskUpdates = ps.executeQuery();\n failureid = -3;\n taskUpdates.next();\n failureid = -6;\n String image = taskUpdates.getString(4);\n failureid = -7;\n int taskid = Integer.parseInt(taskUpdates.getString(2));\n int userId = Integer.parseInt(taskUpdates.getString(5));\n failureid = -4;\n taskUpdates.close();\n JSONObject update = new JSONObject();\n update.put(\"TaskID\", taskid);\n update.put(\"UpdateNumber\", num);\n update.put(\"userId\", userId);\n update.put(\"image\", image);\n updates.put(update);\n ps.close();\n failureid = -5;\n }\n st.close();\n return updates.toString();\n }else {\n return \"failure\";\n }\n } catch (SQLException e) {\n return \"\" + failureid;\n }\n }",
"void setTaskOwner(ConversationalObject taskOwner);",
"public int getUpdatedTaskID(){\r\n int resultID;\r\n synchronized (lock) {\r\n ++baseTaskID;\r\n resultID = baseTaskID;\r\n //insert new parameters to paraList\r\n }\r\n return resultID;\r\n }",
"@Test\n\tpublic void testUpdateTask() {\n\t}",
"int updateByPrimaryKeySelective(_task record);",
"int updateByPrimaryKey(_task record);",
"private void updateTask(ICompositeCheatSheetTask task) {\n \t\tif (task==null || task != selectedTask) return;\n \t\tif ( task instanceof EditableTask) {\n \t\t\tEditableTask editable = (EditableTask)task;\n \t\t\tif (editable.getState() == ICompositeCheatSheetTask.IN_PROGRESS) {\n \t\t\t\tshowEditor(editable);\n \t\t\t\treturn;\n \t\t\t} else if (editable.isUnderReview()) {\n \t\t\t\tif (editable.getState() == ICompositeCheatSheetTask.COMPLETED) {\n \t\t\t\t\tshowEditor(editable);\n \t\t\t\t} else {\n \t\t\t\t\tendReview(editable);\n \t\t\t\t}\n \t\t\t\treturn;\n \t\t\t}\n \t\t} \n \t\tshowDescription(task);\n \t}",
"@Test\n public void testDelegateTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n Assert.assertEquals(Status.READY, t.getStatus());\n\n this.services.delegateTask(t.getId(), \"user1\", \"user2\");\n t = this.services.getTaskInfo(t.getId());\n\n Assert.assertEquals(Status.RESERVED, t.getStatus());\n Assert.assertEquals(\"user2\", t.getActualOwner().getName());\n }",
"@Test\n public void testGetMyTasks_ByOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n\n List<Task> results = services.getMyTasks(\"user1\", TaskTypes.ALL,\n GenericHumanRole.ACTUAL_OWNER, null,\n new ArrayList<Status>(), null, null, null, null, 0);\n\n Assert.assertEquals(1, results.size());\n\n Task taskToCheck = results.get(0);\n\n Assert.assertEquals(t.getActualOwner(), taskToCheck.getActualOwner());\n Assert.assertEquals(Task.Status.RESERVED, taskToCheck.getStatus());\n }",
"int updateByPrimaryKey(TbCrmTask record);",
"int updateByPrimaryKey(Task record);",
"protected void updateTaskEmailsManually() {\n List<Object> arguments = new ArrayList<Object>();\n String emailToReplace = \"[email protected]\";\n arguments.add(emailToReplace);\n List<Task> results = BeanHelper.getWorkflowDbService().searchTasksAllStores(\"(wfc_owner_email=? )\", arguments, -1).getFirst();\n Map<QName, Serializable> changedProps = new HashMap<QName, Serializable>();\n for (Task task : results) {\n changedProps.clear();\n try {\n String ownerId = task.getOwnerId();\n String newTaskOwnerEmail = BeanHelper.getUserService().getUserEmail(ownerId);\n if (StringUtils.isBlank(newTaskOwnerEmail)) {\n LOG.warn(\"The e-mail of following task was not updated because no user e-mail address was found:\\n\" + task);\n continue;\n }\n changedProps.put(WorkflowCommonModel.Props.OWNER_EMAIL, newTaskOwnerEmail);\n BeanHelper.getWorkflowDbService().updateTaskEntryIgnoringParent(task, changedProps);\n LOG.info(\"Updated task [nodeRef=\" + task.getNodeRef() + \"] e-mail manually: \" + emailToReplace + \" -> \" + newTaskOwnerEmail);\n } catch (Exception e) {\n LOG.error(e);\n continue;\n }\n }\n }",
"public String editTask(TasksModel obj)\n\t{\n\t\tString memo=\"\"; \n\t\tif(obj.getMemo()!=null)\n\t\t{\n\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setMemo(memo);\n\t\t\n\t\tString commnets=\"\"; \n\t\tif(obj.getComments()!=null)\n\t\t{\n\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setComments(commnets);\n\t\t\t\n\t\tString stepsToReproduce=\"\"; \n\t\tif(obj.getTaskStep()!=null)\n\t\t{\n\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setTaskStep(stepsToReproduce);\n\t\tquery=new StringBuffer();\n\t\tquery.append(\"Update tasks set customerType='\"+obj.getClientType()+\"',taskNo='\"+obj.getTaskNumber()+\"',tasktype=\"+obj.getTaskTypeId()+\",expectedDateTofinsh='\"+sdf.format(obj.getExpectedDatetofinish())+\"',reminderDate='\"+sdf.format(obj.getReminderDate())+\"',toBeReminderIn=\"+obj.getRemindIn()+\",taskName='\"+obj.getTaskName()+\"',steps='\"+obj.getTaskStep()+\"',linkid=\"+obj.getPrviousTaskLinkId()+\",customerrefKey=\"+obj.getCustomerRefKey()+\",\");\t\n\t\tquery.append(\"projectrefKey=\"+obj.getProjectKey()+\",servicerefKey=\"+obj.getSreviceId()+\",assignedUser=\"+obj.getEmployeeid()+\",ccemployeeKey=\"+obj.getCcEmployeeKey()+\",priorityrefKey=\"+obj.getPriorityRefKey()+\",estTime=\"+obj.getEstimatatedNumber()+\",memo='\"+obj.getMemo()+\"',actualTime=\"+obj.getActualNumber()+\",status=\"+obj.getStatusKey()+\",usercomments='\"+obj.getComments()+\"',hourOrDays='\"+obj.getHoursOrDays()+\"' where taskID=\"+obj.getTaskid()+\"\");\n\t\tquery.append(\" \");\n\t\treturn query.toString();\n\t}",
"int updateByPrimaryKeySelective(Task record);",
"public void updateTaskDetailsInDB(UniverseDefinitionTaskParams taskParams) {\n getRunnableTask().setTaskDetails(RedactingService.filterSecretFields(Json.toJson(taskParams)));\n }",
"public int updateTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName());\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // updating row\n return db.update(TABLE_TASKS, values, KEY_ID + \" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }",
"@Test\n public void testStartTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n this.services.startTask(t.getId(), \"user1\");\n \n org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assert.assertEquals(Status.IN_PROGRESS, t.getStatus());\n }",
"private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void updateTask() {\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\tfinal Task task = new Task(\"Task 1\", 1, 1, asgn.getID());\n\t\tasgn.addTask(task);\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\ttask.setPercentComplete(0.174);\n\t\tStorageService.updateTask(task);\n\t\t\n\t\tfinal Assignment afterAsgn = StorageService.getAssignment(asgnId);\n\t\tassertEquals(asgn.fullString(), afterAsgn.fullString());\n\t}",
"abstract ClusterTask getSessionUpdateTask();",
"U getUpdateby();",
"void updateTask(UserDto user);",
"@Override\n public Mono<BaseSingleInterface.BaseTask<Task>> updateProjectTask(Long code, String columnName, Task task) {\n Query updateQuery = new Query(where(\"code\").is(code).and(\"columns.name\").is(columnName).and(\"columns.tasks.name\").is(task.getName()));\n Update update = new Update().set(\"columns.$[columnIndex].tasks.$\", task).filterArray(Criteria.where(\"columnIndex.name\").is(columnName));\n return template.updateMulti(updateQuery, update, Project.class)\n .filter(result -> result.getModifiedCount() > 0)\n .flatMap(result -> findByProjectColumnTaskName(code, columnName, task.getName(), Pageable.unpaged()));\n }",
"@Test\n public void updateCompletedAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n mDatabase.taskDao().updateCompleted(TASK.getId(), false);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, TASK.getId(), TASK.getTitle(), TASK.getDescription(), false);\n }",
"public void updateTasks(List<Task> listOfTasks);",
"@Test\n public void testStartTaskReservedByPotentialOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assert.assertEquals(Status.RESERVED, t.getStatus());\n \n this.services.startTask(t.getId(), \"user1\");\n org.junit.Assert.assertEquals(Status.IN_PROGRESS, t.getStatus());\n }",
"public void updateTaskStatus(CaptureTask task, String status, String description) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void update(ExecuteTask executeTask) {\n\t\tString sql = \"UPDATE executetask SET et_comments = ? WHERE et_id = ?\";\r\n\t\tupdate(sql,executeTask.getComments(),executeTask.getId());\r\n\t}",
"public void showTask(View v) {\n String taskIdStr = txtId.getText().toString();\n if (taskIdStr.isEmpty() || taskIdStr == null) {\n Toast.makeText(this, \"Please Insert task ID\", Toast.LENGTH_LONG).show();\n } else {\n try {\n int taskId = Integer.parseInt(taskIdStr);\n TaskModel taskmodel = taskManager.getTaskById(taskId);\n txtTaskName.setText(taskmodel.getTaskName());\n txtTaskDescription.setText(taskmodel.getTaskDescription());\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }\n }",
"public void updateTask(Task task){//needs to depend on row num\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,task.getId());\n values.put(KEY_LABEL,task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.update(TABLE_NAME, values, KEY_ID+\" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }",
"public void checkTask(String task){\r\n\t\t\r\n\t}",
"@Override\r\n protected void updateTask(RepositoryAction action, boolean preview)\r\n throws DataFormatException, IOException, SQLException, IllegalArgumentException {\r\n action.assertHasProperty(OLD_VALUE);\r\n action.assertHasProperty(NEW_VALUE);\r\n action.assertHasProperty(TASK_PARENT_TYPE);\r\n List<ContentActionXLR> contentActions = action.getXlrContentActions();\r\n // Validate ContentActions\r\n validateContentActions(contentActions);\r\n\r\n String oldValue = action.getProperties().get(OLD_VALUE);\r\n String newValue = action.getProperties().get(NEW_VALUE);\r\n String taskParentTypeStr = action.getProperties().get(TASK_PARENT_TYPE);\r\n int cnt = 0;\r\n\r\n if (!preview) {\r\n String sql = lookupSql(action, preview);\r\n /*\r\n * update TASK for XLR requires a select from XLR_TASK which returns a result\r\n * set of release_uids. For each, get content blob from XLR_RELEASE_DATA,\r\n * modify content blob then update the XLR_RELEASE_DATA. \r\n * Then, get task_id, content blob from XLR_TASK_BACKUPS for that release_id.\r\n * Modify the content blob and then update XLR_TASK_BACKUPS.\r\n * Update task_type in XLR_TASK\r\n * \r\n * After completeing XLR database update, update tasks in the report database\r\n */\r\n\r\n PreparedStatement pstmtReleaseId = null;\r\n PreparedStatement pstmtContent = null;\r\n PreparedStatement pstmtContent2 = null;\r\n\r\n ResultSet rsRelease = null;\r\n ResultSet rsContent = null;\r\n ResultSet rsContent2 = null;\r\n\r\n PreparedStatement pstmtUpdateContent = null;\r\n PreparedStatement pstmtUpdateContent2 = null;\r\n PreparedStatement pstmtUpdateTask = null;\r\n Boolean origCommitState = dbconn.getAutoCommit();\r\n\r\n String[] stringArray = createSqlArray(sql);\r\n \r\n /*\r\n * ensure we have ten sql statments We expect something like the following\r\n * \"SELECT DISTINCT release_uid FROM XLR_TASKS WHERE task_type = ?\";\r\n * \"SELECT content FROM XLR_RELEASES_DATA WHERE ci_uid = ?\";\r\n * \"UPDATE XLR_RELEASES_DATA SET content = ? WHERE ci_uid = ?\";\r\n * \"SELECT task_id, content FROM XLR_TASK_BACKUPS WHERE ci_uid = ?\";\r\n * \"UPDATE XLR_TASK_BACKUPS SET content = ? WHERE task_id = ?\";\r\n * \"UPDATE XLR_TASKS SET task_type = ? where task_type = ?\";\r\n * \r\n * the following sql will be run against the report database\r\n * \"SELECT DISTINCT releaseid FROM TASKS WHERE tasktype = ?\"\r\n * \"SELECT releasejson FROM RELEASES WHERE releaseid = ?\";\r\n * \"UPDATE RELEASES SET releasejson = ? WHERE releaseid = ?\";\r\n * \"UPDATE TASKS SET tasktype = ? where tasktype = ?\";\r\n */\r\n\r\n if (stringArray != null && stringArray.length == 10) {\r\n try {\r\n // Turn autocommit off\r\n dbconn.setAutoCommit(false);\r\n\r\n pstmtReleaseId = dbconn.prepareStatement(stringArray[0]);\r\n pstmtReleaseId.setString(1, oldValue);\r\n rsRelease = pstmtReleaseId.executeQuery();\r\n\r\n if (rsRelease != null) {\r\n while (rsRelease != null && rsRelease.next()) {\r\n\r\n int release_uid = rsRelease.getInt(\"release_uid\");\r\n pstmtContent = dbconn.prepareStatement(stringArray[1]);\r\n pstmtContent.setInt(1, release_uid);\r\n // Get all content blobs from the XLR_RELEASES_DATA table for this release_uid\r\n rsContent = pstmtContent.executeQuery();\r\n\r\n while (rsContent != null && rsContent.next()) {\r\n byte [] currentBytes = null;\r\n\r\n if (dbType == DbType.POSTGRESQL){\r\n currentBytes = rsContent.getBytes(\"content\");\r\n }\r\n else {\r\n Blob blobContent = rsContent.getBlob(\"content\");\r\n currentBytes = convertBlobToByteArray(blobContent);\r\n }\r\n\r\n String blobString = new String(CompressionUtils.decompress(currentBytes));\r\n\r\n // Now, update blob\r\n String updatedBlobString = updateReleaseDataBlob(blobString, taskParentTypeStr, oldValue, \r\n contentActions, action);\r\n\r\n //System.out.println(\"******BEGIN - this is the updated content blob for xlr - update task\");\r\n //System.out.println(updatedBlobString);\r\n //System.out.println(\"******END - this is the updated content blob for xlr - update task\");\r\n\r\n // We now have the updated blobString, commit it to the database\r\n byte[] newByteArray = CompressionUtils.compress(updatedBlobString.getBytes());\r\n\r\n pstmtUpdateContent = dbconn.prepareStatement(stringArray[2]);\r\n \r\n if (dbType == DbType.POSTGRESQL){\r\n pstmtUpdateContent.setBytes(1, newByteArray);\r\n }\r\n else {\r\n Blob blobFromBytes = dbconn.createBlob();\r\n int numWritten = blobFromBytes.setBytes(1, newByteArray);\r\n //System.out.println(\"******END - numWritten to blob = \"+numWritten+\", size = \"+blobFromBytes.length()+\", this is the updated content blob for xlr - update task\");\r\n // old way Blob blobFromBytes = new javax.sql.rowset.serial.SerialBlob(newByteArray); \r\n pstmtUpdateContent.setBlob(1, blobFromBytes); \r\n }\r\n \r\n pstmtUpdateContent.setInt(2, release_uid);\r\n int resultUpdateContent = pstmtUpdateContent.executeUpdate();\r\n } // end of while content\r\n\r\n // Now requery the database to get info from the XLR_TASK_BACKUPS table\r\n pstmtContent2 = dbconn.prepareStatement(stringArray[3]);\r\n pstmtContent2.setInt(1, release_uid);\r\n rsContent2 = pstmtContent2.executeQuery();\r\n while (rsContent2 != null && rsContent2.next()) {\r\n //get Task_ID\r\n String task_id = rsContent2.getString(\"task_id\");\r\n\r\n Blob blobContent2 = null;\r\n byte [] currentBytes2 = null;\r\n\r\n if (dbType == DbType.POSTGRESQL){\r\n currentBytes2 = rsContent2.getBytes(\"content\");\r\n }\r\n else {\r\n blobContent2 = rsContent2.getBlob(\"content\");\r\n currentBytes2 = convertBlobToByteArray(blobContent2);\r\n }\r\n\r\n String blobString2 = new String(CompressionUtils.decompress(currentBytes2));\r\n JsonParser jsonParser = new JsonParser();\r\n JsonObject parentObject2 = null;\r\n \r\n JsonObject objectFromString2 = jsonParser.parse(blobString2).getAsJsonObject();\r\n // process content to get all task JsonObjects\r\n if (taskParentTypeStr != null && !taskParentTypeStr.isEmpty() \r\n && objectFromString2.has(taskParentTypeStr)) {\r\n parentObject2 = objectFromString2.getAsJsonObject(taskParentTypeStr);\r\n if (parentObject2.has(\"type\")) {\r\n if (oldValue.equals(parentObject2.get(\"type\").getAsString())) {\r\n // NOTE: the type will come from the properties of action\r\n // (NOT the xlrContentActions)\r\n updateParentObject(parentObject2, contentActions, jsonParser, action);\r\n\r\n //System.out.println(\"******BEGIN - this is the updated content blob for xlr - update task - backup\");\r\n //System.out.println(objectFromString2.toString());\r\n //System.out.println(\"******END - this is the updated content blob for xlr - update update task - backup\");\r\n\r\n byte[] newByteArray2 = CompressionUtils.compress(objectFromString2.toString().getBytes());\r\n \r\n pstmtUpdateContent2 = dbconn.prepareStatement(stringArray[4]);\r\n\r\n if (dbType == DbType.POSTGRESQL){\r\n pstmtUpdateContent2.setBytes(1, newByteArray2);\r\n }\r\n else {\r\n Blob blobFromBytes2 = dbconn.createBlob();\r\n int numWritten = blobFromBytes2.setBytes(1, newByteArray2);\r\n //System.out.println(\"******END - numWritten to blob = \"+numWritten+\", size = \"+blobFromBytes.length()+\", this is the updated content blob for xlr - update task\");\r\n // old way Blob blobFromBytes2 = new javax.sql.rowset.serial.SerialBlob(newByteArray2); \r\n pstmtUpdateContent2.setBlob(1, blobFromBytes2); \r\n }\r\n\r\n pstmtUpdateContent2.setString(2, task_id);\r\n int resultUpdateContent2 = pstmtUpdateContent2.executeUpdate();\r\n } // end of if type = oldValue\r\n } // end of if has type\r\n } // end of if has parent\r\n }// end of second blob cycle \r\n } // end of while release_uid\r\n\r\n\r\n // Now update XLR_TASKS table\r\n pstmtUpdateTask = dbconn.prepareStatement(stringArray[5]);\r\n pstmtUpdateTask.setString(1, newValue);\r\n pstmtUpdateTask.setString(2, oldValue);\r\n cnt = pstmtUpdateTask.executeUpdate();\r\n\r\n // Now update the report database for this action\r\n updateReportTasks(stringArray, action);\r\n\r\n os.println(String.format(\"\\n%sUpdate TASK from %s to %s. %d row(s) altered.\",\r\n (preview ? \"[PREVIEW] \" : \"\"), action.getProperties().get(OLD_VALUE),\r\n action.getProperties().get(NEW_VALUE), cnt));\r\n if(cnt>0 && action.getMessage() != null && !action.getMessage().isEmpty()){\r\n os.println(\"\\tAttention: \"+action.getMessage());\r\n }\r\n\r\n } else {\r\n os.println(String.format(\"\\n%sUpdate TASK from %s to %s. 0 row(s) altered. %s\",\r\n (preview ? \"[PREVIEW] \" : \"\"), action.getProperties().get(OLD_VALUE),\r\n action.getProperties().get(NEW_VALUE), \"No records found to update.\"));\r\n }\r\n\r\n // successfully reached the end, so commit\r\n //os.println(\"About to commit the database transaction.\");\r\n dbconn.commit(); \r\n\r\n } catch (SQLException se){\r\n dbconn.rollback();\r\n os.println(\"\\nERROR: SQLExecption thrown, so database transcaction has been rolled back.\");\r\n throw se;\r\n } catch (IllegalArgumentException ie){\r\n dbconn.rollback();\r\n os.println(\"\\nERROR: IllegalArgumentExecption thrown, so database transcaction has been rolled back.\");\r\n throw ie;\r\n } finally {\r\n try {\r\n if(dbconn != null) dbconn.setAutoCommit(origCommitState);\r\n if (pstmtReleaseId != null) pstmtReleaseId.close();\r\n if (pstmtContent != null) pstmtContent.close();\r\n if (pstmtContent2 != null) pstmtContent2.close();\r\n if (rsRelease != null) rsRelease.close();\r\n if (rsContent != null) rsContent.close();\r\n if (rsContent2 != null) rsContent2.close();\r\n if (pstmtUpdateContent != null) pstmtUpdateContent.close();\r\n if (pstmtUpdateContent2 != null) pstmtUpdateContent2.close();\r\n if (pstmtUpdateTask != null) pstmtUpdateTask.close();\r\n } catch (SQLException e) {\r\n //os.println(\"Exception thrown while closing prepared statements and result sets\");\r\n //throw e;\r\n }\r\n }\r\n } else {\r\n throw new IllegalArgumentException(\r\n \"updateTask SQL mapping must contain ten SQL statements, a SELECT, SELECT, UPDATE, SELECT, UPDATE, UPDATE, SELECT, SELECT, UPDATE, UPDATE.\");\r\n }\r\n } else {\r\n // perform preview action\r\n cnt = processAction(action, preview);\r\n\r\n os.println(String.format(\"\\n%sUpdate TASK from %s to %s. %d row(s) altered.\", (preview ? \"[PREVIEW] \" : \"\"),\r\n action.getProperties().get(OLD_VALUE), action.getProperties().get(NEW_VALUE), cnt));\r\n }\r\n }",
"private static String getStatus(Task task) {\n Status myStatus = task.getStatus();\n if (myStatus == Status.UP_NEXT) {\n return \"UP_NEXT\";\n } else if (myStatus == Status.IN_PROGRESS) {\n return \"IN_PROGRESS\";\n } else {\n return myStatus.toString();\n }\n }",
"@Override\n public JSONObject viewSalesManagerTaskByAdmin() {\n\n return in_salesmanagerdao.viewSalesManagerTaskAdmin();\n }",
"public static int addProgressUpdate(int taskid, String image, int myId){\n try {\n Statement st = conn.createStatement();\n int updateNum;\n //select supervisors for this task\n String getSupervisors = \"select member from grouptask where taskid = \" + taskid;\n ResultSet supvResult = st.executeQuery(getSupervisors);\n if(supvResult.next()) {\n Long[] supervisors = (Long[]) supvResult.getArray(1).getArray();\n supvResult.close();\n //find number of update for this task\n ResultSet maxUpdateNum = st.executeQuery(\"select max(updatenum) from progressupdate\");\n maxUpdateNum.next();\n String updateNumStr = maxUpdateNum.getString(1);\n updateNum = (updateNumStr == null) ? 1 : Integer.parseInt(updateNumStr) + 1;\n String updateProgress = \"INSERT INTO progressupdate VALUES(%d, %d, -1,'{%s}', %d)\";\n String sndBaseString = String.format(updateProgress, updateNum, taskid, image, myId);\n PreparedStatement ps = conn.prepareStatement(sndBaseString);\n ps.executeUpdate();\n ps.close();\n //update user for supervisors for this task\n for(Long supv: supervisors) {\n st.executeUpdate(\"UPDATE users SET otherstaskupdate = array_append(otherstaskupdate, '\" + updateNum +\"') WHERE userid = \" + supv);\n System.out.println(\"update otherstaskupdate in users for members \" + supv);\n }\n } else {\n return SERVER_FAILURE;\n }\n st.close();\n return updateNum;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"int updateByPrimaryKey(JmfTaskMqRef record);",
"@Override\n public int update(PWsdTaskdataDomain pWsdTaskdataDomain) {\n return getPersistanceManager().update(getNamespace() + \".update\", pWsdTaskdataDomain);\n }",
"TaskResponse updateTask(TaskRequest taskRequest, Long taskId);",
"private void handleStatusUpdate(AppEvent event)\n {\n if( ( !event.getTask().hasStatus() )\n || ( !event.getTask().getStatus().getState().equals( event.getTaskStatus().getState() ))\n || ( this.app.getState(event.getTask().getNodeId()).equals(SchedulerNode.State.REREGISTERED) ))\n {\n //do info update first in case user issues a AppDriver call that depends on it\n this.updateTaskInfo(event.getTask(), event.getTaskStatus());\n\n SchedulerNode.State state = this.app.getState(event.getTask().getNodeId());\n\n switch (event.getTaskStatus().getState())\n {\n //case TASK_DROPPED:\n case TASK_ERROR:\n case TASK_FAILED:\n //case TASK_GONE:\n case TASK_LOST:\n //case TASK_UNKNOWN:\n // case TASK_GONE_BY_OPERATOR:\n //case TASK_UNREACHABLE:\n if( !state.equals(SchedulerNode.State.FAILED)\n && !state.equals(SchedulerNode.State.FINISHED)\n && !state.equals(SchedulerNode.State.KILLED)) {\n this.app.nodeFailed(this, event.getTask().getNodeId());\n }\n break;\n case TASK_FINISHED:\n if( !state.equals(SchedulerNode.State.FAILED)\n && !state.equals(SchedulerNode.State.FINISHED)\n && !state.equals(SchedulerNode.State.KILLED)) {\n this.app.nodeFinished(this, event.getTask().getNodeId());\n }\n break;\n case TASK_RUNNING:\n this.app.nodeRunning(this, event.getTask().toBuilder().setStatus(event.getTaskStatus()).build());\n break;\n case TASK_KILLED:\n if( !state.equals(SchedulerNode.State.FAILED)\n && !state.equals(SchedulerNode.State.FINISHED)\n && !state.equals(SchedulerNode.State.KILLED)) {\n this.app.nodeKilled(this, event.getTask().getNodeId());\n }\n break;\n default:\n }\n }\n\n this.updateTaskInfo(event.getTask(), event.getTaskStatus());\n }",
"void showTodoViewToEdit(Task task);",
"public Task createTask_OnePotentialOwner() throws HTException {\n Task task = services.createTask(\"Task1\", null, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><ClaimApprovalRequest><cust><firstname>witek</firstname></cust><amount>1</amount></ClaimApprovalRequest>\");\n org.junit.Assert.assertTrue(task.getPotentialOwners().size() == 1);\n return task;\n }",
"@Test (expected = HTIllegalAccessException.class)\n public void testDelegateTaskReadyByNotPotentialOwnerNorAdministrator() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n Assert.assertEquals(Status.READY, t.getStatus());\n\n this.services.delegateTask(t.getId(), \"user3\", \"user2\");\n t = this.services.getTaskInfo(t.getId());\n }",
"private void updateTask(String task_id, final String task, final String status, final int position){\n if(!preference.getAPI_KEY().isEmpty()){\n Call call = service.updateTask(preference.getAPI_KEY(), task_id, task, status);\n connection.request(call, new ResponseListener() {\n @Override\n public void onSuccess(String response) {\n Log.e(TAG, \"\"+response);\n list_task.get(position).setTask(task);\n list_task.get(position).setStatus(status);\n notifyDataSetChanged();\n }\n\n @Override\n public void onError(String error) {\n Log.e(TAG, \"\"+error);\n }\n });\n }else {\n Toast.makeText(context, \"please login to check data\", Toast.LENGTH_SHORT).show();\n }\n\n }",
"@Override\n public void onEditClick(Tasks tasks) {\n if(tasks!=null){\n taskEditRequest(tasks);\n }\n }",
"public Task getTask(Integer tid);",
"@Test\n public void updateTaskAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n Task updatedTask = new Task(\"title2\", \"description2\", \"id\", true);\n mDatabase.taskDao().updateTask(updatedTask);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, \"id\", \"title2\", \"description2\", true);\n }",
"boolean hasUpdateInode();",
"@Test(dependsOnMethods = { \"testAssignTaskWithNegativeCase\" },\n description = \"podio {updateTask} integration test with optonal parameters.\")\n public void testUpdateTaskWithOptionalParameters() throws IOException, JSONException {\n \n esbRequestHeadersMap.put(\"Action\", \"urn:updateTask\");\n \n RestResponse<JSONObject> esbRestResponse =\n sendJsonRestRequest(proxyUrl, \"POST\", esbRequestHeadersMap, \"esb_updateTask_optional.json\");\n String taskId = esbRestResponse.getBody().getString(\"task_id\");\n \n String apiEndPoint = apiUrl + \"/task/\" + taskId;\n \n RestResponse<JSONObject> apiRestResponse = sendJsonRestRequest(apiEndPoint, \"GET\", apiRequestHeadersMap);\n \n Assert.assertEquals(esbRestResponse.getBody().getJSONObject(\"created_by\").getString(\"name\"), apiRestResponse\n .getBody().getJSONObject(\"created_by\").getString(\"name\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"text\"), apiRestResponse.getBody().getString(\"text\"));\n Assert.assertEquals(esbRestResponse.getBody().getString(\"external_id\"),\n apiRestResponse.getBody().getString(\"external_id\"));\n }",
"public Task update(Task item) {\n\t\t// set the user id (not sure this is where we should be doing this)\n\t\titem.setUserId(getUserId());\n\t\titem.setEmailAddress(getUserEmail());\n\t\tif (item.getDueDate() == null) {\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tc.set(2011, 5, 11);\n\t\t\titem.setDueDate(c.getTime());\n\t\t}\n\t\tPersistenceManager pm = PMF.get().getPersistenceManager();\n\t\ttry {\n\t\t\tpm.makePersistent(item);\n\t\t\treturn item;\n\t\t} finally {\n\t\t\tpm.close();\n\t\t}\n\t}",
"public void setTask(Task inTask){\n punchTask = inTask;\n }",
"int getTask() {\n return task;\n }",
"Long getUserUpdated();",
"@Test\n public void testGetMyTasks_ByPotentialOwner() throws HTException {\n\n log.info(\"testGetMyTasks_ByPotentialOwner\");\n \n Task t = createTask_OnePotentialOwner();\n\n List<Task> results = this.services.getMyTasks(\"user1\", TaskTypes.ALL,\n GenericHumanRole.POTENTIAL_OWNERS, null,\n new ArrayList<Status>(), null, null, null, null, 0);\n\n Assert.assertEquals(1, results.size());\n\n Task taskToCheck = results.get(0);\n Person p = this.assigneeDao.getPerson(\"user1\");\n Assert.assertNotNull(p);\n \n log.info(taskToCheck.getPotentialOwners());\n Assert.assertEquals(taskToCheck.getActualOwner(), p);\n Assert.assertEquals(taskToCheck.getPotentialOwners().size(), 1);\n \n log.info(\"Potential owner: \" + taskToCheck.getPotentialOwners().iterator().next());\n log.info(\"Potential owner: \" + p);\n \n Assert.assertEquals(p, taskToCheck.getPotentialOwners().iterator().next());\n \n //TODO why it fails??? jnb???\n //Assert.assertTrue(taskToCheck.getPotentialOwners().contains(p));\n \n log.info(\"~testGetMyTasks_ByPotentialOwner\");\n }",
"public String getOrginTaskID() {\n\t\treturn orginTaskID;\n\t}",
"@Override\n public UpdateFuotaTaskResult updateFuotaTask(UpdateFuotaTaskRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateFuotaTask(request);\n }",
"@Override\n @Modifying\n public ResponseEntity<GenericResponseDTO> updateTask(String codeTask, TaskDTO taskDTO) {\n TaskEntity taskEntity = new TaskEntity();\n Optional<TaskEntity> oldTask;\n try{\n oldTask = taskRepository.findByCodeTask(codeTask);\n if (oldTask.isPresent()){\n taskEntity = itaskConverter.taskDtoToTaskEntity(taskDTO);\n taskEntity.setIdTable(oldTask.get().getIdTable());\n taskRepository.save(taskEntity);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"tarea actualizada\")\n .objectResponse(taskDTO)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }else{\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"no se encontro ninguna tarea para actualizar\")\n .objectResponse(null)\n .statusCode(HttpStatus.OK.value())\n .build(), HttpStatus.OK);\n }\n }catch (Exception e){\n log.error(\"Algo fallo en la creacion de la tarea \" + e);\n return new ResponseEntity<>(GenericResponseDTO.builder()\n .message(\"Error actualizando tarea: \" + e.getMessage())\n .objectResponse(null)\n .statusCode(HttpStatus.BAD_REQUEST.value())\n .build(), HttpStatus.BAD_REQUEST);\n }\n }",
"WorkingTask getWorkingTask();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"public int getUpdatedBy();",
"@Override\n public boolean updateTask(String id,String name, String[] taskTypeNames, String state, HashMap inputParameter, HashMap outputParameter, String title, String subject, String description, String priority, String claimed) {\n boolean response = false;\n try {\n response = dataAccessTosca.updateTask(id, name, taskTypeNames, state, inputParameter ,outputParameter, title, subject, description, priority, claimed);\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return response;\n }",
"void onEditTaskComplete(String name, String notes, int position);",
"private void showUpdateDialog(final Task task, final int position){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.dialog_update_task);\n dialog.setTitle(\"Update Task\");\n\n final TextView edt_task = (TextView) dialog.findViewById(R.id.edt_task);\n final Spinner spinner_status = (Spinner) dialog.findViewById(R.id.spinner_status);\n\n Button btn_update_task = (Button) dialog.findViewById(R.id.btn_update_task);\n Button btn_cancel = (Button) dialog.findViewById(R.id.btn_cancel);\n\n\n dialog.show();\n\n btn_cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n btn_update_task.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String new_task = edt_task.getText().toString();\n int id = spinner_status.getSelectedItemPosition();\n if(new_task.trim().equalsIgnoreCase(task.getTask().trim())){\n Toast.makeText(context, \"task and status are same.\", Toast.LENGTH_SHORT).show();\n }else if(id == 0){\n Toast.makeText(context, \"Select a valid status.\", Toast.LENGTH_SHORT).show();\n }else {\n dialog.dismiss();\n updateTask(task.getId(), new_task, \"\"+id, position);\n }\n }\n });\n }",
"@Override\n\t@Scheduled(cron = \"0 0 0 * * ?\")\n\tpublic void changeOwnerConsent() throws UnauthorizedException {\n\n\t\tActivitiResponseModel<List<RtaTaskInfo>> activeInstances = activitiService\n\t\t\t\t.getActiveInstances(taskOwnerConscent);\n\t\tList<RtaTaskInfo> tasks = activeInstances.getActiveTasks();\n\t\tList<String> exectionIds = new ArrayList<String>();\n\t\tfor (RtaTaskInfo task : tasks) {\n\t\t\texectionIds.add(task.getProcessInstanceId());\n\t\t}\n\n\t\tRegistrationServiceResponseModel<TokenModel> loginResponse = registrationService.loginIfRequired(getUsername(),\n\t\t\t\tgetPassword());\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\tHttpEntity<OwnerConscent> httpEntity = null;\n\t\theaders.setContentType(MediaType.APPLICATION_JSON);\n\t\theaders.add(\"Authorization\", loginResponse.getResponseBody().getToken());\n\t\tOwnerConscent consent = null;\n\t\tMap<String, String> appList = applicationService.getApplicationFromExecId(exectionIds);\n\t\tif (!appList.isEmpty()) {\n\t\t\tfor (Map.Entry<String, String> entry : appList.entrySet()) {\n\t\t\t\tconsent = new OwnerConscent();\n\t\t\t\tconsent.setOwnerConscent(false);\n\t\t\t\tconsent.setOwnerComment(OWNER_NO_RESPONSE);\n\t\t\t\thttpEntity = new HttpEntity<OwnerConscent>(consent, headers);\n\t\t\t\tResponseEntity<FreshRcModel> response = restTemplate.exchange(\n\t\t\t\t\t\tgetRootURL().append(\"/application/updateownerconsent/\").append(entry.getValue()).toString(),\n\t\t\t\t\t\tHttpMethod.POST, httpEntity, FreshRcModel.class);\n\t\t\t\tString instanceId = entry.getKey();\n\t\t\t\tif (response.getStatusCode() == HttpStatus.OK) {\n\t\t\t\t\tAssignee assignee = new Assignee();\n\t\t\t\t\tassignee.setUserId(CitizenConstants.CITIZEN_USERID);\n\t\t\t\t\tMap<String, Object> variables = new HashMap<String, Object>();\n\t\t\t\t\tif (response.getBody().getOwnerConsent()) {\n\t\t\t\t\t\tvariables.put(taskOwnerConscent, Status.APPROVED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvariables.put(taskOwnerConscent, Status.REJECTED);\n\t\t\t\t\t}\n\t\t\t\t\tactivitiService.completeTask(assignee, taskOwnerConscent, instanceId, true, variables);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public int getCustTask()\n\t{\n\t\treturn task;\n\t}",
"@Override\n\t\tprotected Version doInBackground(Void... params) {\n\t\t\treturn new UpdateApk(getApplicationContext()).hasNewVersion();\n\t\t}",
"@SuppressWarnings(\"unchecked\")\r\n public UserPlanTask UserPlanTaskUpdate(long taskId, String TTitle, String TDescription, String TDate, Integer status) {\r\n session = sf.openSession();\r\n Transaction t = session.beginTransaction();\r\n UserPlanTask UpdateTaskList = (UserPlanTask) session.load(UserPlanTask.class, taskId);\r\n UpdateTaskList.setTTitle(TTitle);\r\n UpdateTaskList.setTDescription(TDescription);\r\n UpdateTaskList.setTDate(TDate);\r\n UpdateTaskList.setStatus(status);\r\n if (null != UpdateTaskList) {\r\n session.update(UpdateTaskList);\r\n }\r\n t.commit();\r\n session.close();\r\n sf.close();\r\n return UpdateTaskList;\r\n }",
"TaskStatus getStatus();",
"public void testCmdUpdate_taskName_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 2: Testing task name field (all ID are valid)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 2a: task name is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\t_testCmdUpdate.setParameter(CmdParameters.PARAM_NAME_TASK_ID, VALID_TASKID + \"\");\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 2b: task name is an empty String\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", EMPTY_STRING, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 2c: new task name is same as current task name (no changes)\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 2d: new task name is different from current task name (changes\n\t\t// made)\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_2, null, null, null);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_2, NO_TIME, NO_TIME, PRIORITY_TYPE.NORMAL);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t}",
"ITaskView getTaskView();",
"@Test(expected = HTIllegalAccessException.class)\n public void testStartTaskReservedByNotActualOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n //org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assume.assumeTrue(\"user1\".equals(t.getActualOwner().getName()));\n //org.junit.Assert.assertEquals(Status.RESERVED, t.getStatus());\n org.junit.Assume.assumeTrue(Status.RESERVED.equals(t.getStatus()));\n \n this.services.startTask(t.getId(), \"user2\");\n }",
"void updateTaskName(int id, String name);",
"@Override\n public Task<Boolean> then(@NonNull Task<Long> task) throws Exception {\n return addPostToUserUpvoted(postReference, postObject.getOp()).continueWith(new Continuation<Void, Boolean>() {\n @Override\n public Boolean then(@NonNull Task task) throws Exception {\n // Not upvoting post anymore\n upvotingPost = false;\n return true;\n }\n });\n }",
"public boolean updateData(View view) {\n final CharSequence[] items={\"Postpone\",\"Pre-pone\"};\n final EditText ed=new EditText(this);\n final ArrayList selected=new ArrayList();\n final View parent=(View)view.getParent();\n AlertDialog dialog=new AlertDialog.Builder(this)\n .setTitle(\"Update Task\")\n .setMessage(\"Enter the new task name:\")\n .setView(ed)\n .setPositiveButton(\"Postpone\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n TextView deletedata=(TextView)parent.findViewById(R.id.tname);\n String dataString=String.valueOf(deletedata.getText());\n String s1=String.valueOf(ed.getText());\n Toast.makeText(MainActivity.this,s1,Toast.LENGTH_LONG).show();\n boolean isUpdate = false;\n try {\n isUpdate = help.update(\n dataString,s1);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(isUpdate == true)\n Toast.makeText(MainActivity.this,\"Task preponed for tommorrow\",Toast.LENGTH_LONG).show();\n else\n Toast.makeText(MainActivity.this,\"Data not Updated\",Toast.LENGTH_LONG).show();\n loadTaskList();\n }\n })\n .setNegativeButton(\"Cancel\",null)\n .create();\n dialog.show();\n return true;\n\n }",
"@Override\n protected Void doInBackground(Void... v) {\n try {\n repeating = ServerCom.removeTask(mAptID, tempTask.getDescription(), tempTask.getAssignee());\n } catch (Exception e) {\n this.exception = e;\n }\n\n return null;\n }",
"void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );",
"public void notifyProjectItem(EtoProject etoProject){\n }",
"public void setOrginTaskID(String orginTaskID) {\n\t\tthis.orginTaskID = orginTaskID;\n\t}",
"private void processTask(Task task) throws SQLException, DaoException {\n if (!task.isChanged()) {\n processTaskList(task.getSubTaskList());\n return;\n }\n\n if (task.isForDeletion()) {\n deleteTask(task);\n return;\n } else if (task.getId() != -1) {\n updateTask(task);\n } else {\n insertTask(task);\n }\n\n processTaskList(task.getSubTaskList());\n\n }"
] | [
"0.66035074",
"0.64488405",
"0.6437285",
"0.6306354",
"0.62352616",
"0.60822946",
"0.6070309",
"0.5992209",
"0.5974327",
"0.5914633",
"0.591153",
"0.58803296",
"0.5856439",
"0.5852933",
"0.5844816",
"0.5821753",
"0.5818624",
"0.58098227",
"0.5802817",
"0.5758577",
"0.57500017",
"0.5721103",
"0.57031506",
"0.5645476",
"0.56223863",
"0.5619116",
"0.5612662",
"0.5545257",
"0.5538949",
"0.5533273",
"0.5522421",
"0.5508894",
"0.5503942",
"0.5501679",
"0.5494889",
"0.545938",
"0.5445785",
"0.5443295",
"0.5430875",
"0.5418153",
"0.54158545",
"0.5412642",
"0.54109466",
"0.54091996",
"0.54066074",
"0.53950554",
"0.5395037",
"0.53922194",
"0.53887105",
"0.53874636",
"0.53649575",
"0.5363147",
"0.53625226",
"0.5362515",
"0.53581226",
"0.53526187",
"0.53441",
"0.53346276",
"0.53268087",
"0.5326522",
"0.532564",
"0.5321143",
"0.5317176",
"0.5294804",
"0.5292212",
"0.5292036",
"0.5288309",
"0.5283313",
"0.5282103",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.5274744",
"0.52716047",
"0.526953",
"0.5267532",
"0.52488667",
"0.5244527",
"0.5237763",
"0.5234607",
"0.52338254",
"0.5222498",
"0.52147764",
"0.52135026",
"0.52114135",
"0.5202221",
"0.5197671",
"0.51848876",
"0.5180576",
"0.51802576",
"0.5180049",
"0.5166799"
] | 0.0 | -1 |
check any deadline has passed | public static int checkDeadline(int userid) {
try {
Statement st = conn.createStatement();
//get all tasks of the user
String getTasksCommand = "SELECT mytask FROM users WHERE userid = " + userid;
ResultSet taskIdResult = st.executeQuery(getTasksCommand);
if(taskIdResult.next()) {
Long[] taskIds = (Long[]) taskIdResult.getArray(1).getArray();
for (Long taskId : taskIds) {
//get task info from group task table
String getTaskInfoCommand = "SELECT * FROM grouptask WHERE taskid = " + taskId;
ResultSet taskInfo = st.executeQuery(getTaskInfoCommand);
if (taskInfo.next()) {
LocalDate startdate = taskInfo.getDate(STARTDATE_COLUMN).toLocalDate();
LocalDate deadlineDate = taskInfo.getDate(DEADLINE_COLUMN).toLocalDate();
String repetition = taskInfo.getString(REPETITION_COLUMN);
String members = taskInfo.getString("member");
int deadlineStatus = meetRecentDeadline(startdate, deadlineDate, repetition);
if (deadlineStatus == NO_RECENT_DEADLINE) {
//do nothing
} else { //check progress and frequency
String getProgressCommand = "SELECT * FROM progresstrack WHERE memberid = "
+ userid + " AND taskid = " + taskId;
ResultSet progressInfo = st.executeQuery(getProgressCommand);
if (progressInfo.next()) {
int progress = progressInfo.getInt(TRACK_PROGRESS_COLUMN);
int frequency = progressInfo.getInt(TRACK_FREQUENCY_COLUMN);
if (progress < frequency) {
String recordPenaltyCommand = String.format("INSERT INTO penalty(userid, taskid, members) VALUES(%d, %d, '%s')", userid, taskId, members);
st.executeUpdate(recordPenaltyCommand);
String removeMyselfCommand = String.format("UPDATE penalty SET members = array_remove(members, '%d') WHERE userid = %d AND taskid = %d", userid, userid, taskId);
st.executeUpdate(removeMyselfCommand);
String addPenaltyCountCommand = String.format("UPDATE progresstrack SET penaltycount = penaltycount+1 WHERE taskid = %d AND memberid = %d", taskId, userid);
st.executeUpdate(addPenaltyCountCommand);
}
}
if (deadlineStatus == MEET_RECENT_DEADLINE) {
String clearProgressCommand = String.format("UPDATE progresstrack SET progress = 0 WHERE memberid = %d AND taskid = %d", userid, taskId);
st.executeUpdate(clearProgressCommand);
} else {
String setTaskInvalid = String.format("UPDATE grouptask SET valid = false WHERE taskid = %d", taskId);
st.executeUpdate(setTaskInvalid);
String removeFromTask = String.format("UPDATE users SET mytask = array_remove(mytask, '%d') WHERE userid = %d", taskId, userid);
st.executeUpdate(removeFromTask);
String addToCompleteTask = String.format("UPDATE users SET completetask = array_append(completetask, '%d') WHERE userid = %d", taskId, userid);
st.executeUpdate(addToCompleteTask);
}
}
}
}
}
st.close();
return SUCCESS;
} catch (SQLException e) {
return SERVER_FAILURE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 }",
"public boolean hasDeadline() {\n return hasDeadline;\n }",
"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}",
"long getDeadline();",
"boolean hasWaitTime();",
"private boolean isDeadline(TaskDate taskEndDate) {\n return taskEndDate != null;\n }",
"@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}",
"@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"public boolean isPastSubmissionDeadline() {\r\n\t\tCalendar currentTime = Calendar.getInstance();\r\n\t\tif(currentTime.after(getConference().getManuscriptDueDate())) {\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\treturn false;\r\n\t}",
"private void checkTimeout() {\n val timeout = config.getInt(\"timeout\");\n\n checkArgument(timeout >= 1000, \"timeout is less than 1000!\");\n }",
"boolean hasDesiredTime();",
"private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }",
"boolean hasDepositEndTime();",
"private void checkTimeout() {\n/* 169 */ if (this.socket != null) {\n/* */ \n/* 171 */ long i = this.keepaliveTimeoutMs;\n/* */ \n/* 173 */ if (this.listRequests.size() > 0)\n/* */ {\n/* 175 */ i = 5000L;\n/* */ }\n/* */ \n/* 178 */ long j = System.currentTimeMillis();\n/* */ \n/* 180 */ if (j > this.timeLastActivityMs + i)\n/* */ {\n/* 182 */ terminate(new InterruptedException(\"Timeout \" + i));\n/* */ }\n/* */ } \n/* */ }",
"boolean hasCollectEndTime();",
"boolean hasEndTime();",
"public void setDeadline(int deadline)\n\t{\n\t\tthis.deadline = deadline;\n\t}",
"public boolean isEnd() { return (_dateExpiration - System.currentTimeMillis()) <= 0; }",
"private boolean hasCoolOffPeriodExpired(Jwt jwt) {\n\n Date issuedAtTime = jwt.getClaimsSet().getIssuedAtTime();\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.set(Calendar.MILLISECOND, 0);\n calendar.add(Calendar.MINUTE, -1);\n\n return calendar.getTime().compareTo(issuedAtTime) > 0;\n }",
"public boolean isExpired() {\n final LocalDateTime now = LocalDateTime.now().minusSeconds(10L);\n return now.isAfter(startTime.plusMinutes(exam.getExamTime())) || endTime != null;\n }",
"public void publishDeadline() {\n\t\tSystem.out.println(\"deadline\" + deadline);\n\t}",
"public void checkTime() throws InterruptedByTimeoutException\n {\n if (System.currentTimeMillis() - this.start > TIME)\n throw new InterruptedByTimeoutException();\n }",
"public void checkExpiration(){\n //Will grab the time from the timer and compare it to the job expiration\n //Then will grab each jobID that is expired\n //Will then add it to a String array\n //then remove all those jobs in the String array\n //return true if found\n\n for(int i=0; i < jobs.size(); i++){\n currentJob = jobs.get(i);\n if(currentJob.getExpData().compareTo(JobSystemCoordinator.timer.getCurrentDate())==0){\n currentJob.setStatus(\"EXPIRED\");\n }\n }\n }",
"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}",
"boolean hasExpired();",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public boolean hasPast();",
"public boolean isExpired() {\n return age() > this.timeout;\n }",
"public boolean hasExpired() {\n return this.getOriginalTime() + TimeUnit.MINUTES.toMillis(2) < System.currentTimeMillis();\n }",
"private boolean waitForClientsUntil(long deadline) {\n boolean alldone = false;\n long now = System.nanoTime();\n\n while (!alldone && now < deadline) {\n try {\n alldone = _completeLatch.await(deadline - now, TimeUnit.NANOSECONDS);\n } catch (InterruptedException ie) {\n // If we are interrupted the thread is being asked to shutdown.\n // Return true to indicate that and reset the interrupt state\n // of the thread.\n Thread.currentThread().interrupt();\n alldone = true;\n }\n now = System.nanoTime();\n }\n\n return alldone;\n }",
"public boolean isExpired()\n\t{\n\t\tif (TimeRemaining == 0) \n\t\t\treturn true;\n\t\telse return false;\n\t}",
"public boolean hasExpired(Map params, Date since) \r\n\t{\t\t\r\n \treturn (System.currentTimeMillis() - since.getTime()) > 5000;\r\n\t}",
"public boolean isLate(){\n Date d = givenBack != null ? givenBack : new Date();\n return expirationDate.before(d);\n }",
"boolean hasExpiryTimeSecs();",
"boolean hasErrorTime();",
"public int getDeadline(){return deadline;}",
"private boolean checkDeadline(String d)\n\t{\n\t\t//yyyy/mm/dd\n\t\treturn Pattern.matches(\"[0-9][0-9][0-9][0-9]/[0-1][0-9]/[0-3][0-9]\", d);\n\t}",
"public abstract void isTimeout(long ms);",
"public static void printEmptyDeadlineDateError() {\n botSpeak(Message.EMPTY_DEADLINE_DATE_ERROR);\n }",
"boolean hasExpiry();",
"public boolean func_isInTheFuture() {\n if(TimeUtils.compareWithNow(startTime) >= 0)\n return true;\n return false;\n }",
"public static boolean hasExpired(String name, Timeable caller) {\n\t\tnac.setName(name);\n\t\tnac.setCaller(caller);\n\t\tif (!clocks.containsKey(nac)) {\n\t\t\tSystem.err.println(\"No timer with the name: '\" + name + \"' exists\");\n\t\t\treturn false;\n\t\t}\n\t\tlong curTime = System.currentTimeMillis();\n\t\tboolean result = clocks.get(nac) < curTime;\n\t\treturn result;\n\t}",
"public boolean hasExpired(){\n Date now = new Date();\n return now.after(getExpireTime());\n }",
"public static boolean elapsed(long from, long required) {\n return System.currentTimeMillis() - from > required;\n }",
"public void setDeadline(int deadline) {\n\t\tif (deadline < 0)\n\t\t\tthrow new InvalidDeadlineException(deadline);\n\n\t\tif (deadline > this.deadline) \n\t\t\tthis.deadline = deadline;\n\t}",
"@Scheduled(fixedRate = checkRate)\n public void CheckExpired() {\n log.info(\"Checking if links expired\");\n try {\n for(ShortURL s : urlList) {\n // Si la fecha guardada es antes que este momento\n Date then1 = s.getExpirationDate();\n java.util.Date then2= new java.util.Date(then1.getTime());\n Instant then = then2.toInstant();\n Instant now = ZonedDateTime.now().toInstant();\n if(then.isBefore(now)){\n log.info(\"URL {} expired.\", s.getUri().toString());\n s.setMode(HttpStatus.GONE.value());\n }\n }\n } catch( NullPointerException e) {\n //No se ha inicializado aun\n }\n\n }",
"@Test\n public void isValidDeadline() {\n assertFalse(Deadline.isValidDeadline(INVALID_0_JAN_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n\n // Valid deadline -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_2018.toString()));\n\n // Valid deadline for february -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_28TH_FEB_2018.toString()));\n\n // Invalid deadline for february in common year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_29TH_FEB_2018.toString()));\n\n // Valid deadline for february during leap year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_29TH_FEB_2020.toString()));\n\n // Invalid deadline for february during leap year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_30TH_FEB_2020.toString()));\n\n // Valid deadline for months with 30 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_30TH_APR_2018.toString()));\n\n // Invalid deadline for months with 30 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_31ST_APR_2018.toString()));\n\n // Valid deadline for months with 31 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_31ST_JAN_2018.toString()));\n\n // Invalid deadline for months with 31 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_2018.toString()));\n\n // Invalid month -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_13_2018.toString()));\n\n // Valid month -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_APR_2018.toString()));\n\n // Valid year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_9999.toString()));\n\n // Invalid year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_2017.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_10000.toString()));\n\n // Valid date without year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Invalid date without year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_WITHOUT_YEAR.toString()));\n }",
"public boolean hasReachedGoal(List<Integer> collectTime);",
"boolean expired();",
"public boolean isTimeUp(long startTime){\r\n\t\tlong diff = System.currentTimeMillis() - startTime;\r\n\t\treturn diff/(1000 * 60)%60 > TIMEOUT_IN_MINUTES;\r\n\t}",
"private static int meetRecentDeadline(LocalDate startdate, LocalDate deadlineDate, String repetition){\n\n LocalDate today = LocalDate.now();\n\n if(deadlineDate.isEqual(today)){\n return MEET_FINAL_DEADLINE;\n }\n switch (repetition){\n case \"{Daily}\":\n if(today.isEqual(startdate.plusDays(1))){\n return MEET_RECENT_DEADLINE;\n }\n case \"{Weekly}\":\n if(today.isEqual(startdate.plusDays(7))){\n return MEET_RECENT_DEADLINE;\n }\n case \"{Monthly}\":\n if(today.isEqual(startdate.plusMonths(1))){\n return MEET_RECENT_DEADLINE;\n }\n }\n return NO_RECENT_DEADLINE;\n }",
"public boolean isPingStillValid(long validTimespan) {\r\n\t\treturn lastContactTimestamp.get() + validTimespan > System.currentTimeMillis();\r\n\t}",
"@Override\n protected boolean isFinished() {\n return Timer.getFPGATimestamp()-startT >= 1.5;\n }",
"boolean checkForExpiration() {\n boolean expired = false;\n\n // check if lease exists and lease expire is not MAX_VALUE\n if (leaseId > -1 && leaseExpireTime < Long.MAX_VALUE) {\n\n long currentTime = getCurrentTime();\n if (currentTime > leaseExpireTime) {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[checkForExpiration] Expiring token at {}: {}\",\n currentTime, this);\n }\n noteExpiredLease();\n basicReleaseLock();\n expired = true;\n }\n }\n\n return expired;\n }",
"public synchronized void checkTokenExpiry() {\n if (this.mExpiryDate != null && this.mExpiryDate.getTime() <= System.currentTimeMillis() + REFRESH_THRESHOLD) {\n acquireTokenAsync();\n }\n }",
"@Test\n\tvoid testCheckDuration2() {\n\t\tassertFalse(DataChecker.checkDuration(Duration.ofMinutes(-11)));\n\t}",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"boolean hasVotingEndTime();",
"public static boolean isRemoteOnOrAfterTimeValid(long onOrAfter, long now) {\n return onOrAfter + CLOCK_SKEW_TIME > now;\n }",
"boolean isClockFailure();",
"public boolean isOverdue(int today);",
"boolean hasSolverTimeLimitSeconds();",
"public static void errorCheckingDeadline(String currentInput, String taskDescription, TaskList tasks) {\n try {\n createDeadlineTask(currentInput, taskDescription, tasks);\n } catch (DukeException e) {\n Ui.printInvalidDeadlineErrorMessage();\n }\n }",
"@Override\n\tprotected Result check() throws Exception {\n\t\tif (failedMessageMeter != null && failedMessageMeter.getFifteenMinuteRate() > 0) {\n\t\t\treturn Result.unhealthy(\">1 messages failed to be sent to Kafka in the past 15minutes\");\n\t\t} else {\n\t\t\treturn Result.healthy();\n\t\t}\n\t}",
"public boolean hasFinished() {\n\t\treturn new Date(startDate.getTime() + duration).before(new Date());\n\t}",
"boolean isExpired();",
"public boolean checkTimeInPast() throws ParseException {\n LocalTime ltnow = LocalTime.now();\n if(b_startTime != null && checkDateIsToday()){\n LocalTime ltstart = b_startTime.toInstant().atZone(ZoneId.systemDefault()).toLocalTime();\n return ltstart.isBefore(ltnow);\n }else{\n return false;\n }\n }",
"@java.lang.Override\n public long getDeadline() {\n return deadline_;\n }",
"@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateEarlierTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_1_TODAY, false);\r\n }",
"private boolean isReqTimeFresh(Date reqTime, String username) {\r\n\t\tDate oldReqTime = oldRequestTimes.get(username); \r\n\t\tif(oldReqTime!= null && oldReqTime.equals(reqTime))\r\n\t\t\tthrow new RuntimeException(\"This request has been sent before.\");\r\n\t\t\r\n\t\tDate current = new Date();\r\n\t\treturn current.getTime() - 750 < reqTime.getTime() && reqTime.getTime() < current.getTime() + 750;\r\n\t}",
"boolean isValidForNow ();",
"private boolean durationValidation(int duration){\n return duration < 300 && duration >10;\n }",
"@Override\n public boolean isFinished() {\n return System.currentTimeMillis() >= endtime;\n }",
"public boolean isTimeElapsed() {\n\t\treturn (timeLeft <= 0);\n\t}",
"@java.lang.Override\n public long getDeadline() {\n return deadline_;\n }",
"boolean hasDuration();",
"@java.lang.Override\n public boolean hasRemainingTimeSeconds() {\n return remainingTimeSeconds_ != null;\n }",
"boolean hasReceiveTime();",
"public boolean isOverTimeout(long now, long timeoutNS) {\n\t\tfinal long local = beginNS;\n\t\treturn (local==0) ? false : local+timeoutNS>now;\t\t\n\t}",
"public void checkOverDue() {\n\t\tif (state == loanState.current && //changed 'StAtE' to 'state' and ' lOaN_sTaTe.CURRENT to loanState.current\r\n\t\t\tCalendar.getInstance().getDate().after(date)) { //changed Calendar.gEtInStAnCe to Calender.getInstance and gEt_DaTe to getDate and DaTe to date\r\n\t\t\tthis.state = loanState.overDue; //changed 'StAtE' to 'state' and lOaN_sTaTe.OVER_DUE to loanState.overDue\t\t\t\r\n\t\t} //added curly brackets\r\n\t}",
"private boolean hasWaiters()\r\n/* 438: */ {\r\n/* 439:526 */ return this.waiters > 0;\r\n/* 440: */ }",
"boolean hasVisitEndtime();",
"boolean hasVisitEndtime();",
"boolean isExpire(long currentTime);",
"public boolean isJourneyInThePast() {\n\t\t\n\t\tlong journeyStartTime = TimeParser.strDateTimeToDate(mDeparture).getTime();\n\t\tlong now = System.currentTimeMillis();\n\t\t//System.out.println(\"DBG isInPast: now:\"+now+\" start:\"+journeyStartTime);\n\t\tif (journeyStartTime >= now) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Constants.useWallClock == false) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isFinished() {\n return (System.currentTimeMillis() - startTime) >= time;\n \t//return false;\n }",
"public boolean checkDate(Date dateNow, Date maxAccess) {\n return dateNow.after(maxAccess);\n }",
"public boolean isExpired() {\n return System.currentTimeMillis() > this.expiry;\n }",
"public void timePasses(){\n crtClock++;\n if(crtClock==25)crtClock=1; // If end of day, reset to 1\n if(crtClock<=opHours)tellMeterToConsumeUnits(unitsPerHr);\n }",
"public boolean isExpired() {\n\t\t// Return whether the exipred after time has passed in American Samoa\n\t\treturn getSamoaNow().after(this.expiredAfter);\n\t}",
"private void assertValidTimeWindow() {\n if (getSuggestedWindowStart().isAfter(getSuggestedWindowEnd())) {\n throw new AcmeProtocolException(\"Received an invalid suggested window\");\n }\n }",
"@Test\r\n public void testIsExpiredToday_ExpirationDateToday_ExpirationDateLaterTime() {\r\n doTest(TEST_DATE_2_TODAY, TEST_DATE_3_TODAY, false);\r\n }",
"boolean hasDowntimeJailDuration();",
"public void testGetStartTime() {\n assertTrue(mb.getStartTime() > -1);\n }",
"public boolean remainsTime() {\n current = System.currentTimeMillis();\n int timeSpent;\n timeSpent = (int) ((current-this.begin)/1000.0);\n return (timeSpent<=this.limite);\n }",
"public boolean isTimeStampReached(long _timeStamp) {\n return (_timeStamp - getTime())<=0;\n }",
"public boolean isExpired()\n {\n long dtExpiry = m_dtExpiry;\n return dtExpiry != 0 && dtExpiry < getSafeTimeMillis();\n }",
"boolean hasExchangeTime();",
"private void checkLastLifeSign() {\n // > 0 means that client has already connected and meanwhile sent\n // one or more messages and the lifesign system is activated\n if (nextLifeSignAwaited > 0 && nextLifeSignAwaited < System.currentTimeMillis()) {\n // lifesign not in time\n System.out.println(\"Kein lifesign erhalten\");\n lifeSignSucceeded = true;\n stopped = true;\n try {\n socketLayer.close();\n } catch (Exception ex) {\n // nothing to do\n }\n }\n }",
"public void timeToCheckWorker() {\n notifyCanMove(this.getCurrentTurn().getCurrentPlayer());\n }"
] | [
"0.6862361",
"0.664821",
"0.6565715",
"0.64961874",
"0.6488787",
"0.6453761",
"0.6445101",
"0.6445101",
"0.6372743",
"0.63195246",
"0.63076293",
"0.6285294",
"0.62498146",
"0.6185715",
"0.6178322",
"0.61760855",
"0.6176001",
"0.61709726",
"0.6139399",
"0.6134565",
"0.6107912",
"0.6076921",
"0.6073488",
"0.60719985",
"0.6056165",
"0.6037362",
"0.6007445",
"0.600694",
"0.6006674",
"0.5999575",
"0.59477437",
"0.5947525",
"0.59192663",
"0.5904275",
"0.59",
"0.5888154",
"0.58878267",
"0.5854371",
"0.58525556",
"0.5841297",
"0.5833562",
"0.5832943",
"0.5831191",
"0.5829844",
"0.58288896",
"0.58211595",
"0.5814146",
"0.58036315",
"0.5789477",
"0.5778794",
"0.5770707",
"0.5761688",
"0.57514673",
"0.57445836",
"0.57411087",
"0.5725597",
"0.57190126",
"0.57051456",
"0.56992984",
"0.5697195",
"0.56926197",
"0.568895",
"0.56877244",
"0.5686795",
"0.56819034",
"0.56816965",
"0.5663833",
"0.56561136",
"0.5655628",
"0.56555676",
"0.5646754",
"0.56464225",
"0.5639881",
"0.5636725",
"0.5636121",
"0.5633568",
"0.5626376",
"0.5623882",
"0.5618876",
"0.5612954",
"0.5611001",
"0.56080055",
"0.5602764",
"0.5602764",
"0.5598547",
"0.55983186",
"0.5598273",
"0.55956894",
"0.55907065",
"0.55795145",
"0.5576469",
"0.55759394",
"0.55693215",
"0.5559371",
"0.55545175",
"0.55489427",
"0.55442894",
"0.55409896",
"0.5540983",
"0.55368614",
"0.5534096"
] | 0.0 | -1 |
helper method of checkDeadline | private static int meetRecentDeadline(LocalDate startdate, LocalDate deadlineDate, String repetition){
LocalDate today = LocalDate.now();
if(deadlineDate.isEqual(today)){
return MEET_FINAL_DEADLINE;
}
switch (repetition){
case "{Daily}":
if(today.isEqual(startdate.plusDays(1))){
return MEET_RECENT_DEADLINE;
}
case "{Weekly}":
if(today.isEqual(startdate.plusDays(7))){
return MEET_RECENT_DEADLINE;
}
case "{Monthly}":
if(today.isEqual(startdate.plusMonths(1))){
return MEET_RECENT_DEADLINE;
}
}
return NO_RECENT_DEADLINE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getDeadline();",
"private boolean isDeadline(TaskDate taskEndDate) {\n return taskEndDate != null;\n }",
"public boolean hasDeadline() {\n return hasDeadline;\n }",
"private boolean checkDeadline(String d)\n\t{\n\t\t//yyyy/mm/dd\n\t\treturn Pattern.matches(\"[0-9][0-9][0-9][0-9]/[0-1][0-9]/[0-3][0-9]\", d);\n\t}",
"public abstract LocalDateTime getDeadline();",
"public int getDeadline(){return deadline;}",
"@java.lang.Override\n public long getDeadline() {\n return deadline_;\n }",
"public void setDeadline(int deadline)\n\t{\n\t\tthis.deadline = deadline;\n\t}",
"@java.lang.Override\n public long getDeadline() {\n return deadline_;\n }",
"public Date getRealDeadline() {\r\n return realDeadline;\r\n }",
"public String getDeadline(){\n\t\treturn this.deadline ;\n\t}",
"public int getDeadline() {\n\t\treturn this.deadline;\n\t}",
"public void setDeadline(int deadline) {\n\t\tif (deadline < 0)\n\t\t\tthrow new InvalidDeadlineException(deadline);\n\n\t\tif (deadline > this.deadline) \n\t\t\tthis.deadline = deadline;\n\t}",
"@Override\n public Deadline getDeadline() {\n return this.deadline;\n }",
"public void setRealDeadline(Date realDeadline) {\r\n this.realDeadline = realDeadline;\r\n }",
"public Date getDeadlineDate() {\r\n return deadlineDate;\r\n }",
"@Test\n public void isValidDeadline() {\n assertFalse(Deadline.isValidDeadline(INVALID_0_JAN_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n\n // Valid deadline -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_2018.toString()));\n\n // Valid deadline for february -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_28TH_FEB_2018.toString()));\n\n // Invalid deadline for february in common year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_29TH_FEB_2018.toString()));\n\n // Valid deadline for february during leap year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_29TH_FEB_2020.toString()));\n\n // Invalid deadline for february during leap year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_30TH_FEB_2020.toString()));\n\n // Valid deadline for months with 30 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_30TH_APR_2018.toString()));\n\n // Invalid deadline for months with 30 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_31ST_APR_2018.toString()));\n\n // Valid deadline for months with 31 days -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_31ST_JAN_2018.toString()));\n\n // Invalid deadline for months with 31 days -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_2018.toString()));\n\n // Invalid month -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_0_2018.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_13_2018.toString()));\n\n // Valid month -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_APR_2018.toString()));\n\n // Valid year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_9999.toString()));\n\n // Invalid year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_2017.toString()));\n assertFalse(Deadline.isValidDeadline(INVALID_1ST_JAN_10000.toString()));\n\n // Valid date without year -> returns true\n assertTrue(Deadline.isValidDeadline(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Invalid date without year -> returns false\n assertFalse(Deadline.isValidDeadline(INVALID_32ND_JAN_WITHOUT_YEAR.toString()));\n }",
"public static void errorCheckingDeadline(String currentInput, String taskDescription, TaskList tasks) {\n try {\n createDeadlineTask(currentInput, taskDescription, tasks);\n } catch (DukeException e) {\n Ui.printInvalidDeadlineErrorMessage();\n }\n }",
"public void publishDeadline() {\n\t\tSystem.out.println(\"deadline\" + deadline);\n\t}",
"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 }",
"DateTime extractDeadline() {\r\n int indexOfBy = Arrays.asList(lowerParams).lastIndexOf(\"by\");\r\n if (indexOfBy < 0) {\r\n return null;\r\n } else {\r\n paramsByIndex = indexOfBy;\r\n }\r\n // get the rest of the params after \"by\"\r\n String[] candidates = Arrays.copyOfRange(lowerParams, indexOfBy + 1,\r\n lowerParams.length);\r\n DateTime parsed = DateUtil.parse(candidates);\r\n if (parsed == null) {\r\n return parsed;\r\n }\r\n\r\n // add time 23:59 to deadline if no time was specified\r\n if (parsed.getHour() == null) {\r\n return initTimeToEndOfDay(parsed);\r\n } else {\r\n return parsed;\r\n }\r\n }",
"public void setDeadlineDate(Date deadlineDate) {\r\n this.deadlineDate = deadlineDate;\r\n }",
"public String printDeadlineFormat() {\n return \" (. ゚ー゚) Doesn't match the deadline format.\\n\"\n + \"Please use \\\"deadline ... /by dd/mm/yyyy 0000\\\" (in 24hr).\\n\";\n }",
"double getDeadline() {\n return deadline;\n }",
"public Deadline(String name, LocalDateTime deadline) {\n super(name, deadline);\n }",
"private boolean compareWithCurrentDate(LocalDateTime deadline, LocalDateTime assignDate, boolean isLessThanDay) {\n boolean isReadyToNotify=false;\n if(isLessThanDay){\n if(deadline.until(LocalDateTime.now(),HOURS)==HALF_A_DAY){\n isReadyToNotify=true;\n }\n }else{\n // if this time is the mean of deadline and assign date\n if(deadline.until(LocalDateTime.now(),HOURS) == deadline.until(assignDate,HOURS)/2){\n isReadyToNotify=true;\n }\n }\n return isReadyToNotify;\n }",
"public Deadline(String name, String deadline) {\n super(name, DateTimeUtil.stringAsDateTime(deadline));\n }",
"public static void printEmptyDeadlineDateError() {\n botSpeak(Message.EMPTY_DEADLINE_DATE_ERROR);\n }",
"@Override\n public String getDeadlineName() {\n return this.deadline.getName();\n }",
"public Builder setDeadline(long value) {\n \n deadline_ = value;\n onChanged();\n return this;\n }",
"public boolean isPastSubmissionDeadline() {\r\n\t\tCalendar currentTime = Calendar.getInstance();\r\n\t\tif(currentTime.after(getConference().getManuscriptDueDate())) {\r\n\t\t\treturn true;\r\n\t\t} \r\n\t\treturn false;\r\n\t}",
"public static boolean isValidAssignmentDeadline(String test) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HHmm\");\n sdf.setLenient(false);\n try {\n sdf.parse(test);\n return true;\n } catch (ParseException e) {\n return false;\n }\n }",
"public void modifyDeadline(String deadline, String taskName) {\n \t\n \tSystem.out.println(\"Inside modifyDeadline()\");\n \tTask t = new Task();\n \tint count = 0;\n \tfor(Task task : toDoList) {\n \t\tif(task.getTaskName().equals(taskName)) {\n \t\t\tt = task;\n \t\t\ttry {\n \t\t\t\ttask.setDeadline(new SimpleDateFormat(\"dd/MM/yyyy\").parse(deadline));\n \t\t\t}catch (ParseException e) {\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t\ttoDoList.set(count, task);\n \t\t}\n \t\tcount ++;\n \t}\n \tSystem.out.println(\"Task Deadline modifies Succesfully\");\n \t\n \tdisplay();\n \t\n }",
"private void loadDeadline(String type) {\n String description = parser.parseDeadlineEventDescription(type);\n String dateString = parser.parseDateTimeDeadline(type);\n LocalDate date = LocalDate.parse(dateString,\n DateTimeFormatter.ofPattern(\"dd/MM/yyyy\"));\n Task toAdd = new Deadline(description, date);\n if (type.contains(\"\\u2713\")) {\n toAdd.markAsDone();\n }\n tasks.add(toAdd);\n }",
"public Deadline(String description, LocalDate date, boolean isDone) {\n super(TaskType.DEADLINE, description, date, isDone);\n this.date = date;\n }",
"public InterventionDeadlineDefined() {\r\n setEventTypeUid(INTERVENTION_DEADLINE_DEFINED.getUid());\r\n setEventType(INTERVENTION_DEADLINE_DEFINED.getName());\r\n }",
"private Tasks createDeadlineTask(Tasks task, String descriptionOfTask, ArrayList<String> timeArray) {\n if (timeArray.size() == 1) {\n String endDate = timeArray.get(0);\n task = createDeadlineTaskForInputWithoutTime(task, descriptionOfTask, endDate);\n } else {\n String endDate = timeArray.get(0);\n String endTime = timeArray.get(1);\n task = createDeadlineTaskForInputWithTime(task, descriptionOfTask, endDate, endTime);\n }\n return task;\n }",
"public int getMaxDeadline() {\n\t\treturn this.maxDeadline;\n\t}",
"protected Deadline(String deadlineDescription, String deadline) throws DukeException {\n super(deadlineDescription);\n this.deadline = DateTimeHandler.parseDateTime(deadline);\n }",
"boolean hasEndTime();",
"public static int checkDeadline(int userid) {\n try {\n Statement st = conn.createStatement();\n //get all tasks of the user\n String getTasksCommand = \"SELECT mytask FROM users WHERE userid = \" + userid;\n ResultSet taskIdResult = st.executeQuery(getTasksCommand);\n if(taskIdResult.next()) {\n\n Long[] taskIds = (Long[]) taskIdResult.getArray(1).getArray();\n\n for (Long taskId : taskIds) {\n //get task info from group task table\n String getTaskInfoCommand = \"SELECT * FROM grouptask WHERE taskid = \" + taskId;\n ResultSet taskInfo = st.executeQuery(getTaskInfoCommand);\n if (taskInfo.next()) {\n LocalDate startdate = taskInfo.getDate(STARTDATE_COLUMN).toLocalDate();\n LocalDate deadlineDate = taskInfo.getDate(DEADLINE_COLUMN).toLocalDate();\n String repetition = taskInfo.getString(REPETITION_COLUMN);\n String members = taskInfo.getString(\"member\");\n int deadlineStatus = meetRecentDeadline(startdate, deadlineDate, repetition);\n if (deadlineStatus == NO_RECENT_DEADLINE) {\n //do nothing\n } else { //check progress and frequency\n String getProgressCommand = \"SELECT * FROM progresstrack WHERE memberid = \"\n + userid + \" AND taskid = \" + taskId;\n ResultSet progressInfo = st.executeQuery(getProgressCommand);\n if (progressInfo.next()) {\n int progress = progressInfo.getInt(TRACK_PROGRESS_COLUMN);\n int frequency = progressInfo.getInt(TRACK_FREQUENCY_COLUMN);\n if (progress < frequency) {\n\n String recordPenaltyCommand = String.format(\"INSERT INTO penalty(userid, taskid, members) VALUES(%d, %d, '%s')\", userid, taskId, members);\n st.executeUpdate(recordPenaltyCommand);\n String removeMyselfCommand = String.format(\"UPDATE penalty SET members = array_remove(members, '%d') WHERE userid = %d AND taskid = %d\", userid, userid, taskId);\n st.executeUpdate(removeMyselfCommand);\n String addPenaltyCountCommand = String.format(\"UPDATE progresstrack SET penaltycount = penaltycount+1 WHERE taskid = %d AND memberid = %d\", taskId, userid);\n st.executeUpdate(addPenaltyCountCommand);\n }\n }\n if (deadlineStatus == MEET_RECENT_DEADLINE) {\n String clearProgressCommand = String.format(\"UPDATE progresstrack SET progress = 0 WHERE memberid = %d AND taskid = %d\", userid, taskId);\n st.executeUpdate(clearProgressCommand);\n } else {\n String setTaskInvalid = String.format(\"UPDATE grouptask SET valid = false WHERE taskid = %d\", taskId);\n st.executeUpdate(setTaskInvalid);\n String removeFromTask = String.format(\"UPDATE users SET mytask = array_remove(mytask, '%d') WHERE userid = %d\", taskId, userid);\n st.executeUpdate(removeFromTask);\n String addToCompleteTask = String.format(\"UPDATE users SET completetask = array_append(completetask, '%d') WHERE userid = %d\", taskId, userid);\n st.executeUpdate(addToCompleteTask);\n }\n\n }\n }\n }\n }\n st.close();\n return SUCCESS;\n } catch (SQLException e) {\n return SERVER_FAILURE;\n }\n }",
"public String findDeadlineDatetime(String input) {\n assert input.length() > 0;\n return findDatetime(input, \"/by\");\n }",
"public static Date getUserDeadline(Context context) {\n\n return new Date(context.getSharedPreferences(FILE_NAME, 0)\n .getLong(USER_DEADLINE_KEY, 0));\n }",
"boolean hasDepositEndTime();",
"private Date getDeadlineDate() {\n String dateString = jtf_DeadLine.getText();\n Date date = Utils.parseDateFromString(dateString);\n System.out.println(\"Date:\" + date.toString());\n return date;\n }",
"@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}",
"@Override\n\tpublic void waitCheck(double hours) {\n\t\t\n\t}",
"public DeadlineCommand(String description, LocalDateTime deadline) {\n this.description = description;\n this.deadline = deadline;\n }",
"protected long deadlineSeconds() {\n return DEFAULT_TASK_SECONDS;\n }",
"public void assignDeadline(String deadline, String taskName) {\n \t\n \tSystem.out.println(\"Inside assignDeadline()\");\n \tTask t = new Task();\n \tint count = 0;\n \tfor(Task task : toDoList) {\n \t\tif(task.getTaskName().equals(taskName)) {\n \t\t\tt = task;\n \t\t\ttry {\n \t\t\t\ttask.setDeadline(new SimpleDateFormat(\"dd/MM/yyyy\").parse(deadline));\n \t\t\t}catch (ParseException e) {\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t\ttoDoList.set(count, task);\n \t\t}\n \t\tcount++;\n \t}\n \tSystem.out.println(\"Task Deadline Assigned successfully\");\n \t\n \tdisplay();\n }",
"public Long getActiveDeadlineSeconds() {\n return activeDeadlineSeconds;\n }",
"public Task addDeadline(String specifications) throws DukeException {\n String[] specificationsArray = specifications.split(\"/by \", 2);\n if (specificationsArray.length <= 1) {\n throw new DukeException(\"You need to specify a date and time!\");\n }\n Task newTask = new Deadlines(specificationsArray[0], specificationsArray[1]);\n tasks.add(newTask);\n return newTask;\n }",
"private Tasks createDeadlineTaskForInputWithTime(Tasks task, String descriptionOfTask, String endDate, String endTime) {\n if (checkValidDate(endDate) && checkValidTime(endTime)) {\n Duration deadline = new Duration(endDate, endTime);\n task = new DeadlineTask(descriptionOfTask, deadline);\n }\n return task;\n }",
"public static void printEmptyDeadlineDescriptionError() {\n botSpeak(Message.EMPTY_DEADLINE_DESCRIPTION_ERROR);\n }",
"private Tasks createDeadlineTaskForInputWithoutTime(Tasks task, String descriptionOfTask, String endDate) {\n if (checkValidDate(endDate)) {\n Duration deadline = new Duration(endDate, \"2359\");\n task = new DeadlineTask(descriptionOfTask, deadline);\n }\n return task;\n }",
"private boolean checkTime(){\n\t\treturn false;\r\n\t}",
"public static boolean checkDateConstraints(Task task) {\n if (task.getBeginDate().before(new Date()) ||\n task.getBeginDate().after(task.getEndingDate()) ||\n task.getBeginDate().equals(task.getEndingDate())) {\n return false;\n }\n return true;\n }",
"public static String parseDeadline(String instruction) throws JarvisException, IOException {\n String taskDescription = \"\";\n int currIndex = 8;\n\n // Extracting the deadline (dd/mm/yyyy hh:mm)\n while (currIndex < instruction.length() &&\n !instruction.substring(currIndex).startsWith(\" /\")) {\n taskDescription += instruction.substring(currIndex, currIndex + 1);\n currIndex++;\n }\n\n // If the extracted deadline is too short to contain all of the relevant details\n if (currIndex == 8 || currIndex == instruction.length() ||\n instruction.substring(currIndex).length() != 21) {\n throw new JarvisException(Ui.INCOMPLETE_DEADLINE);\n\n // If the date keyed in by the user is formatted wrongly\n } else if (instruction.charAt(currIndex + 7) != '/' &&\n instruction.charAt(currIndex + 10) != '/') {\n throw new JarvisException(Ui.WRONGLY_FORMATTED_DATE);\n\n // If the time keyed in by the suer is formatted wrongly\n } else if (instruction.substring(currIndex).length() < 20){\n throw new JarvisException(Ui.WRONGLY_FORMATTED_DEADLINE_TIME);\n\n // If the deadline is formatted correctly overall\n } else {\n String by = instruction.substring(currIndex + 5);\n Task newDeadline = new Deadline(taskDescription, by);\n\n // Add the task to the taskList array and update the task file in the user's hard disk\n return TaskList.addTaskAndUpdate(newDeadline);\n }\n }",
"public void addDeadline()\n throws StringIndexOutOfBoundsException, ArrayIndexOutOfBoundsException {\n System.out.println(LINEBAR);\n\n try {\n String taskDescription = userIn.split(DEADLINE_IDENTIFIER)[DESCRIPTION].substring(DEADLINE_HEADER);\n String timing = userIn.split(DEADLINE_IDENTIFIER)[TIMING];\n Deadline deadline = new Deadline(taskDescription, timing);\n tasks.add(deadline);\n storage.writeToFile(deadline);\n ui.echoUserInput(deadline, tasks.taskIndex);\n } catch (StringIndexOutOfBoundsException e) {\n ui.printStringIndexOOB();\n } catch (ArrayIndexOutOfBoundsException e) {\n ui.printArrayIndexOOB();\n }\n System.out.println(LINEBAR);\n }",
"protected Deadline(String deadlineDescription, LocalDateTime deadlineTiming) {\n super(deadlineDescription);\n this.deadline = deadlineTiming;\n }",
"@Test\n public void isValidFormat() {\n assertFalse(Deadline.isValidFormat(VALID_DAY_1));\n\n // Deadline with day and month dd/mm -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_WITHOUT_YEAR.toString()));\n\n // Deadline with all 3 fields dd/mm/yyyy -> true\n assertTrue(Deadline.isValidFormat(VALID_1ST_JAN_2018.toString()));\n }",
"public void setDropDeadline(Date dropDeadline) {\n this.dropDeadline = dropDeadline;\n }",
"public static void newDeadline(Project proj) throws ParseException {\n System.out.print(\"Please enter the new deadline for the project (dd/MM/yyyy): \");\n String snewDeadline = input.nextLine();\n Date newDeadline = dateformat.parse(snewDeadline);\n proj.changeDeadline(newDeadline);\n }",
"public void setWithdrawalDeadline(Date withdrawalDeadline) {\n this.withdrawalDeadline = withdrawalDeadline;\n }",
"void confirmDeleteDeadline(final Deadline deadline, final String gmailAddress)\n\t{\n\t\tnew AsyncTask<Boolean, Boolean, Boolean>()\n\t\t{\n\t\t\tProgressDialog progressDialog;\n\t\t\tString message = \"\";\n\n\t\t\t@Override\n\t\t\tprotected void onPreExecute()\n\t\t\t{\n\t\t\t\tprogressDialog = ProgressDialog.show(GroupDeadlineActivity.this, \"Deleting\",\n\t\t\t\t\t\t\"Deleting deadline...\");\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground(Boolean... params)\n\t\t\t{\n\t\t\t\t// check connection\n\t\t\t\tif (WebMinion.isConnected(GroupDeadlineActivity.this) == false)\n\t\t\t\t{\n\t\t\t\t\tmessage = \"No Connection\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// check rights\n\t\t\t\tif (!WebMinion.canManageGroup(groupId, gmailAddress))\n\t\t\t\t{\n\t\t\t\t\tmessage = \"Only Admins can delete Deadlines\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tWebMinion.deleteDeadline(deadline, gmailAddress, groupId, groupName);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected void onPostExecute(Boolean result)\n\t\t\t{\n\t\t\t\tprogressDialog.dismiss();\n\t\t\t\tif (result == false)\n\t\t\t\t\tToast.makeText(GroupDeadlineActivity.this, message, Toast.LENGTH_SHORT).show();\n\t\t\t\telse\n\t\t\t\t\trefreshDeadlines();\n\t\t\t}\n\n\t\t}.execute(true);\n\t}",
"public Deadline(String description, LocalDateTime dateEnd) {\n super(description);\n this.dateEnd = dateEnd;\n }",
"boolean hasWaitTime();",
"boolean hasDesiredTime();",
"public Deadline() {\n this.dateWrapper = Optional.empty();\n this.timeWrapper = Optional.empty();\n }",
"private void processLateDeliverable(Connection connection, LateDeliverable lateDeliverable, Date currentDeadline,\r\n long deliverableId, boolean needToNotify, long phaseId, long resourceId) throws SQLException,\r\n LateDeliverablesProcessingException {\r\n Project project = lateDeliverable.getProject();\r\n\r\n LateDeliverableType lateDeliverableType = lateDeliverable.getType();\r\n // Get late deliverable type ID:\r\n long lateDeliverableTypeId = lateDeliverableTypeIds.get(lateDeliverable.getType());\r\n\r\n boolean canSendNotification = false;\r\n boolean addTrackingRecord = false;\r\n Date recordDeadline = currentDeadline;\r\n String explanation = null; // NEW in 1.2\r\n // Prepare variable that will store late deliverable record creation date:\r\n Date createDate = new Date(); // NEW in 1.2\r\n\r\n Object[] result = doQuery(SELECT_MAX_DEADLINE_SQL, connection, new Object[] {phaseId, resourceId,\r\n deliverableId, lateDeliverableTypeId}, true, Timestamp.class, Long.class);\r\n // Check if records with the same phase ID, resource ID, deliverable and late deliverable type ID exists:\r\n boolean alreadyTracked = ((Long) result[1] > 0);\r\n if (alreadyTracked && (lateDeliverableType == LateDeliverableType.REJECTED_FINAL_FIX)) {\r\n return;\r\n }\r\n\r\n Date oldDeadline = (Timestamp) result[0];\r\n if (alreadyTracked && (oldDeadline != null)) {\r\n if (oldDeadline.getTime() < currentDeadline.getTime()) {\r\n // deadline was extended, but the user is late again\r\n addTrackingRecord = true;\r\n canSendNotification = true;\r\n } else if (needToNotify && (notificationInterval != 0)) {\r\n recordDeadline = oldDeadline;\r\n // Prepare statement for retrieving last notification time and\r\n // \"forgive\" flag for this late deliverable\r\n result = doQuery(SELECT_LAST_NOTIFICATION_TIME_FORGIVE_SQL, connection,\r\n new Object[] {phaseId, resourceId, new Timestamp(recordDeadline.getTime()), deliverableId,\r\n lateDeliverableTypeId}, false, Timestamp.class, Boolean.class, String.class, Timestamp.class);\r\n\r\n int index = 0;\r\n // Get the previous notification timestamp\r\n Date previousNotificationTime = (Timestamp) result[index++];\r\n\r\n if (!((Boolean) result[index++])\r\n && (previousNotificationTime != null)\r\n && ((System.currentTimeMillis() - previousNotificationTime.getTime())\r\n >= (notificationInterval * Helper.THOUSAND))) {\r\n // notificationInterval passed, need to send one more\r\n // notification\r\n canSendNotification = true;\r\n }\r\n\r\n // Get explanation:\r\n explanation = (String) result[index++]; // NEW in 1.2\r\n // Get record creation date:\r\n createDate = (Timestamp) result[index]; // NEW in 1.2\r\n }\r\n } else {\r\n // the user is late for the first time with this deliverable\r\n addTrackingRecord = true;\r\n canSendNotification = true;\r\n }\r\n\r\n canSendNotification = canSendNotification && needToNotify;\r\n\r\n if (addTrackingRecord) {\r\n doDMLQuery(buildInsertSQL(lateDeliverableType, canSendNotification), connection,\r\n buildInsertParams(lateDeliverableTypeId, phaseId, resourceId, deliverableId, lateDeliverableType,\r\n currentDeadline, lateDeliverable.getCompensatedDeadline()));\r\n\r\n // log data for record added to late_deliverables table\r\n Helper.logInfo(log, \"late deliverable data : project id[\" + project.getId() + \"], phase id[\"\r\n + phaseId + \"],\" + \" resource id[\" + resourceId + \"], deliverable id[\" + deliverableId + \"].\");\r\n } else {\r\n doDMLQuery(String.format(UPDATE_SQL, canSendNotification ? \"last_notified = current, \" : \"\"),\r\n connection, new Object[] {phaseId, resourceId, new Timestamp(recordDeadline.getTime()), deliverableId,\r\n lateDeliverableTypeId});\r\n }\r\n\r\n if (canSendNotification) {\r\n // retrieve late deliverable ID\r\n result = doQuery(\r\n (lateDeliverableType == LateDeliverableType.MISSED_DEADLINE)\r\n ? SELECT_LATE_DELIVERABLE_ID_WITH_MAX_DEADLINE_SQL\r\n : SELECT_LATE_DELIVERABLE_ID_WITH_REJECTED_FF_SQL, connection,\r\n new Object[] {lateDeliverableTypeId, phaseId, resourceId, deliverableId}, false, Long.class);\r\n\r\n sendEmail(lateDeliverableType, (Long) result[0], lateDeliverable, explanation, createDate);\r\n }\r\n }",
"void timeCheck() throws Exception{\n\t\tif(arrival<time_check)\n\t\tthrow new Exception(\"Arrival time should be non-descending\");\n\t}",
"boolean hasCollectEndTime();",
"Calendar getSubmissionDeadline(ReportingPeriod period, Long transmissionType);",
"public Deadline(String taskDescription) throws DukeException {\n super(taskDescription.split(SPLITTER)[0]);\n String[] details = taskDescription.split(SPLITTER);\n if (details.length != NUM_FIELDS_DESCRIPTION) {\n throw new DukeException(\"Please follow the format of \\\"{task} /by {deadline}\\\"\");\n }\n\n deadline = DateTimeHandler.parseDateTime(taskDescription.split(SPLITTER)[1]);\n }",
"public boolean checkFutureOrCurrentDate()\n {\n boolean valid = this.check();\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n if (date != null\n &&\n (date.before(currentDate)))\n {\n super.clearMessage();\n super.setMessage(\"Date should be in future or in present date!\");\n\n return valid && false;\n }\n return valid;\n\n }",
"private Calendar setAssignmentDeadlineCalendar() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HHmm\");\n Date date = null;\n try {\n date = sdf.parse(assignmentDeadline);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Calendar assignmentDeadlineCalendar = Calendar.getInstance();\n assignmentDeadlineCalendar.setTime(date);\n return assignmentDeadlineCalendar;\n }",
"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}",
"public void sleep(Deadline deadline)\n\t{\n\t\tfinal long millis = Math.min(deadline.getTimeLeft(), getMilliseconds());\n\n\t\tif (millis > 0)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tThread.sleep(millis);\n\t\t\t}\n\t\t\tcatch (InterruptedException e)\n\t\t\t{\n\t\t\t\t// ignore but return\n\t\t\t}\n\t\t}\n\t}",
"public boolean checkPastDate(boolean said)\n {\n try\n {\n if( date==null ){\n if(this.getDateString()!=null) date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n } }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n if(date==null)\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n }\n if(!date.before(currentDate))\n {\n if(said)\n {\n super.setMessage(\"Date is no correct\");\n }\n return false;\n\n }\n else\n {\n return true;\n }\n }",
"private void checkTimeout() {\n/* 169 */ if (this.socket != null) {\n/* */ \n/* 171 */ long i = this.keepaliveTimeoutMs;\n/* */ \n/* 173 */ if (this.listRequests.size() > 0)\n/* */ {\n/* 175 */ i = 5000L;\n/* */ }\n/* */ \n/* 178 */ long j = System.currentTimeMillis();\n/* */ \n/* 180 */ if (j > this.timeLastActivityMs + i)\n/* */ {\n/* 182 */ terminate(new InterruptedException(\"Timeout \" + i));\n/* */ }\n/* */ } \n/* */ }",
"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}",
"OffsetDateTime validUntil();",
"public TaskBookBuilder addTypicalDeadlineTasks() {\n final TypicalDeadlineTasks tdt = new TypicalDeadlineTasks();\n return addDeadlineTasks(tdt.getDeadlineTasks());\n }",
"private void deleteDeadline(final Deadline deadline)\n\t{\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(\"Choose you gmail-account\");\n\n\t\t// cancel button\n\t\tbuilder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener()\n\t\t{\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton)\n\t\t\t{\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\n\t\t// list of accounts\n\t\tfinal ArrayList<String> gUsernameList = MyUtils.getGmailAccounts(this);\n\t\tListView lv = new ListView(this);\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n\t\t\t\tandroid.R.layout.simple_list_item_1, android.R.id.text1, gUsernameList);\n\t\tlv.setAdapter(adapter);\n\t\tbuilder.setView(lv);\n\n\t\t// on click\n\t\tfinal Dialog dialog = builder.create();\n\t\tlv.setOnItemClickListener(new OnItemClickListener()\n\t\t{\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id)\n\t\t\t{\n\t\t\t\t// when one of them clicked delete that deadline\n\t\t\t\tString gmailAddress = gUsernameList.get(position);\n\t\t\t\tconfirmDeleteDeadline(deadline, gmailAddress);\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\n\t\t});\n\n\t\tdialog.show();\n\n\t}",
"static void saveUserDeadline(Context context, Date deadline) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .putLong(USER_DEADLINE_KEY, deadline.getTime())\n .apply();\n }",
"private int sameDateCompare(Deadline other) {\n if (!this.hasTime() && other.hasTime()) {\n return -1;\n } else if (this.hasTime() && !other.hasTime()) {\n return 1;\n } else if (this.hasTime() && other.hasTime()) {\n TimeWrapper thisTimeWrapper = this.getTime();\n TimeWrapper otherTimeWrapper = other.getTime();\n return thisTimeWrapper.compareTo(otherTimeWrapper);\n }\n return 0;\n }",
"private boolean checkDate(PoliceObject po, LocalDate start, LocalDate end) {\n LocalDate formattedEvent = LocalDate.parse(po.getDate());\n boolean isAfter = formattedEvent.isAfter(start) || formattedEvent.isEqual(start);\n boolean isBefore = formattedEvent.isBefore(end) || formattedEvent.isEqual(end);\n return (isAfter && isBefore);\n }",
"public DeadlineCommand(String deadlineDescription) {\n this.deadlineDescription = deadlineDescription;\n }",
"boolean hasEndDate();",
"@Test\n\tvoid testCheckDuration2() {\n\t\tassertFalse(DataChecker.checkDuration(Duration.ofMinutes(-11)));\n\t}",
"public String addDeadline(String name, String due) {\n USER_TASKS.add(new Deadline(name, due));\n return \" \" + USER_TASKS.get(USER_TASKS.size() - 1).toString();\n }",
"public TaskBookBuilder addUnfinishedDeadlineTasks() {\n final Iterable<DeadlineTask> taskList = (new TypicalDeadlineTasks()).getDeadlineTasks();\n final List<DeadlineTask> toAdd = new ArrayList<DeadlineTask>();\n TaskUnfinishedPredicate predicate = new TaskUnfinishedPredicate(referenceDateTime);\n for (DeadlineTask deadlineTask : taskList) {\n if (predicate.test(deadlineTask)) {\n toAdd.add(deadlineTask);\n }\n }\n return addDeadlineTasks(toAdd);\n }",
"@Test\n public void confirmTaskAdded() {\n TaskList tasks = new TaskList(\"./test/junit.txt\");\n LocalDateTime date = LocalDateTime.parse(\"2015-10-20 1800\");\n String taskDescription = \"read a book\";\n tasks.addDeadline(taskDescription, date);\n Task addedTask = tasks.get(0);\n assertEquals(\"[D][ ] read a book by: 2015-10-20 18:00\", addedTask.toString());\n }",
"public Deadline(String desc, String by) throws DukeException {\n super(desc, 'D');\n try {\n this.by = LocalDate.parse(by);\n } catch (DateTimeParseException e) {\n throw new DukeException(\"Deadline should be in the form yyyy-mm-dd\"\n + \"\\ni.e. deadline read book /by 2021-06-18\");\n }\n }",
"public Deadline(String description, LocalDate todoDate) {\n super(description);\n this.todoDate = todoDate;\n }",
"public DeadlineCommand deadlineParse(String desc) throws DukeException {\n if (desc.equals(\"\")) {\n throw new DukeException(MISSING_TASK_DESCRIPTION_MESSAGE);\n }\n try {\n String[] descSplit = desc.split(\"(\\\\s+)/by(\\\\s+)\");\n String dateAndTime = descSplit[1];\n String[] dateAndTimeSplit = dateAndTime.split(\"\\\\s+\");\n String date = dateAndTimeSplit[0];\n String time = dateAndTimeSplit[1];\n return new DeadlineCommand(descSplit[0], date, time);\n } catch (DateTimeParseException | ArrayIndexOutOfBoundsException e) {\n throw new DukeException(INVALID_DEADLINE_FORMAT);\n }\n }",
"public boolean validateDate() {\r\n\t\tDate now = new Date();\r\n\t\t// expire date should be in the future\r\n\t\tif (now.compareTo(getExpireDate()) != -1)\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"boolean isClockFailure();",
"public boolean checkCurrentDate()\n {\n boolean valid = this.check();\n if(!valid) return valid;\n\n try{\n\n date = DateHelper.stringToDate(this.getDateString());\n if(super.isMandatory() && date==null)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n }\n catch (Exception e)\n {\n message = FacesHelper.getBundleMessage(\"validator_dateformat\", new Object[]{Constants.CommonFormat.DATE_FORMAT_TIP});\n return false;\n }\n\n\n if (date != null\n &&\n (date.after(currentDate) || date.equals(currentDate)))\n {\n super.clearMessage();\n super.setMessage(FacesHelper.getBundleMessage(\"date_after_current\"));\n\n return valid && false;\n }\n return valid;\n }",
"Date getEndedOn();"
] | [
"0.79156643",
"0.71527123",
"0.7149217",
"0.69799",
"0.69204617",
"0.6895906",
"0.679417",
"0.6783241",
"0.67691964",
"0.67253804",
"0.65768474",
"0.6574623",
"0.64031655",
"0.6393123",
"0.63919604",
"0.63918096",
"0.63445807",
"0.63226426",
"0.629468",
"0.6292084",
"0.62357974",
"0.6232008",
"0.62318516",
"0.6200725",
"0.61856216",
"0.61825037",
"0.6178342",
"0.6165249",
"0.6082387",
"0.60423255",
"0.60337037",
"0.59984297",
"0.5971449",
"0.59172785",
"0.59157324",
"0.5909637",
"0.58666253",
"0.5863398",
"0.5851058",
"0.5836066",
"0.58341336",
"0.58025336",
"0.5787511",
"0.5780788",
"0.57802427",
"0.57711005",
"0.57711005",
"0.5769126",
"0.57609427",
"0.57516867",
"0.5720942",
"0.5717305",
"0.57060575",
"0.5689582",
"0.5688757",
"0.5683478",
"0.56763184",
"0.5668181",
"0.56598055",
"0.56416196",
"0.5635178",
"0.5620649",
"0.5620367",
"0.55827165",
"0.55350846",
"0.55336833",
"0.5526211",
"0.552553",
"0.5517858",
"0.5513563",
"0.5505148",
"0.54655063",
"0.5434924",
"0.542238",
"0.5408274",
"0.5376881",
"0.53541",
"0.53494895",
"0.5336856",
"0.53281",
"0.53276116",
"0.53268063",
"0.5321419",
"0.5318677",
"0.53138185",
"0.5300492",
"0.53003556",
"0.5289511",
"0.5272952",
"0.5272577",
"0.5270551",
"0.52648467",
"0.5259088",
"0.52527565",
"0.5251455",
"0.524912",
"0.52443194",
"0.5241195",
"0.5241172",
"0.52365214"
] | 0.6170224 | 27 |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.main);
listAccount = (ExpandableListView) findViewById(R.id.listAccount);
// 准备一级列表中显示的数据
accountFather.add("金融帐户");
accountFather.add("虚拟帐户");
accountFather.add("现金帐户");
// accountFather.add("债权帐户");
// accountFather.add("负债帐户");
// 准备第一个一级列表中的二级列表数据:两个二级列表,分别显示"childData1"和"childData2"
List<Map<String, String>> financeAccount = new ArrayList<Map<String, String>>();
Map<String, String> child1Data1 = new HashMap<String, String>();
child1Data1.put(FATHERACCOUNT, "银行卡(CNY)");
child1Data1.put(CHILDACCOUNT, "银行卡");
child1Data1.put(BALANCEACCOUNT, "¥0.00");
financeAccount.add(child1Data1);
// 准备第二个一级列表中的二级列表数据:一个二级列表,显示"child2Data1"
List<Map<String, String>> dummyAccount = new ArrayList<Map<String, String>>();
Map<String, String> child2Data1 = new HashMap<String, String>();
child2Data1.put(FATHERACCOUNT, "饭卡(CNY)");
child2Data1.put(CHILDACCOUNT, "储值卡");
child2Data1.put(BALANCEACCOUNT, "¥0.00");
dummyAccount.add(child2Data1);
Map<String, String> child2Data2 = new HashMap<String, String>();
child2Data2.put(FATHERACCOUNT, "财付通(CNY)");
child2Data2.put(CHILDACCOUNT, "在线支付");
child2Data2.put(BALANCEACCOUNT, "¥0.00");
dummyAccount.add(child2Data2);
Map<String, String> child2Data3 = new HashMap<String, String>();
child2Data3.put(FATHERACCOUNT, "公交卡(CNY)");
child2Data3.put(CHILDACCOUNT, "储值卡");
child2Data3.put(BALANCEACCOUNT, "¥0.00");
dummyAccount.add(child2Data3);
Map<String, String> child2Data4 = new HashMap<String, String>();
child2Data4.put(FATHERACCOUNT, "支付宝(CNY)");
child2Data4.put(CHILDACCOUNT, "在线支付");
child2Data4.put(BALANCEACCOUNT, "¥0.00");
dummyAccount.add(child2Data4);
for(int i=0;i<20;i++){
dummyAccount.add(child2Data4);
}
// 准备第三个一级列表中的二级列表数据:一个二级列表,显示"child2Data1"
List<Map<String, String>> cashAccount = new ArrayList<Map<String, String>>();
Map<String, String> child3Data1 = new HashMap<String, String>();
child3Data1.put(FATHERACCOUNT, "现金(CNY)");
child3Data1.put(CHILDACCOUNT, "现金口袋");
child3Data1.put(BALANCEACCOUNT, "¥0.00");
cashAccount.add(child3Data1);
Map<String, String> child3Data2 = new HashMap<String, String>();
child3Data2.put(FATHERACCOUNT, "其他(CNY)");
child3Data2.put(CHILDACCOUNT, "现金口袋");
child3Data2.put(BALANCEACCOUNT, "¥0.00");
cashAccount.add(child3Data2);
// 准备第四个一级列表中的二级列表数据:一个二级列表,显示"child2Data1"
List<Map<String, String>> creditorAccount = new ArrayList<Map<String, String>>();
Map<String, String> child4Data1 = new HashMap<String, String>();
// 准备第五个一级列表中的二级列表数据:一个二级列表,显示"child2Data1"
List<Map<String, String>> owesAccount = new ArrayList<Map<String, String>>();
Map<String, String> child5Data1 = new HashMap<String, String>();
// 用一个list对象保存所有的二级列表数据
accountChild.add(financeAccount);
accountChild.add(dummyAccount);
accountChild.add(cashAccount);
adapter = new AccountExpandablebaseadapter(ExListView.this,
accountFather, accountChild);
listAccount.setAdapter(adapter);
// 去掉系统自带的按钮
listAccount.setGroupIndicator(null);
// 去掉系统自带的分隔线
listAccount.setDivider(null);
// 展开所有二级列表
/*int groupCount = adapter.getGroupCount();
for (int i = 0; i < groupCount; i++) {
listAccount.expandGroup(i);
}*/
// 监听二级列表
listAccount.setOnChildClickListener(new OnChildClickListener() {
@Override
public boolean onChildClick(ExpandableListView parent, View v,
int groupPosition, int childPosition, long id) {
Toast.makeText(
getBaseContext(),
String.valueOf(groupPosition) + ":"
+ String.valueOf(childPosition),
Toast.LENGTH_SHORT).show();
return false;
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }",
"protected void onCreate() {\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}",
"@Override\n public void onCreate()\n {\n\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n initData();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }",
"@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}",
"protected void onFirstTimeLaunched() {\n }",
"@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }",
"@Override\n public void onCreate() {\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}",
"@Override\n public void onCreate() {\n\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}",
"public void onCreate() {\n }",
"@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}",
"@Override\n\tpublic void onCreate() {\n\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }",
"@Override\n public void onCreate()\n {\n\n\n }",
"@Override\n\tprotected void onCreate() {\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }",
"public void onCreate();",
"public void onCreate();",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }",
"@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}",
"@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }",
"public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }",
"@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }",
"@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}",
"@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }"
] | [
"0.7916766",
"0.7726476",
"0.76927304",
"0.76927304",
"0.76927304",
"0.76927304",
"0.76927304",
"0.76927304",
"0.7636728",
"0.7636728",
"0.76301825",
"0.76183873",
"0.76183873",
"0.75434864",
"0.7539488",
"0.7539488",
"0.75388074",
"0.75266844",
"0.7515058",
"0.7509776",
"0.75009584",
"0.74806815",
"0.74750006",
"0.746968",
"0.746968",
"0.7455429",
"0.743648",
"0.74251956",
"0.7422398",
"0.73932457",
"0.7369626",
"0.7357257",
"0.7357257",
"0.7352177",
"0.73475134",
"0.73475134",
"0.7332972",
"0.7311609",
"0.72666615",
"0.7261256",
"0.72525096",
"0.7241794",
"0.72132593",
"0.71867365",
"0.71828127",
"0.7172716",
"0.71692586",
"0.7166884",
"0.7147528",
"0.7141511",
"0.7133231",
"0.71169025",
"0.70981073",
"0.70975035",
"0.709294",
"0.709294",
"0.70855105",
"0.7075688",
"0.7073852",
"0.707004",
"0.7049229",
"0.7040616",
"0.703661",
"0.70124084",
"0.7005436",
"0.700426",
"0.7003237",
"0.6999698",
"0.69952416",
"0.6990144",
"0.6987758",
"0.6983135",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.698191",
"0.69788194",
"0.6977316",
"0.696678",
"0.6966205",
"0.69646066",
"0.6962298",
"0.69622374",
"0.6961424",
"0.69608384",
"0.69476336",
"0.6939927",
"0.6935818",
"0.6933713",
"0.6927165",
"0.6926508",
"0.6924376"
] | 0.0 | -1 |
Setup 1. Create instance of NaiveBayeClassifier 2. Inject the mock TweetClassificationDAO 3. Call setUpNaiveBayeClassifier | @Override
protected void setUp() throws Exception {
super.setUp();
naiveBayeClassifier = new NaiveBayeClassifierImpl();
tweetClassificationDAO = new MockTweetClassificationDAO();
setupTweetClassificationDAO((MockTweetClassificationDAO)tweetClassificationDAO);
naiveBayeClassifier.setTweetClassificationDAO(tweetClassificationDAO);
naiveBayeClassifier.setUpNaiveBayeClassifier();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test(timeout = 4000)\n public void test30() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n PrincipalComponents principalComponents0 = new PrincipalComponents();\n Capabilities capabilities0 = principalComponents0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // weka.classifiers.bayes.NaiveBayesMultinomialText: Class attribute not set!\n //\n verifyException(\"weka.core.Capabilities\", e);\n }\n }",
"@Before\n public void setUp() {\n this.forecastService = new ForecastAdapter(new Forecast());\n }",
"@Before\r\n public void setUp() throws Exception {\r\n c1 = new LotteryCustomer(1);\r\n }",
"@Before\n\tpublic void setUp() {\n\t\tm=new MoteurRPN();\n\t}",
"@BeforeEach\n void setUp() {\n testBookServiceImpl = new BookServiceImpl(bookRepository, userService, modelMapper);\n }",
"@Before\n\tpublic void setUp() throws Exception {\n//\t\tdao = new MonkeyDao();\n\t}",
"@Before\r\n public void setup() {\r\n dbwMock.userId = \"testUser\";\r\n dbw = new DatabaseWrapper(dbwMock);\r\n\r\n context = ApplicationProvider.getApplicationContext();\r\n\r\n book = new Book();\r\n\r\n requester = new Profile();\r\n }",
"@Test(timeout = 4000)\n public void test66() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n StringKernel stringKernel0 = new StringKernel();\n Capabilities capabilities0 = stringKernel0.getCapabilities();\n naiveBayesMultinomialText0.setLowercaseTokens(true);\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertTrue(naiveBayesMultinomialText0.getLowercaseTokens());\n }",
"@Before\n public void setUp() throws Exception {\n this.trainer = repository.save(TrainerFactory.getTrainer(1,\"Dillyn\",\"Lakey\",\"Boss\"));\n }",
"@Before\n public void setUp() throws Exception\n {\n\n this.repository = ApprovalsRepositoryImplements.getApprovals();\n this.approvals = ApprovalsFactory.getApproval(\"Vehicle Has been Approved for tour\"\n , date, \"Tour around the Peninsula\");\n }",
"protected void setUp() throws Exception {\r\n super.setUp();\r\n processor = new DefaultReviewApplicationProcessor();\r\n // load config\r\n ConfigManager.getInstance().add(\"accuracy/processor_config.xml\");\r\n ConfigurationFileManager manager = new ConfigurationFileManager(ACCURACY_DIR + \"conf.properties\");\r\n config = manager.getConfiguration(\"processor_config\").getChild(\"valid_config1\");\r\n }",
"@Test(timeout = 4000)\n public void test31() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n try { \n naiveBayesMultinomialText0.buildClassifier((Instances) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.Capabilities\", e);\n }\n }",
"@Before\n\tpublic final void setUp() {\n\t\tint numLegs = 4;\n\t\tanimal = new Animal(\"Possum\", \"Mammal\", \"male\", numLegs);\n\t\ttestForest = new Forest(\"Hamner Forest Park\", \"Alpine Forest\", \n\t\t\t\t\"Warm, Mountain-like\");\n\t}",
"@BeforeClass\n public static void setup() {\n // initialize the singleton of parking state\n ParkingState.getInstance();\n }",
"public void trainTest() throws Exception\n\t{\n\t\tSystem.out.println(\"Preprocessing Testset ..\");\n\t\t//String[] dir = new String[]{ Test+\"negative\" , Test+\"positive\"};\n\t\t//FileIterator iterator = new FileIterator(dir,FileIterator.LAST_DIRECTORY);\n\t\tInstanceList instances = new InstanceList(getTextPipe());\n\t\t//instances.addThruPipe(iterator);\n\n\t\tCSVParser parser = new CSVParser(new FileReader(\n\t\t\t\t\"resources/datasets/sentimentanalysis/mallet_test/Sentiment140/sentiment140.csv\"),\n\t\t\t\tCSVFormat.EXCEL.withFirstRecordAsHeader());\n\n\t\tTextPreprocessor preprocessor = new TextPreprocessor(\"resources/datasets/sentimentanalysis/\");\n\t\tint count = 0;\n\t\tfor (CSVRecord record: parser.getRecords())\n\t\t{\n\t\t\tString target;\n\t\t\tif (record.get(\"target\").equals(\"0\"))\n\t\t\t\ttarget = \"negative\";\n\t\t\telse\n\t\t\t\ttarget = \"positive\";\n\t\t\tinstances.addThruPipe(new Instance(preprocessor.getProcessed(record.get(\"tweet\")),target,\n\t\t\t\t\t\"Instance\"+count++,null));\n\n\t\t\tSystem.out.println(count);\n\t\t}\n\n\t\tSystem.out.println(instances.targetLabelDistribution());\n\t\tSystem.out.println(\"Start Training Testset ..\");\n\t\tClassifier nb = new NaiveBayesTrainer().train(instances);\n\t\tSystem.out.println(\"Saving Test Model ..\");\n\t\tsaveModel(nb,Test+\"Model.bin\");\n\t\tsaveinstances(instances,Test+\"Model-Instances.bin\");\n\t\tinstances.getDataAlphabet().dump(new PrintWriter(new File(Test+\"Model-alphabet.dat\")));\n\t}",
"@Before\n public void setupTests()\n {\n Service s1 = new Service();\n s1.setCategory(\"HAIR\");\n\n repository.save(s1);\n\n }",
"protected void setUp() throws Exception {\r\n super.setUp();\r\n target = new JPADigitalRunTrackStatusDAO();\r\n target.setUnitName(\"persistence_unit\");\r\n target.setSessionContext(context);\r\n }",
"@Test(timeout = 4000)\n public void test16() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n try { \n naiveBayesMultinomialText0.updateClassifier((Instance) null, false);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.bayes.NaiveBayesMultinomialText\", e);\n }\n }",
"@Before\n public void setUp(){\n cmTest = new CoffeeMaker();\n\n }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\r\n\t\toCont = new OperatorDAO();\r\n\t}",
"@Override\r\n\tprotected void setUp() throws Exception {\n\t\tsuper.setUp();\r\n\t\timpl=new ProductDAOImpl();\r\n\t}",
"protected void setUp() throws Exception {\r\n comparator = new ComponentCompetitionFulfillmentPredictionPrizeComparator(0.8, 1.2, 10000);\r\n super.setUp();\r\n }",
"@BeforeClass\r\n public static void setUpClass() throws Exception {\n LOG.setLevel(Level.ALL);\r\n tmdb = new TheMovieDbApi(API_KEY);\r\n }",
"@Test(timeout = 4000)\n public void test87() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>();\n Instances instances0 = new Instances(\"\", arrayList0, 4);\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // weka.classifiers.bayes.NaiveBayesMultinomialText: No attributes!\n //\n verifyException(\"weka.core.Capabilities\", e);\n }\n }",
"@BeforeClass\n\tpublic static void setUp() {\n\t\tbestMatching = new LevenshteinDistance();\n\t}",
"@Before\n\tpublic void initialize() {\n\t\tCategory category= new Category();// = SAMPLE_CATEGORY1;\n\t\tcategory.setCategoryName(SAMPLE_CATEGORY1.getCategoryName());\n\t\tcategory.setCompanyReferenceNumber(SAMPLE_COMPANY.getCompanyReferenceNumber());\n\t\tcomServ.saveOrUpdate(SAMPLE_COMPANY);\n\t\tcatServ.saveOrUpdate(category);\n\t\tappServ.saveOrUpdate(SAMPLE_APPLICATION1);\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test17() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n try { \n naiveBayesMultinomialText0.updateClassifier((Instance) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.classifiers.bayes.NaiveBayesMultinomialText\", e);\n }\n }",
"@Before\r\n public void setUp() throws Exception {\r\n super.setUp();\r\n\r\n connection = getConnection();\r\n\r\n configurationObject = TestsHelper.getConfig(TestsHelper.CONFIG_PROJECT_TERMS);\r\n\r\n instance = new ProjectTermsOfUseDaoImpl(configurationObject);\r\n }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n CVParameterSelection cVParameterSelection0 = new CVParameterSelection();\n Capabilities capabilities0 = cVParameterSelection0.getCapabilities();\n TestInstances testInstances0 = TestInstances.forCapabilities(capabilities0);\n Instances instances0 = testInstances0.generate();\n try { \n naiveBayesMultinomialText0.buildClassifier(instances0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // weka.classifiers.bayes.NaiveBayesMultinomialText: Cannot handle relational attributes!\n //\n verifyException(\"weka.core.Capabilities\", e);\n }\n }",
"@Before\n\tpublic void setUp() {\n\t\tgateInfoDatabase = new GateInfoDatabase();\t\t\n\t}",
"@BeforeTest\n public void setUp() {\n UrlaubrWsUtils.migrateDatabase(TravelServiceImpl.DEFAULT_URL, TravelServiceImpl.DEFAULT_USER, TravelServiceImpl.DEFAULT_PASSWORD);\n\n service = new TravelServiceImpl();\n }",
"@Before\n public void setUp()\n {\n m_instance = ConversationRepository.getInstance();\n m_fileSystem = FileSystem.getInstance();\n }",
"@Before\n public void setUp() {\n model = new ImportAttributeModel();\n }",
"@Override\n @Before\n protected void setUp() {\n lexicon = new XMLLexicon();\n this.phraseFactory = new NLGFactory(this.lexicon);\n this.realiser = new Realiser();\n }",
"public void loadTestClassifier() {\n\t\tbinaryTestClassifier = LinearClassifier.readClassifier(BINARY_CLASSIFIER_FILENAME);\n\t\tmultiTestClassifier = LinearClassifier.readClassifier(MULTI_CLASSIFIER_FILENAME);\n\t}",
"public void setup(){\n CassandraDriver driver = CassandraDriver.getInstance();\n ArrayList<byte[]> arr = driver.queryData(\"Forest\", \"tree\");\n\n ArrayList<RealDecisionTree> trees = new ArrayList<RealDecisionTree>();\n for (byte[] b : arr){\n trees.add(deserialize(b));\n }\n RandomForest forest = new RandomForest(trees, \"test\", new String[]{\"min, mav, avg, label\"});\n forest.TestForest(trees, forest.testdata);\n }",
"@BeforeClass\n\tpublic static void setUp() throws Exception {\n\t\tSession session = Preparation.getSessionFactory().openSession();\n\t\tcatDAO = new CategoryHibernateDAO();\n\t\tcatDAO.setSession(session);\n\t}",
"@Before public void setUp() { }",
"@Test(timeout = 4000)\n public void test077() throws Throwable {\n String[] stringArray0 = new String[2];\n stringArray0[1] = \"\";\n Evaluation.main(stringArray0);\n NaiveBayesMultinomial naiveBayesMultinomial0 = new NaiveBayesMultinomial();\n try { \n Evaluation.evaluateModel((Classifier) naiveBayesMultinomial0, stringArray0);\n fail(\"Expecting exception: Exception\");\n \n } catch(Exception e) {\n //\n // \n // Weka exception: No training file and no object input file given.\n // \n // General options:\n // \n // -h or -help\n // \\tOutput help information.\n // -synopsis or -info\n // \\tOutput synopsis for classifier (use in conjunction with -h)\n // -t <name of training file>\n // \\tSets training file.\n // -T <name of test file>\n // \\tSets test file. If missing, a cross-validation will be performed\n // \\ton the training data.\n // -c <class index>\n // \\tSets index of class attribute (default: last).\n // -x <number of folds>\n // \\tSets number of folds for cross-validation (default: 10).\n // -no-cv\n // \\tDo not perform any cross validation.\n // -split-percentage <percentage>\n // \\tSets the percentage for the train/test set split, e.g., 66.\n // -preserve-order\n // \\tPreserves the order in the percentage split.\n // -s <random number seed>\n // \\tSets random number seed for cross-validation or percentage split\n // \\t(default: 1).\n // -m <name of file with cost matrix>\n // \\tSets file with cost matrix.\n // -l <name of input file>\n // \\tSets model input file. In case the filename ends with '.xml',\n // \\ta PMML file is loaded or, if that fails, options are loaded\n // \\tfrom the XML file.\n // -d <name of output file>\n // \\tSets model output file. In case the filename ends with '.xml',\n // \\tonly the options are saved to the XML file, not the model.\n // -v\n // \\tOutputs no statistics for training data.\n // -o\n // \\tOutputs statistics only, not the classifier.\n // -i\n // \\tOutputs detailed information-retrieval statistics for each class.\n // -k\n // \\tOutputs information-theoretic statistics.\n // -classifications \\\"weka.classifiers.evaluation.output.prediction.AbstractOutput + options\\\"\n // \\tUses the specified class for generating the classification output.\n // \\tE.g.: weka.classifiers.evaluation.output.prediction.PlainText\n // -p range\n // \\tOutputs predictions for test instances (or the train instances if\n // \\tno test instances provided and -no-cv is used), along with the \n // \\tattributes in the specified range (and nothing else). \n // \\tUse '-p 0' if no attributes are desired.\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -distribution\n // \\tOutputs the distribution instead of only the prediction\n // \\tin conjunction with the '-p' option (only nominal classes).\n // \\tDeprecated: use \\\"-classifications ...\\\" instead.\n // -r\n // \\tOnly outputs cumulative margin distribution.\n // -xml filename | xml-string\n // \\tRetrieves the options from the XML-data instead of the command line.\n // -threshold-file <file>\n // \\tThe file to save the threshold data to.\n // \\tThe format is determined by the extensions, e.g., '.arff' for ARFF \n // \\tformat or '.csv' for CSV.\n // -threshold-label <label>\n // \\tThe class label to determine the threshold data for\n // \\t(default is the first label)\n // \n // Options specific to weka.classifiers.bayes.NaiveBayesMultinomial:\n // \n // -D\n // \\tIf set, classifier is run in debug mode and\n // \\tmay output additional info to the console\n //\n verifyException(\"weka.classifiers.Evaluation\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test74() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n double[] doubleArray0 = new double[0];\n SparseInstance sparseInstance0 = new SparseInstance(0.0, doubleArray0);\n try { \n naiveBayesMultinomialText0.updateClassifier(sparseInstance0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // DenseInstance doesn't have access to a dataset!\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }",
"@Before\n public void onSetUpBeforeTransaction() throws Exception {\n super.onSetUpBeforeTransaction();\n\n // load up any other needed spring beans\n\n // setup the mock objects if needed\n\n // create and setup the object to be tested\n hierarchyLogicImpl = new ExternalHierarchyLogicImpl();\n hierarchyLogicImpl.setDao(evaluationDao);\n //hierarchyLogicImpl.setHierarchyService(hierarchyService);\n\n }",
"@Before\n public void setUp() {\n fixture = new WordCounter(testMap);\n }",
"@BeforeClass\n public static void setUpClass() throws Exception {\n JeniaTagger.analyzeAll(\"load\", true);\n }",
"@BeforeClass\n\tpublic static void setUpBeforeClass() throws Exception {\n\t\tbpt = new BPTree<Integer, String>(4);\n\t}",
"@Before\n\tpublic void setUp()\n\t\tthrows Exception {\n\t\t\n\t\tbonus = new BonusDTO();\n\t\tbonus.setQuantity(3);\n\t\tbonus.setType(BonusType.POINT);\n\t\t\n\t\t\n\t}",
"@Before\n public void setUp() throws Exception {\n cut = new LightScheduler();\n// spyLedController = new SpyLedController();\n// fakeTimeService = new FakeTimeService();\n }",
"@Before\n\tpublic void setup(){\n\t\taccount = mock(Account.class);\n\t\t\t\t\n\t\taccountDB = mock(AccountRepository.class);\n\t\twhen(accountDB.find(anyString())).thenReturn(account);\n\t\tservice = new LoginService(accountDB);\n\n\t}",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@Before\r\n public void setUp()\r\n {\r\n }",
"@BeforeClass\n\tpublic static void init() {\n\t\ttestProduct = new Product();\n\t\ttestProduct.setPrice(1000);\n\t\ttestProduct.setName(\"Moto 360\");\n\t\ttestProduct.setDescrip(\"Moto 360 smart watch for smart generation.\");\n\n\t\ttestReview = new Review();\n\t\ttestReview.setHeadline(\"Excellent battery life\");\n\t\ttestReview.setContent(\"Moto 360 has an excellent battery life of 10 days per full charge.\");\n\t}",
"@Test(timeout = 4000)\n public void test02() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n TestInstances testInstances0 = new TestInstances();\n Instances instances0 = testInstances0.generate();\n naiveBayesMultinomialText0.m_leplace = (double) (-1);\n naiveBayesMultinomialText0.buildClassifier(instances0);\n assertEquals(0, naiveBayesMultinomialText0.getPeriodicPruning());\n assertEquals(1.0, naiveBayesMultinomialText0.getNorm(), 0.01);\n assertFalse(naiveBayesMultinomialText0.getNormalizeDocLength());\n assertEquals(3.0, naiveBayesMultinomialText0.getMinWordFrequency(), 0.01);\n assertEquals(2.0, naiveBayesMultinomialText0.getLNorm(), 0.01);\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"@Before public void setUp() {\n }",
"public void setUp() throws Throwable {\n\t//The super.setUp() method attemps to talk to nodes\n\t//in the cluster, we should only do this if want to run the test.\n\t//The super.setUp also sets params. If we don't set it, we'll get an \n\t//NPE later\n if (!Run.isTagSetActive(tags)) {\n \t Log.WARN(\"Tag set is not active skipping set up.\");\n params = new StringBuffer(\"\");\n return;\n }\n \tLog.WARN(\"Tag is active, executing set up.\");\n\n super.setUp();\n\n String s = getProperty(HoneycombTestConstants.PROPERTY_BOUNCE);\n if (null != s) {\n try {\n numBounce = Integer.parseInt(s, 10);\n if (numBounce < 1) throw new NumberFormatException(\"less than 1\");\n } catch (NumberFormatException nfe) {\n throw new HoneycombTestException(\"Invalid number of nodes to bounce: \" + s);\n }\n }\n params.append(\" bounce=\" + numBounce);\n\n /* Populate the nodes array to pick bouncing nodes from\n */\n if (nodes.size() == 0) { \n for (int i = 1; i <= numNodes; i++) {\n nodes.add(new Integer(i)); // 1, 2, .., 10, 11, ..\n }\n }\n }",
"@Before\n public void postSetUpPerTest(){\n\n }",
"@Before\n\t public void setUp() {\n\t }",
"@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\tvendMachine = new VendingMachine();\r\n\t}",
"@BeforeClass\n\tpublic static void setUpClass(){\n\t\tserviceLang = new LocatorRemoteEjbServices().getServiceLanguage();\n\t\t\n\t\tuser = new User();\n\t\tserviceUser = new LocatorRemoteEjbServices().getServiceUser();\n\t}",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n NaiveBayesMultinomialText naiveBayesMultinomialText0 = new NaiveBayesMultinomialText();\n NaiveBayesMultinomialText naiveBayesMultinomialText1 = (NaiveBayesMultinomialText)AbstractClassifier.makeCopy(naiveBayesMultinomialText0);\n naiveBayesMultinomialText1.m_wordFrequencies = true;\n boolean boolean0 = naiveBayesMultinomialText1.getUseWordFrequencies();\n assertTrue(naiveBayesMultinomialText1.getUseWordFrequencies());\n assertTrue(boolean0);\n }",
"@Before\n public void setUp() throws Exception {\n }",
"@Before\n public void setUp() throws Exception {\n }",
"@BeforeEach\n public void beforeEach() {\n testBasket = new Basket();\n }",
"protected void setUp() throws Exception {\r\n super.setUp();\r\n this.testedInstances = new AbstractPhaseHandlerSubclass[1];\r\n this.testedInstances[0] = new AbstractPhaseHandlerSubclass(TestDataFactory.NAMESPACE);\r\n }",
"@Before\r\n public void setupTestCases() {\r\n instance = new ShoppingListArray();\r\n }",
"@Before\n public void setUp() throws Exception {\n\n }",
"@Before\n public void setUp () {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp() {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp()\n {\n }",
"@Before\n public void setUp() throws Exception {\n\n }",
"@Before\n public void setUp() {\n }",
"@BeforeClass\r\n\tpublic static void setUpBeforeClass(){\r\n\t\tAFaction = new Faction();\r\n\t}",
"@org.junit.Before\n public void setUp() throws Exception {\n theModel = new Model();\n }",
"protected void setUp() {\r\n auditDetail = new AuditDetail();\r\n }",
"protected void setUp() {\n config = new ContestConfig();\n }"
] | [
"0.6101023",
"0.60444796",
"0.5991821",
"0.59421563",
"0.5922252",
"0.59172106",
"0.5892437",
"0.5885706",
"0.58843195",
"0.5871744",
"0.5855911",
"0.5855526",
"0.5848501",
"0.5846807",
"0.5845828",
"0.5839951",
"0.58364487",
"0.5833437",
"0.58307284",
"0.5823732",
"0.582237",
"0.5818443",
"0.58090043",
"0.58052874",
"0.5792219",
"0.5791949",
"0.5789889",
"0.57754636",
"0.5769645",
"0.5754695",
"0.5747333",
"0.5745487",
"0.5712116",
"0.5698316",
"0.5695609",
"0.569502",
"0.56827486",
"0.5679934",
"0.5673251",
"0.566988",
"0.5665099",
"0.5658852",
"0.56557494",
"0.56455225",
"0.56304395",
"0.5614066",
"0.56093466",
"0.5608699",
"0.5608699",
"0.5608699",
"0.5608699",
"0.5606697",
"0.5605693",
"0.560316",
"0.560316",
"0.560316",
"0.560316",
"0.560316",
"0.55981624",
"0.5593897",
"0.5587405",
"0.55856323",
"0.5580515",
"0.5580122",
"0.5572799",
"0.5572799",
"0.5571808",
"0.5571143",
"0.55702025",
"0.55671465",
"0.556228",
"0.556137",
"0.556137",
"0.556137",
"0.556137",
"0.556137",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.5553532",
"0.55510247",
"0.55496645",
"0.55446744",
"0.55424786",
"0.5537307",
"0.5535828"
] | 0.8493361 | 0 |
Pass in a spam tweet and test that the category for it come out to be spam | public void testSpamCategory(){
TweetStatus tweetStatus = new TweetStatus();
String tweet = "Call us to get the best deal on vacation to rome";
tweetStatus.setTweetText(tweet);
TweetCategoryType tweetCategoryType = naiveBayeClassifier.classify(tweetStatus);
Assert.assertEquals(TweetCategoryType.SPAM, tweetCategoryType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testNotSpamCategory(){\n\t\t\n\t\tTweetStatus tweetStatus = new TweetStatus();\n\t\tString tweet = \"Really having a fun vacation in miami\";\n\t\ttweetStatus.setTweetText(tweet);\n\t\tTweetCategoryType tweetCategoryType = naiveBayeClassifier.classify(tweetStatus);\n\t\t\n\t\tAssert.assertEquals(TweetCategoryType.NOTSPAM, tweetCategoryType);\n\t}",
"protected boolean processTShout(String username, String titles, String message){return false;}",
"protected boolean processCShout(String username, String titles, String message){return false;}",
"public boolean isRetweet() {\n\t\treturn text.trim().startsWith(\"RT @\");\n\t}",
"protected boolean isInvalidTweet(Tweet tweet) {\n\t\tif (tweet.getPublishedTime() < startTime) {\n\t\t\treturn true;\n\t\t}\n\t\tif (tweet.getTerms(preprocessingUtils).size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean handleTShout(String line){\n if (line.indexOf(\"t-shouts: \") == -1)\n return false;\n \n Matcher matcher = TSHOUT_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processTShout(username, titles, message))\n processLine(line);\n\n return true;\n }",
"@Override\n\tpublic void tweet(String message) throws Exception {\n\t\t\n\t}",
"@Test\r\n\tpublic void hidingTest(){\r\n\t\tBlacklisting bl = new Blacklisting();\r\n\t\tConversation c = convoCopy.copy();\r\n\t\t\r\n\t\tList<String> hideWords = new ArrayList<String>();\r\n\t\thideWords.add(\"Hello\");\r\n\t\thideWords.add(\"like\");\r\n\t\thideWords.add(\"pie\");\r\n \t\r\n \t\r\n\t\tConversation hidden = bl.hideWord(c, hideWords);\r\n\r\n\t\tMessage[] redactedmsg = new Message[hidden.getMsg().size()];\r\n\t\thidden.getMsg().toArray(redactedmsg);\r\n\t\t\r\n\t\t\r\n\t\tassertEquals(hidden.getMsg().size(), 7);\r\n\r\n\t\tassertEquals(redactedmsg[0].getContent(), \"*redacted* there!\");\r\n\t\tassertEquals(redactedmsg[2].getContent(), \"I'm good thanks, do you *redacted* *redacted*?\");\r\n\t\tassertEquals(redactedmsg[4].getContent(), \"Hell yes! Are we buying some *redacted*?\");\r\n\t\tassertEquals(redactedmsg[5].getContent(), \"No, just want to know if there's anybody else in the *redacted* society...\");\r\n\t\tassertEquals(redactedmsg[6].getContent(), \"YES! I'm the head *redacted* eater there...\");\r\n\r\n\r\n\t\tSystem.out.println(\"Filtered by user ID: \" + hidden);\r\n\t}",
"private void chooseRandomTweet() {\n if (random.nextBoolean()) {\n realTweet = true;\n displayRandomTrumpTweet();\n } else {\n realTweet = false;\n displayRandomFakeTweet();\n }\n }",
"protected boolean processShout(String username, String titles, String message){return false;}",
"private static boolean isAntonym(String text) {\n return text != null && text.equals(\"ant\");\n }",
"public void testBlogEntryHasTagsAndMediaIsNewsfeed() 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.NEWS_FEED);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n// tags.append(\"<!--<div class=\\\"tags\\\">Tags : \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/automated+unit+testing\\\" rel=\\\"tag\\\">automated unit testing</a>, \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" rel=\\\"tag\\\">junit</a>, \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" rel=\\\"tag\\\">java</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 }",
"public void onTweetSuccess(Tweet tweet);",
"boolean hasSentimentAnalysis();",
"public Tweet(String message){\n this.message = message;\n this.Unique = UUID.randomUUID();\n }",
"public int classify(String tweet){\n\t\t//Each word is classified indenpendtly, whichever one has the most wins. \n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Compute the leading term of category probability:\n\t\tfloat[] catProb = new float[categories.length];\n\t\tint i = 0;\n\t\tfor(int cat : categories){\n\t\t\tcatProb[i] = category_count.get(cat).size()/(float)total_training_size;\n\t\t\ti++;\n\t\t}\n\n\t\t//Compute the number of times a word appears in all categories:\n\t\tHashMap<String, Integer> total_all_classes = new HashMap<String, Integer>();\n\t\tfor(String pt : parsedTweet){\n\t\t\tfor(int cat : categories){\n\t\t\t\tif(!total_all_classes.containsKey(pt)){\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\ttotal_all_classes.put(pt,category_count.get(cat).get(pt));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//What happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//If we've seen the word before:\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\tint additional = total_all_classes.get(pt) + category_count.get(cat).get(pt);\n\t\t\t\t\t\ttotal_all_classes.put(pt, additional);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//I'm skeptical if this will ever be execuated, but what happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Create something to hold the probabilities in\n\t\tfloat[] class_probability = new float[categories.length];\n\t\t//Initalize:\n\t\tfor(int c = 0; c < categories.length; c++){\n\t\t\tclass_probability[c] = 1;\n\t\t}\n\n\t\t//Compute the prodcut of the toals with priors and weights and assumed prob.\n\t\t//product of ( #word appears in all class * (#word appears in class c/#words in class c) )+ weight*assumed probability all divided by weight + #words appeared in all classes\n\t\tfor(int cat : categories){\n\t\t\tfor(String pt : parsedTweet){\n\t\t\t\tif(category_count.get(cat).containsKey(pt) && total_all_classes.containsKey(pt)){ \n\t\t\t\t\t//This is going to be a terribly long expression sadly.\n\t\t\t\t\tclass_probability[cat] *= ((total_all_classes.get(pt)*(category_count.get(cat).get(pt)/(float)category_count.get(cat).size())) + weight*assumed_prob)/(float)(weight + total_all_classes.get(pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Multiply the whole term by the leading term of catProb:\n\t\tfor(int cat : categories){\n\t\t\tclass_probability[cat] = catProb[cat]*class_probability[cat];\n\t\t}\n\n\t\t//Figure out which class/category is the highest and return the best fitting one.\n\t\tint bestFit = CAT_SAFE; //If can't figure, return that its SAFE? Dunno if this is the best choice\n\t\tfloat bestProb = -1;\n\t\tfor(int cat : categories){\n\t\t\tif(class_probability[cat] > bestProb){\n\t\t\t\tbestFit = cat;\n\t\t\t}\n\t\t\tSystem.out.println(class_probability[cat]);\n\t\t}\n\t\tSystem.out.println(bestProb < threshold);\n\t\tif(bestProb < threshold){\n\t\t\tbestFit = DEFAULT_CATEGORY;\n\t\t}\n\n\n\n\t\treturn bestFit;\n\n\t}",
"private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }",
"private void validatePostTweet(Tweet tweet) {\n //check if the length exceeds 140 characters\n if (tweet.getText().length() > 140) {\n throw new IllegalArgumentException(\"Tweet is too long\");\n }\n\n //check if lon/lst is within range\n Double lon = tweet.getCooridinates().getCoordinates().get(0);\n Double lat = tweet.getCooridinates().getCoordinates().get(1);\n if (lon > 180 || lon < -180 || lat > 90 || lat <-90) {\n throw new IllegalArgumentException(\"Coordinates out of range\");\n }\n\n return;\n }",
"private boolean handleCShout(String line){\n if (line.indexOf(\"c-shouts: \") == -1)\n return false;\n \n Matcher matcher = CSHOUT_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processCShout(username, titles, message))\n processLine(line);\n\n return true;\n }",
"public void postTweet(int userId, int tweetId) {\n\n }",
"void addOneToOneSpamMessage(ChatMessage msg);",
"private void _tweetShare(Activity act, String title, String description)\n {\n try {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.setPackage(\"com.twitter.android\");\n shareIntent.putExtra(Intent.EXTRA_TITLE, title);\n shareIntent.putExtra(Intent.EXTRA_TEXT, description);\n act.startActivity(shareIntent);\n } catch (ActivityNotFoundException ex) {\n String tweetUrl = StringUtils.join(\" \",\"https://twitter.com/intent/tweet?text=\", title, description);\n Uri uri = Uri.parse(tweetUrl);\n act.startActivity(new Intent(Intent.ACTION_VIEW, uri));\n }\n }",
"private void sendToCatLit()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Literary'\", Toast.LENGTH_SHORT).show();\n }",
"public void feedCat(){\n this.isHungry = false;\n this.isHappy = false;\n }",
"public boolean spam() {\n\t\tsynchronized (this) {\n\t\t\tif (!canUse() || !start())\n\t\t\t\treturn false;\n\t\t\tfinal TimedCondition tc = new TimedCondition(1000) {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean isDone() {\n\t\t\t\t\treturn !canUse() || BarNode.this.isDone();\n\t\t\t\t}\n\t\t\t};\n\t\t\tdo {\n\t\t\t\tsend();\n\t\t\t\tTask.sleep(300, 400);\n\t\t\t} while (tc.isRunning());\n\t\t\treturn tc.isDone();\n\t\t}\n\t}",
"public static boolean sendTweet(String tweet) {\n \t\tif (!isEnabled) {\n \t\t\tlogger.debug(\"Twitter client is disabled > execution aborted!\");\n \t\t\treturn false;\n \t\t}\n \n \t\ttry {\n \t\t\tStatus status = client.updateStatus(tweet);\n\t\t\tlogger.debug(\"Successfully sent Tweet '{}'\", status.getText());\n \t\t\treturn true;\n \t\t} catch (TwitterException e) {\n \t\t\tlogger.error(\"Failed to send Tweet '\" + tweet + \"' because of: \" + e.getLocalizedMessage());\n \t\t\treturn false;\n \t\t}\n \t}",
"private void sendToCatFilm()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Film'\", Toast.LENGTH_SHORT).show();\n }",
"private void sendToCatDance()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Dance'\", Toast.LENGTH_SHORT).show();\n }",
"private String proceesTweetText(String tweetText) {\n // remove new lines\n tweetText = tweetText.replace(\"\\n\",\"\").replace(\"\\r\",\"\");\n // remove urls \"https://...\":\n tweetText = tweetText.replaceAll(\"https?://\\\\S+\\\\s?\", \"\");\n // remove users \"@...\":\n tweetText = tweetText.replaceAll(\"@\\\\S+\\\\s?\", \"\");\n return tweetText;\n }",
"public void tweet() {\r\n try {\r\n\r\n String twet = JOptionPane.showInputDialog(\"Tweett:\");\r\n Status status = twitter.updateStatus(twet);\r\n System.out.println(\"Successfully updated the status to [\" + status.getText() + \"].\");\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tif(!loggedIn){\n\t\t\t\t\tLog.d(\"POST FAILED\",\"NOT LOGGED IN\");\n\t\t\t\t}\n\t\t\t\tTweet tweet = new Tweet(text);\n\t\t\t\tTweetER ter = TweetER.getInstance(accntMgr);\n\t\t\t\ttry {\n\t\t\t\t\ttweet = ter.post(tweet);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (LimitExceededException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"public void setTweetMessage( String _strTweetMessage )\n {\n this._strTweetMessage = _strTweetMessage;\n }",
"protected boolean processAnnouncement(String username, String message){return false;}",
"public TweetCorrected() {}",
"public boolean isSentiment (String lemma){\n boolean sentimentPresent = false;\n \n sentimentPresent = this.keys.contains(lemma);\n\n return sentimentPresent;\n }",
"public Tweet(String message){\n this.message = message;\n this.date = new Date();\n }",
"EmailClass findClass(Email email,boolean noStopWordsRemoval) {\n //email.preprocessEmail(trainingData.stopwords,noStopWordsRemoval);\n double hamProbability = 0;\n double spamProbability = 0;\n\n for (String s : email.processedMessage.keySet()) {\n long n = email.processedMessage.get(s);\n long hc, sc;\n if (words.containsKey(s)) {\n LexiconCount lcTemp = words.get(s);\n hc = lcTemp.numberOfOccurencesInHamDocuments;\n sc = lcTemp.numberOfOccurencesInSpamDocuments;\n } else {\n hc = 0;\n sc = 0;\n }\n double cProbabilityForHam = (hc + 1) / (double) (totalNumberOfWordsInHamDocuments + words.size());\n cProbabilityForHam = Math.pow(cProbabilityForHam, n);\n hamProbability += (Math.log(cProbabilityForHam)) / Math.log(2);\n\n double cProbabilityForSpam = (sc + 1) / (double) (totalNumberOfWordsInSpamDocuments + words.size());\n cProbabilityForSpam = Math.pow(cProbabilityForSpam, n);\n spamProbability += (Math.log(cProbabilityForSpam)) / Math.log(2);\n }\n double priorProbabilityForHam = trainingData.numberOfHamDocuments / (double) (trainingData.numberOfHamDocuments + trainingData.numberOfSpamDocuments);\n hamProbability += (Math.log(priorProbabilityForHam)) / Math.log(2);\n\n double priorProbabilityForSpam = trainingData.numberOfSpamDocuments / (double) (trainingData.numberOfHamDocuments + trainingData.numberOfSpamDocuments);\n spamProbability += (Math.log(priorProbabilityForSpam)) / Math.log(2);\n if (hamProbability > spamProbability) {\n return EmailClass.ham;\n } else {\n return EmailClass.spam;\n }\n }",
"public void addTweet (Tweet tweet) throws IllegalArgumentException{\n tweets.add(tweet);\n\n }",
"public static Set<String> getMentionedUsers(List<Tweet> tweets) {\n\n// throw new RuntimeException(\"not implemented\");\n Set<String> anSet = new HashSet<>();\n Pattern pattern=Pattern.compile(\"@[a-zA-Z]{1,}\");\n Matcher matcher=pattern.matcher(tweets.get(0).getText());\n\n return anSet;\n }",
"boolean containsUtilize(String word)\n {\n return word.contains(\"utilize\");\n }",
"@Override\r\n\tpublic void execute(Tuple input) {\n\t\tString author = input.getStringByField(\"author\");\r\n\t\tString text = input.getStringByField(\"text\");\r\n\t\tLong retweetCount = input.getLongByField(\"retweetCount\");\r\n\t\tString hashtag = input.getStringByField(\"hashtag\");\r\n//\t\tString[] tags = (String[]) input.getValueByField(\"hashtagEntities\");\r\n\t\t\r\n\t\tString[] tags = readHastagFilters();\r\n\t\t\r\n\t\t\t\r\n\t\t\tif (checkifExistsTag(hashtag , tags)) { \r\n\t\t\t\tlogger.info(\"@\" + author + \" got \" + String.valueOf(retweetCount) + \" retweets for : \" + text + \" hashtag : \" + hashtag);\r\n\t\t\t} else { \r\n\t\t\t\tlogger.info(\"@\" + author + \" got \" + String.valueOf(retweetCount) + \" retweets for : \" + text + \" ***Do not show on hashtags*** \");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\tcollector.ack(input);\r\n\t}",
"void makeTweet(OnTweetPostListener onTweetPostListener);",
"@Test\n public void hetTweetTest() throws Exception {\n Context appContext = InstrumentationRegistry.getTargetContext();\n String tweetStr = AssetsUtils.ReadAssetTxtContent(appContext, Constants.ASSET_TWEETS_PATH);\n\n OkHttpClient client=new OkHttpClient();\n Request request = new Request.Builder().url(Constants.TWEETS_URL).build();\n String tweetRequestStr=\"\";\n try(Response response=client.newCall(request).execute()){\n tweetRequestStr=response.body().string();\n }\n assertEquals(tweetStr,tweetRequestStr);\n }",
"void test(String hamEmailsDirectoryPath, String spamEmailsDirectoryPath,boolean noStopWordsRemoval) throws IOException {\n hashLexicons();\n //String hamEmailsDirectoryPath = \"C:\\\\Users\\\\Praveen\\\\OneDrive\\\\Spring 2016\\\\Machine_Learning\\\\Assignment\\\\2\\\\test\\\\ham\";\n findTruePositive(hamEmailsDirectoryPath, EmailClass.ham,noStopWordsRemoval);\n findTruePositive(spamEmailsDirectoryPath, EmailClass.spam,noStopWordsRemoval);\n //System.out.println(\"The accuracy in classifying the ham emails using Naive Bayes classifier is \"+d*100);\n //String spamEmailsDirectoryPath = \"C:\\\\Users\\\\Praveen\\\\OneDrive\\\\Spring 2016\\\\Machine_Learning\\\\Assignment\\\\2\\\\test\\\\spam\";\n //System.out.println(\"The accuracy in classifying the spam emails using Naive Bayes classifier is \"+findAccuracy(spamEmailsDirectoryPath, EmailClass.spam,noStopWordsRemoval)*100);\n System.out.println(\"Accuracy of email clasification using Naive Bayes Algorithm is: \" + (truePositive / (double) testSamples)*100);\n }",
"public static void checkHonorific(Token t) {\r\n\t\tIterator<String> it = WordLists.honorifics().iterator();\r\n\t\t\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tString honorific = it.next();\r\n\t\t\t\r\n\t\t\tif(t.getName().equalsIgnoreCase(honorific)) {\r\n\t\t\t\tt.getFeatures().setHonorific(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"boolean hasCampaignFeed();",
"private String filterText(Player player, String txt)\r\n/* */ {\r\n/* 76 */ if (this.settings.enabled)\r\n/* */ {\r\n/* 78 */ Chatter chatter = ChatterHandler.getChatter(player.getUniqueId());\r\n/* 79 */ String filteredTxt = this.plugin.getFilterHandler().execute(player, txt);\r\n/* */ \r\n/* 81 */ if (filteredTxt != null)\r\n/* */ {\r\n/* */ \r\n/* 84 */ chatter.addMessage(new ChatMessage(filteredTxt));\r\n/* */ \r\n/* 86 */ return filteredTxt;\r\n/* */ }\r\n/* */ \r\n/* 89 */ return null;\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* 93 */ return txt;\r\n/* */ }",
"private void isGreeting(String userMessage) {\n String message = userMessage.toLowerCase();\n List<String> greetings = additionalDB.get(\"greeting\");\n for (String str : greetings) {\n if (message.contains(str)) {\n responsesList.clear();\n responsesList.add(new Response(getRandomElementFromList(greetings)));\n }\n }\n }",
"public TweetCorrected(String text) {\n super(text);\n }",
"@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n HttpSession session = request.getSession();\r\n \r\n String action = request.getParameter(\"action\");\r\n User user = (User) session.getAttribute(\"user\");\r\n\r\n String url = \"/home.jsp\";\r\n \r\n if(action.equals(\"post_tweet\")) {\r\n String composerEmail = user.getemail();\r\n String message = request.getParameter(\"user_tweet\");\r\n ArrayList<String> mentions = null; //ArrayList used if more than one user is mentioned. \r\n UserMention userMention = new UserMention();\r\n HashTag hash = new HashTag();\r\n ArrayList<String> hashTags = null; //Arraylist used if more than one hashtag is used\r\n \r\n //find usernames that are mentioned. Returned values are the email addresses of usernames.\r\n mentions = findMentions(message);\r\n //find hashtags that are used.\r\n hashTags = findHashTags(message);\r\n //build tweet object\r\n Tweet tweet = new Tweet();\r\n tweet.setcomposerEmail(composerEmail);\r\n tweet.setMessage(message);\r\n \r\n //set boolean value mentions\r\n if(!mentions.isEmpty())\r\n tweet.setMentions(true);\r\n \r\n if(!hashTags.isEmpty())\r\n tweet.sethashTags(true);\r\n \r\n try {\r\n TweetDB.insert(tweet);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n ArrayList<UserTweetInfo> tweets;\r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n \r\n //If mentions, insert userMention with user tweetID\r\n if(!mentions.isEmpty()){\r\n int tweetid = tweets.get(0).gettweetid();\r\n userMention.setemailAddress(email);\r\n userMention.settweetid(tweetid);\r\n for(int i = 0; i < mentions.size(); i++)\r\n {\r\n userMention.setuserMentionedEmail(mentions.get(i));\r\n \r\n try {\r\n UserMentionDB.insert(userMention);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n }\r\n //if hashTags, check for new hashtag or update\r\n if(!hashTags.isEmpty()){\r\n ArrayList<HashTag> allHashTags;\r\n allHashTags = HashTagDB.getHashTags();\r\n boolean found = false;\r\n int tweetid = tweets.get(0).gettweetid();\r\n TweetHashTag tweethash = new TweetHashTag();\r\n\r\n //if hashtag DB not empty, otherwise insert as new\r\n if(!allHashTags.isEmpty()) {\r\n for(int i = 0; i < hashTags.size(); i++) {\r\n for(int j = 0; j < allHashTags.size(); j++) {\r\n //update hashtag count in DB \r\n if(hashTags.get(i).equals(allHashTags.get(j).gethashText())) {\r\n found = true;\r\n int count = allHashTags.get(j).gethashCount();\r\n int id = allHashTags.get(j).getid();\r\n count += 1;\r\n hash.setid(id);\r\n hash.sethashCount(count);\r\n HashTagDB.update(hash);\r\n \r\n //associate hashtagID with tweetID\r\n tweethash.settweetid(tweetid);\r\n tweethash.sethashid(id);\r\n try {\r\n TweetHashTagDB.insert(tweethash);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n } \r\n }\r\n //insert new hashtag\r\n if(!found) {\r\n hash.sethashText(hashTags.get(i));\r\n hash.sethashCount(1);\r\n try {\r\n HashTagDB.insert(hash);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //Get HashTagID from DB and associate hashID with TweetID\r\n HashTag addedHashTag = new HashTag();\r\n addedHashTag = HashTagDB.searchByHashText(hashTags.get(i));\r\n tweethash.sethashid(addedHashTag.getid());\r\n tweethash.settweetid(tweetid);\r\n try {\r\n TweetHashTagDB.insert(tweethash);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n found=false; \r\n }\r\n }else{\r\n for(int i = 0; i < hashTags.size(); i++) {\r\n hash.sethashText(hashTags.get(i));\r\n hash.sethashCount(1);\r\n try {\r\n HashTagDB.insert(hash);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n HashTag addedHashTag = new HashTag();\r\n //getHashTagID from DB and associate hashID with tweetID in TweetHashTagDB\r\n addedHashTag = HashTagDB.searchByHashText(hashTags.get(i));\r\n tweethash.sethashid(addedHashTag.getid());\r\n tweethash.settweetid(tweetid);\r\n try {\r\n TweetHashTagDB.insert(tweethash);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n }\r\n \r\n }\r\n ArrayList<HashTag> top10Hash;\r\n top10Hash = HashTagDB.top10HashTags();\r\n session.setAttribute(\"trends\", top10Hash);\r\n session.setAttribute(\"tweets\", tweets);\r\n }\r\n if(action.equals(\"delete_tweet\")){\r\n // Get the id of this tweet from the request\r\n String tweetID = request.getParameter(\"tweetID\");\r\n ArrayList<UserTweetInfo> tweets;\r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n boolean mentions = false;\r\n boolean hashTags = false;\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n ArrayList<TweetHashTag> tweetHash;\r\n \r\n //check for user mentions and hashtags\r\n for(int i = 0; i < tweets.size(); i++) {\r\n if(tweets.get(i).gettweetid() == Integer.parseInt(tweetID)) {\r\n if(tweets.get(i).getmentions() != null)\r\n mentions = true;\r\n if(tweets.get(i).gethashtags() != null)\r\n hashTags = true;\r\n }\r\n }\r\n //if there are user mentions, delete mentions\r\n if(mentions){\r\n try {\r\n UserMentionDB.delete(tweetID);\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }\r\n //if there are hashtags, delete hashtag or decrement current hashtag\r\n if(hashTags){\r\n HashTag hash = new HashTag();\r\n int count = 1;\r\n tweetHash = TweetHashTagDB.selectHashTagIDsByTweet(Integer.parseInt(tweetID));\r\n\r\n for(int i = 0; i < tweetHash.size(); i++)\r\n {\r\n hash = HashTagDB.searchByHashID(tweetHash.get(i).gethashid());\r\n //if count is 1, then hashtag is deleted from DB\r\n if(hash.gethashCount() == 1)\r\n {\r\n try {\r\n HashTagDB.delete(hash.getid());\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n }else{\r\n //decrement hashCount by 1\r\n int hashCount = hash.gethashCount();\r\n hashCount -= count;\r\n hash.sethashCount(count);\r\n HashTagDB.update(hash);\r\n }\r\n }\r\n //delete TweetID/HashtagID association in DB\r\n try {\r\n TweetHashTagDB.delete(Integer.parseInt(tweetID));\r\n }catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE,null,ex);\r\n }\r\n //update top 10 hashtags \r\n ArrayList<HashTag> top10Hash;\r\n top10Hash = HashTagDB.top10HashTags();\r\n session.setAttribute(\"trends\", top10Hash);\r\n }\r\n try {\r\n TweetDB.delete(tweetID);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n tweets.clear(); //clear tweets array to update\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n session.setAttribute(\"tweets\", tweets);\r\n \r\n }\r\n if(action.equals(\"follow_user\"))\r\n {\r\n int userID = user.getid(); //get session user ID\r\n String followedUserID = request.getParameter(\"followedUserID\"); \r\n UserFollow follow = new UserFollow();\r\n \r\n //set Follow object\r\n follow.setuserID(userID);\r\n follow.setfollowedUserID(Integer.parseInt(followedUserID));\r\n \r\n //insert Follow object into DB\r\n try {\r\n FollowDB.insert(follow);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n //Pull follows for user and set session attribute\r\n ArrayList<UserFollow> follows;\r\n ArrayList<UserTweetInfo> tweets;\r\n int numFollowing = 0;\r\n\r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n \r\n follows = FollowDB.selectFollowsByUser(userID);\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n numFollowing = TweetDB.numberOfFollowing(email);\r\n\r\n session.setAttribute(\"tweets\", tweets);\r\n session.setAttribute(\"userFollows\", follows);\r\n session.setAttribute(\"numberOfFollowing\", numFollowing);\r\n }\r\n if(action.equals(\"unfollow_user\"))\r\n {\r\n int userID = user.getid();\r\n String followedUserID = request.getParameter(\"followedUserID\");\r\n UserFollow follow = new UserFollow();\r\n \r\n //set Follow object\r\n follow.setuserID(userID);\r\n follow.setfollowedUserID(Integer.parseInt(followedUserID));\r\n \r\n //Delete follow from DB\r\n try {\r\n FollowDB.delete(follow);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (Exception ex) {\r\n Logger.getLogger(tweetServlet.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //update session with new follow list for user\r\n ArrayList<UserFollow> follows;\r\n ArrayList<UserTweetInfo> tweets;\r\n int numFollowing = 0;\r\n \r\n user = (User) session.getAttribute(\"user\");\r\n String email = user.getemail();\r\n \r\n follows = FollowDB.selectFollowsByUser(userID);\r\n tweets = TweetDB.selectTweetsByUser(email);\r\n numFollowing = TweetDB.numberOfFollowing(email);\r\n \r\n session.setAttribute(\"tweets\", tweets);\r\n session.setAttribute(\"userFollows\", follows);\r\n session.setAttribute(\"numberOfFollowing\", numFollowing);\r\n \r\n }\r\n \r\n int numberOfTweets = TweetDB.numberOfUserTweets(user);\r\n session.setAttribute(\"numberOfTweets\", numberOfTweets);\r\n getServletContext()\r\n .getRequestDispatcher(url)\r\n .forward(request, response);\r\n }",
"boolean hasIsHotwordTriggered();",
"@Override\r\n public void onPrivmsg(User user, Channel channel, String message) {\r\n if (channel == null || !channel.getName().equals(\"#it06\")) {\r\n return;\r\n }\r\n for (String s : message.split(\" \")) {\r\n /* check if the message contains a username, if so: change the message */\r\n /* to something in the blacklist */\r\n for (User u : channel.getUsers().keySet()) {\r\n if (s.contains(u.getNickname())) {\r\n s = \"hej\";\r\n }\r\n }\r\n \r\n /* if the message is in the blacklist, go to the next one */\r\n if (blackList.contains(s)) {\r\n continue;\r\n }\r\n \r\n /* do we have this word in our \"vocabulary\" (old), else we check google */\r\n String t;\r\n if (old.containsKey(s)) {\r\n t = old.get(s);\r\n } else {\r\n t = getSuggestion(s);\r\n }\r\n old.put(s, t);\r\n \r\n /* if we have found a suggestion, print it to the channel */\r\n if (t != null) {\r\n channel.sendPrivmsg(t);\r\n }\r\n }\r\n }",
"private static void banFeature(ArrayList t) {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\t\tSystem.out.print(\"Word cut : [\");\n\t\tint idx = 0;\n\t\twhile (i.hasNext()) {\n\t\t\tString s = (String) i.next();\n\t\t\tInteger df = (Integer) Utility.vocabHM.get(s);\n\n\t\t\tif (t.contains(s)){\n\t\t\t\tSystem.out.print(s+\", \");\n\t\t\t\ti.remove();\n\t\t\t\tidx++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"]\\n ::banned::\"+idx+\" feature.\");\n\t}",
"@Override\n\tpublic void expectTwitterMessage(String username) {\n\t}",
"private void detectQuestionType(String userMessage) {\n String firstWord = firstWord(userMessage).toLowerCase();\n List<String> answer;\n if (firstWord.equals(\"where\")) {\n answer = additionalDB.get(\"where\");\n } else if (firstWord.equals(\"when\")) {\n answer = additionalDB.get(\"when\");\n }else {\n \tanswer = additionalDB.get(\"ques\");\n }\n responsesList.add(new Response(getRandomElementFromList(answer)));\n }",
"private void VerifyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_VerifyButtonActionPerformed\n\n String email = textArea.getText();\n Pattern pattern = Pattern.compile(\"As seen on|\"\n + \"Buy|Meet singles|Extra income|Million dollars|Save big money|\"\n + \"Opportunity|Cash|No fees|Online degree|Work at home|Additional income|\"\n + \"Eliminate debt|Lower interest rate|Pre-approved|Consolidate your debt|\"\n + \"Avoid bankruptcy|Miracle|Satisfaction|Risk free|Free hosting|\"\n + \"You have been selected|Weekend getaway|You're a Winner!|Offer|\"\n + \"Unlimited|No obligation|Trial|Guarantee|No purchase necessary\");\n Matcher matcher = pattern.matcher(email);\n\n //Count all instances using matcher.find()\n int count = 0;\n while (matcher.find()) {\n count++;\n }\n\n //Message Dialog pop-up\n JOptionPane.showMessageDialog(null, \"The spam score for this massage is:\" + count, null, JOptionPane.INFORMATION_MESSAGE);\n\n //System.out.println(count);// For debug only\n }",
"public boolean IsSpam(File testFile) throws FileNotFoundException {\n List<String> words = readFile(testFile);\n List<Integer> wordCount = new ArrayList<>();\n int index;\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 //Calculate wordCount for the testFile\n for (String eachWord : words) {\n if (this.vocabularyList.contains(eachWord)) {\n index = this.vocabularyList.indexOf(eachWord);\n wordCount.set(index, wordCount.get(index) + 1);\n }\n }\n\n //Calculate the value of perceptron function O\n return getVavlueOfO(wordCount) > 0;\n }",
"public void tweet() {\n ReusableActionsPageObjects.clickOnElement(driver, tweet, logger, \"tweet.\");\n }",
"public static boolean canCast(Thing b,Thing s) {\r\n \t\tif (s.place!=b) {\r\n \t\t\tGame.warn(\"Spell.canCast: spell not in inventory!\");\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n \t\tString order=s.getString(\"Order\");\r\n \t\tif (order.equals(Skill.BLACKMAGIC)) {\r\n \t\t\tint cost=s.getStat(\"SpellCost\");\r\n \t\t\tif (b.getStat(RPG.ST_MPS)<cost) return false;\r\n \t\t\tint us=Recipe.checkIngredients(b,s.getString(\"Ingredients\"));\t\r\n \t\t\treturn (us>0);\r\n \t\t} \r\n \t\t\r\n \t\tint c=s.getStat(\"Charges\");\r\n \t\treturn (c>0);\r\n \r\n \t}",
"public boolean tweet(Integer empId, String tweet) {\n\t\treturn tweetDAO.tweet(empId, tweet);\n\t}",
"public boolean killed(Mention mention);",
"public CompletableFuture<String> analyzeSentiment(List<Details> sentimentData) {\n\n CompletableFuture<String> sentiment=null;\n CompletableFuture<List<Details>> happyTweets=null;\n\n int count=0;\n happyTweets = CompletableFuture.supplyAsync(() -> sentimentData.stream()\n .filter(d -> d.text.contains(\":-)\"))\n .collect(Collectors.toList()));\n\n CompletableFuture<List<Details>> sadTweets = CompletableFuture.supplyAsync(() -> sentimentData.stream()\n .filter(d -> d.text.contains(\":-(\"))\n .collect(Collectors.toList()));\n\n sentiment = happyTweets.thenCombine(sadTweets, (happyFilter, sadFilter) -> {\n if (happyFilter.size() / sentimentData.size() >= 0.7)\n return \":-)\";\n else if (sadFilter.size() / sentimentData.size() >= 0.7)\n return \":-(\";\n else\n return \":-|\";\n });\n\n return sentiment;\n }",
"public static int getSentiment(Ticket T){\n\t\tint sentimentScore=0;\r\n\t\tTranscript Trans=new Transcript();\r\n\t\tint positive=0;\r\n\t\tint negative=0;\r\n\t\t//System.out.println(\"Entering Sentiment Score Calculator\");\r\n\t\t//System.out.println(\"WordList Size\"+T.Trans.wordList.size()+\"\\n\");\r\n\t\tfor(int i =0;i <T.Trans.wordList.size();i++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tfor(int j =0;j< Trans.positiveLexicons.length;j++){\r\n\t\t\t\tif(T.Trans.wordList.get(i)==Trans.positiveLexicons[j]){\r\n\t\t\t\t\tpositive++;\r\n\t\t\t\t\tSystem.out.println(T.Trans.wordList.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int k=0;k < Trans.negativeLexicons.length;k++){\r\n\t\t\t\tif(T.Trans.wordList.get(i)==Trans.negativeLexicons[k]){\r\n\t\t\t\t\tnegative++;\r\n\t\t\t\t\tSystem.out.println(T.Trans.wordList.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(positive > negative){ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Assigning sentimentScore according to the number of positive and negative lexicons.\r\n\t\t\tsentimentScore=3;\r\n\t\t}\r\n\r\n\t\telse if(positive < negative){\r\n\t\t\tsentimentScore=1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tsentimentScore=2;\r\n\t\t}\r\n\t\treturn sentimentScore;\r\n\t}",
"private void expectTweetsIgnored() {\n tweetDAO.save(anyObject());\n }",
"protected boolean processWhisper(String username, String titles, int rating, int gameNumber, String message){return false;}",
"protected boolean processPersonalTell(String username, String titles, String message){return false;}",
"public int searchTweetsNaive(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchNaive(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n }",
"public int searchTweetsBoyerMoore(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchBoyerMoore(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n\n }",
"private boolean handleShout(String line){\n if (line.indexOf(\"shouts: \") == -1)\n return false;\n \n Matcher matcher = SHOUT_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processShout(username, titles, message))\n processLine(line);\n\n return true;\n }",
"@ApiModelProperty(value = \"Count of emails classified as spam\")\r\n public Integer getSpamCount() {\r\n return spamCount;\r\n }",
"List<String> searchTweets(String keywords) throws TwitterException;",
"@Override\n public void actionPerformed(ActionEvent e) {\n if ((accounts.size() == 0) || (jTextAreaTweets.getText() == null || jTextAreaTweets.getText().length() == 0)) {\n int mc = JOptionPane.WARNING_MESSAGE;\n JOptionPane.showMessageDialog(null, \"Add an account/tweet/mention to tweet!!\", \"Attention!!\", mc);\n } else {\n String ids = jTextAreaId.getText();\n String lines[] = ids.split(\"\\\\r?\\\\n\");\n if (lines.length > 0) {\n for (String str : lines) {\n if (str != null && str.length() > 0) {\n tagIDList.add(str);\n }\n }\n } else {\n }\n if (tagIDList.size() > 0) {\n\n for (String mention : tagIDList) {\n for (String tweet : tweetList) {\n String tempTweet = tweet + \" \" + mention;\n mentionStack.push(tempTweet);\n }\n }\n\n } else {\n for (String tweet : tweetList) {\n String tempTweet = tweet;\n mentionStack.push(tempTweet);\n }\n }\n ArrayList<Thread> threads = new ArrayList<Thread>();\n long timeIntervalNumber = 1000 * 60;\n long timeIntervalNumberMax = 1000 *60*3;\n try {\n timeIntervalNumber = Long.parseLong(timeIntervalInput.getText()) * 1000;\n if (timeIntervalNumber < 60000)\n timeIntervalNumber = 1000 * 60;\n\n\n } catch (Exception e1) {\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n try{\n timeIntervalNumberMax = Long.parseLong(timeIntervalInputMax.getText()) * 1000;\n if (timeIntervalNumberMax < 60000)\n timeIntervalNumberMax = 1000 * 60;\n }catch(Exception ex){\n ex.printStackTrace();\n }\n if(timeIntervalInput==timeIntervalInputMax)\n timeIntervalNumberMax+=30;\n for (Account account : accounts) {\n\n TweeterThread tweeterThread = new TweeterThread(mentionStack,\n account, accountDispName,\n statusDisplay, timeIntervalNumber<timeIntervalNumberMax?timeIntervalNumber:timeIntervalNumberMax,\n timeIntervalNumber>timeIntervalNumberMax?timeIntervalNumber:timeIntervalNumberMax,\n tweetLog, f1);\n Thread t = new Thread(tweeterThread);\n t.start();\n nThreads++;\n threads.add(t);\n }\n\n }\n }",
"public double getScoreOfString(String tweet) {\n return classifier.classify(tweet);\n }",
"private boolean containsBlacklistWord(String[] text, int startIndex, int endIndex) {\n for (int i = startIndex; i <= endIndex; i++) {\n if(blacklist.contains(text[i]))\n return true;\n }\n \n return false;\n }",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"private boolean handleWhisper(String line){\n if (line.indexOf(\"whispers: \") == -1)\n return false;\n \n Matcher matcher = WHISPER_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String ratingString = matcher.group(3);\n String gameNumberString = matcher.group(4);\n String message = matcher.group(5);\n\n int rating = (ratingString != null) && !ratingString.equals(\"----\") ? Integer.parseInt(ratingString) : -1;\n int gameNumber = Integer.parseInt(gameNumberString);\n\n if (!processWhisper(username, titles, rating, gameNumber, message))\n processLine(line);\n\n return true;\n }",
"public boolean hit(Bullet bullet) {\n //System.out.println(\"A golyo nem csapodott meg be semmibe.\");\n return false;\n }",
"boolean hasHadithText();",
"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 }",
"@Test\n void getSentimentScore() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n assertTrue(np.getSentimentScore(sentences) >= 0 && np.getSentimentScore(sentences) <=4);\n }",
"public void train(int category, String tweet){\n\n\n\t\t//Get the words out of the tweet\n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Associate these words with the category\n\t\tfor(String pt : parsedTweet){\n\t\t\tif(!category_count.get(category).containsKey(pt)){\n\t\t\t\tcategory_count.get(category).put(pt,1);\n\t\t\t}\n\t\t\tint numW = category_count.get(category).get(pt);\n\t\t\tcategory_count.get(category).put(pt,numW+1);\n\t\t\tif(prior_totals.containsKey(pt)){\n\t\t\t\tprior_totals.put(pt, prior_totals.get(pt) + 1);\n\t\t\t}else{\n\t\t\t\tprior_totals.put(pt,1);\n\t\t\t}\n\t\t\t\n\t\t\t//Increment the total size of the training set.\n\t\t\ttotal_training_size++;\n\t\t}\n\t\t//count of pt in cat divided by total count of pt in all categories = probability\n\t}",
"private boolean getSentiment(Prediction prediction, String content)\n throws IOException {\n Preconditions.checkNotNull(prediction);\n Preconditions.checkNotNull(content);\n\n Input input = new Input();\n Input.InputInput inputInput = new Input.InputInput();\n inputInput.set(\"csvInstance\", Lists.newArrayList(content));\n input.setInput(inputInput);\n Output result = prediction.hostedmodels().predict(\"414649711441\",\n \"sample.sentiment\", input).execute();\n String outputStr = result.getOutputLabel();\n return outputStr.equals(\"positive\");\n }",
"private void showSpam(){\n getSpam();\n //display persons\n MainActivity.instance().displayPersonsRunnable = new DisplayPersonsRunnable(MainActivity.instance());\n this.thread = new Thread(MainActivity.instance().displayPersonsRunnable);\n this.thread.start();\n }",
"protected abstract double relevantScore(Tweet tweet);",
"private boolean m36043c(Throwable th) {\n return ((th instanceof ShareTextException) && ((ShareTextException) th).d() == ExceptionType.USER_IS_HIDDEN) ? true : null;\n }",
"public void listenToHashtag(String[] _keyWords){\n TwitterStream ts = new TwitterStreamFactory(c).getInstance();\n FilterQuery filterQuery = new FilterQuery(); \n filterQuery.track(_keyWords);\n // On fait le lien entre le TwitterStream (qui r\\u00e9cup\\u00e8re les messages) et notre \\u00e9couteur \n ts.addListener(new TwitterListener(timerListener));\n // On d\\u00e9marre la recherche !\n ts.filter(filterQuery); \n }",
"public synchronized boolean hasSpamFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);\n }",
"public void downloadTweetsForItem(String item, int numTweets) \n\t\t\tthrows IOException, TwitterException\n\t{\n\t\t/*if (numTweets <= 0) \n\t\t{ \n\t\t\tnumTweets = Integer.MAX_VALUE; \n\t\t}*/\n\t\tFile userDir = new File(String.format(\"%s/%s\", DATA_DIR, item));\n\t\tboolean success = false;\n\t try{\n\t \t //success = userDir.mkdir();\t\n\t \t Files.createDirectory(userDir.toPath());\n\t } \n\t catch(IOException se)\n\t {\n\t \tSystem.out.println(\"****mkdir failed!!!!!!!!\");\n\t }\n\t\t\n\t\tString multiLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets.txt\", DATA_DIR, item, item);\n\t\tString singleLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets_single.txt\", DATA_DIR, item, item);\n\t\tString multiLineFileRaw = \n\t\t\t\tString.format(\"%s/%s/%s_tweets_multiRaw.txt\", DATA_DIR, item, item);\n\t\t//item = \"@\" + item;\n\t\t\n\t\tList<String> allTweets = GetAllTweets(item, numTweets);//Query(item, numTweets);\n\t\t\n\t\t// Now do some pre-processing on allTweets.\n\t\t// Topic modelling prefers text with stop words removed etc.\n\t\t List<String> filteredTweets = new ArrayList<String>();\n\n\t\t BufferedReader f = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t\t String line = f.readLine();\n\t\t List<String> stopwords = new ArrayList<String>();\n\t\t while(line != null)\n\t\t {\n\t\t\t stopwords.add(line);\n\t\t\t line = f.readLine();\n\t\t }\n\t\t f.close();\n\t\t \n\t\titem = item.toLowerCase();\n\t\tint i = 0;\n\t\twhile(i < allTweets.size())\n\t\t{\n\t\t\tString text = allTweets.get(i);\n\t\t\t\n\t\t\t// First, remove all non alphabetic characters. This removes a lot of junk! hash tags, prices, etc.\n\t\t\ttext = text.replaceAll(\"[^a-zA-Z\\\\s]\", \"\").toLowerCase();\n\t\t\t\n\t\t\t// first, get rid of our actual search term. we do not want it to come up as a topic,\n\t\t\t// as we already know that we are searching for tweets of that item\n\t\t\ttext = text.replace(item, \"\"); \n\t\t\t\n\t\t\t// Now, remove all words less than a certain length\n\t\t\ttext = text.replaceAll(\"\\\\b\\\\w{1,3}\\\\b\\\\s?\", \"\");\n\t\t\t\n\t\t\t// The DMM package doesn't do stop word removal! So I have to do this manually.\n\t\t\tfor(String word : stopwords){\n\t\t\t text = text.replace(word+\"\\\\s*\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Again, remove strings that are too short!\n\t\t\tif(text.length() > 14)\n\t\t\t{\n\t\t\t\tfilteredTweets.add(text);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// This string is too short, so it must get removed.\n\t\t\t\tallTweets.remove(i);\n\t\t\t\t// don't increment i, since we just deleted this one.\n\t\t\t}\n\t\t}\n\t\t// Sentiment analysis doesn't need pre-processing.\n\t\tsaveTweetsToFile(allTweets, multiLineFileRaw, true);\n\t\t\n\t\t// But our topics needs some stuff removed.\n\t\tsaveTweetsToFile(filteredTweets, multiLineFile, true);\n\t\tsaveTweetsToFile(filteredTweets, singleLineFile, false);\n\n\t}",
"private boolean isSimpleQuestion(String userMessage) {\n List<String> yesNoQuestion = additionalDB.get(\"yesNoQuestion\");\n String firstWord = firstWord(userMessage).toLowerCase();\n for (String str : yesNoQuestion)\n if (firstWord.equals(str))\n return true;\n return false;\n }",
"private boolean CATS(Category... cs) {\r\n if (in >= input.length()) return false;\r\n int len = input.nextLength(in);\r\n int ch = input.nextChar(in, len);\r\n Category cat = Category.get(ch);\r\n boolean ok = false;\r\n for (Category c : cs) if (cat == c) ok = true;\r\n if (! ok) return false;\r\n in += len;\r\n return true;\r\n }",
"public void displayRandomFakeTweet() {\n boolean decider;\n if (useGeoffChallen) {\n decider = random.nextBoolean();\n } else {\n decider = true;\n }\n if (decider) {\n List<twitter4j.Status> tweetsList = getter.getTweetsList();\n int randIndex;\n String tweet;\n\n // If this function is called as the first Tweet to be displayed, TweetGetter can't grab\n // tweets fast enough to display in time, causing tweetsList to have a size of 0. So instead\n // we'll just display a different quote\n try {\n randIndex = random.nextInt(tweetsList.size());\n tweet = tweetsList.get(randIndex).getText()\n .replace(\"[\", \"\")\n .replace(\"]\",\"\");\n tweetView.setText(tweet);\n } catch(IllegalArgumentException e) {\n String url = \"https://api.whatdoestrumpthink.com/api/v1/quotes/personalized?q=Bernie%20Sanders\";\n String objName = \"message\";\n displayFromJSON(url, objName);\n }\n } else {\n String url = \"https://api.whatdoestrumpthink.com/api/v1/quotes/personalized?q=Geoff%20Challen\";\n String objName = \"message\";\n displayFromJSON(url, objName);\n }\n\n }",
"public void cheakCategory(String category) {\n\n if (category.equals(\"1\")) {\n url_count += 1;\n } else if (category.equals(\"4\")) {\n sms_count += 1;\n } else if (category.equals(\"2\")) {\n text_count += 1;\n } else if (category.equals(\"3\")) {\n contact_count += 1;\n } else if (category.equals(\"5\")) {\n initiate_call_count += 1;\n }\n\n }",
"private void composeTweet() {\n if(NetworkUtils.isConnectedToNetwork((ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE)) == false) {\n Toast.makeText(this.getApplicationContext(), \"Please check your network connection!\", Toast.LENGTH_LONG).show();\n return;\n }\n Intent i = new Intent(this, ComposeActivity.class);\n startActivityForResult(i, REQ_CODE_COMPOSE_TWEET);\n }",
"protected boolean processIShout(String username, String titles, String message){return false;}",
"private boolean handlePersonalTell(String line){\n if (line.indexOf(\"tells you: \") == -1)\n return false;\n \n Matcher matcher = PERSONAL_TELL_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processPersonalTell(username, titles, message))\n processLine(line);\n\n return true;\n }",
"public boolean postKweet(String message, String username) {\n return kweetDAO.postKweet(message, username);\n }",
"int countByExample(BlacklistExample example);",
"public abstract boolean isKeyword(@Nullable String text);",
"public void tweet(String message) {\n\t\twait.until(ExpectedConditions.visibilityOf(composeBtn));\n\t\tcomposeBtn.click();\n\t\ttextBox.clear();\n\t\ttextBox.sendKeys(message);\n\t\tsendBtn.click();\n\t}",
"public void shuffleTweets() {\n Collections.shuffle(tweets);\n }"
] | [
"0.72402847",
"0.54489255",
"0.5350532",
"0.5332211",
"0.5294766",
"0.5228404",
"0.5178727",
"0.517827",
"0.51715755",
"0.5120293",
"0.51116824",
"0.5102579",
"0.5024302",
"0.49893695",
"0.498426",
"0.49626288",
"0.4951273",
"0.4951217",
"0.4934699",
"0.49055603",
"0.48699334",
"0.48692104",
"0.48691142",
"0.48425218",
"0.483773",
"0.483366",
"0.48300242",
"0.4819908",
"0.48115",
"0.48065418",
"0.47809792",
"0.4778906",
"0.47734576",
"0.47571352",
"0.47461227",
"0.4731298",
"0.47130173",
"0.4706763",
"0.46992314",
"0.4691642",
"0.4688662",
"0.46873775",
"0.46824762",
"0.46778548",
"0.46459863",
"0.46421215",
"0.46377996",
"0.46370998",
"0.46300435",
"0.46283287",
"0.4624608",
"0.46240592",
"0.46226197",
"0.4620653",
"0.46204013",
"0.46197575",
"0.46154204",
"0.46053082",
"0.46013457",
"0.45918727",
"0.4576124",
"0.456187",
"0.45598027",
"0.4553201",
"0.4551453",
"0.45430797",
"0.45429128",
"0.45408782",
"0.45345786",
"0.4532834",
"0.4532236",
"0.45306477",
"0.45178467",
"0.45048642",
"0.44988674",
"0.44881707",
"0.44861564",
"0.44845295",
"0.44808334",
"0.447272",
"0.44715726",
"0.44647107",
"0.44593197",
"0.4455629",
"0.44537237",
"0.44524172",
"0.44487023",
"0.4446768",
"0.44458506",
"0.44378892",
"0.44336358",
"0.44330302",
"0.4431743",
"0.44273102",
"0.4425435",
"0.44241226",
"0.44207",
"0.44192246",
"0.44147518",
"0.44117883"
] | 0.76786363 | 0 |
Pass in a tweet that is not a spam and test that the category for it come out to be notspam | public void testNotSpamCategory(){
TweetStatus tweetStatus = new TweetStatus();
String tweet = "Really having a fun vacation in miami";
tweetStatus.setTweetText(tweet);
TweetCategoryType tweetCategoryType = naiveBayeClassifier.classify(tweetStatus);
Assert.assertEquals(TweetCategoryType.NOTSPAM, tweetCategoryType);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void testSpamCategory(){\n\t\t\n\t\tTweetStatus tweetStatus = new TweetStatus();\n\t\tString tweet = \"Call us to get the best deal on vacation to rome\";\n\t\ttweetStatus.setTweetText(tweet);\n\t\tTweetCategoryType tweetCategoryType = naiveBayeClassifier.classify(tweetStatus);\n\t\t\n\t\tAssert.assertEquals(TweetCategoryType.SPAM, tweetCategoryType);\n\t}",
"protected boolean isInvalidTweet(Tweet tweet) {\n\t\tif (tweet.getPublishedTime() < startTime) {\n\t\t\treturn true;\n\t\t}\n\t\tif (tweet.getTerms(preprocessingUtils).size() == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isRetweet() {\n\t\treturn text.trim().startsWith(\"RT @\");\n\t}",
"private static boolean isAntonym(String text) {\n return text != null && text.equals(\"ant\");\n }",
"protected boolean processTShout(String username, String titles, String message){return false;}",
"@Test\r\n\tpublic void hidingTest(){\r\n\t\tBlacklisting bl = new Blacklisting();\r\n\t\tConversation c = convoCopy.copy();\r\n\t\t\r\n\t\tList<String> hideWords = new ArrayList<String>();\r\n\t\thideWords.add(\"Hello\");\r\n\t\thideWords.add(\"like\");\r\n\t\thideWords.add(\"pie\");\r\n \t\r\n \t\r\n\t\tConversation hidden = bl.hideWord(c, hideWords);\r\n\r\n\t\tMessage[] redactedmsg = new Message[hidden.getMsg().size()];\r\n\t\thidden.getMsg().toArray(redactedmsg);\r\n\t\t\r\n\t\t\r\n\t\tassertEquals(hidden.getMsg().size(), 7);\r\n\r\n\t\tassertEquals(redactedmsg[0].getContent(), \"*redacted* there!\");\r\n\t\tassertEquals(redactedmsg[2].getContent(), \"I'm good thanks, do you *redacted* *redacted*?\");\r\n\t\tassertEquals(redactedmsg[4].getContent(), \"Hell yes! Are we buying some *redacted*?\");\r\n\t\tassertEquals(redactedmsg[5].getContent(), \"No, just want to know if there's anybody else in the *redacted* society...\");\r\n\t\tassertEquals(redactedmsg[6].getContent(), \"YES! I'm the head *redacted* eater there...\");\r\n\r\n\r\n\t\tSystem.out.println(\"Filtered by user ID: \" + hidden);\r\n\t}",
"private String proceesTweetText(String tweetText) {\n // remove new lines\n tweetText = tweetText.replace(\"\\n\",\"\").replace(\"\\r\",\"\");\n // remove urls \"https://...\":\n tweetText = tweetText.replaceAll(\"https?://\\\\S+\\\\s?\", \"\");\n // remove users \"@...\":\n tweetText = tweetText.replaceAll(\"@\\\\S+\\\\s?\", \"\");\n return tweetText;\n }",
"private void validatePostTweet(Tweet tweet) {\n //check if the length exceeds 140 characters\n if (tweet.getText().length() > 140) {\n throw new IllegalArgumentException(\"Tweet is too long\");\n }\n\n //check if lon/lst is within range\n Double lon = tweet.getCooridinates().getCoordinates().get(0);\n Double lat = tweet.getCooridinates().getCoordinates().get(1);\n if (lon > 180 || lon < -180 || lat > 90 || lat <-90) {\n throw new IllegalArgumentException(\"Coordinates out of range\");\n }\n\n return;\n }",
"protected boolean processCShout(String username, String titles, String message){return false;}",
"private boolean handleTShout(String line){\n if (line.indexOf(\"t-shouts: \") == -1)\n return false;\n \n Matcher matcher = TSHOUT_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processTShout(username, titles, message))\n processLine(line);\n\n return true;\n }",
"public int classify(String tweet){\n\t\t//Each word is classified indenpendtly, whichever one has the most wins. \n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Compute the leading term of category probability:\n\t\tfloat[] catProb = new float[categories.length];\n\t\tint i = 0;\n\t\tfor(int cat : categories){\n\t\t\tcatProb[i] = category_count.get(cat).size()/(float)total_training_size;\n\t\t\ti++;\n\t\t}\n\n\t\t//Compute the number of times a word appears in all categories:\n\t\tHashMap<String, Integer> total_all_classes = new HashMap<String, Integer>();\n\t\tfor(String pt : parsedTweet){\n\t\t\tfor(int cat : categories){\n\t\t\t\tif(!total_all_classes.containsKey(pt)){\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\ttotal_all_classes.put(pt,category_count.get(cat).get(pt));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//What happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t//If we've seen the word before:\n\t\t\t\t\tif(category_count.get(cat).containsKey(pt)){\n\t\t\t\t\t\tint additional = total_all_classes.get(pt) + category_count.get(cat).get(pt);\n\t\t\t\t\t\ttotal_all_classes.put(pt, additional);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//I'm skeptical if this will ever be execuated, but what happens if we've never seen the word before?\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Create something to hold the probabilities in\n\t\tfloat[] class_probability = new float[categories.length];\n\t\t//Initalize:\n\t\tfor(int c = 0; c < categories.length; c++){\n\t\t\tclass_probability[c] = 1;\n\t\t}\n\n\t\t//Compute the prodcut of the toals with priors and weights and assumed prob.\n\t\t//product of ( #word appears in all class * (#word appears in class c/#words in class c) )+ weight*assumed probability all divided by weight + #words appeared in all classes\n\t\tfor(int cat : categories){\n\t\t\tfor(String pt : parsedTweet){\n\t\t\t\tif(category_count.get(cat).containsKey(pt) && total_all_classes.containsKey(pt)){ \n\t\t\t\t\t//This is going to be a terribly long expression sadly.\n\t\t\t\t\tclass_probability[cat] *= ((total_all_classes.get(pt)*(category_count.get(cat).get(pt)/(float)category_count.get(cat).size())) + weight*assumed_prob)/(float)(weight + total_all_classes.get(pt));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//Multiply the whole term by the leading term of catProb:\n\t\tfor(int cat : categories){\n\t\t\tclass_probability[cat] = catProb[cat]*class_probability[cat];\n\t\t}\n\n\t\t//Figure out which class/category is the highest and return the best fitting one.\n\t\tint bestFit = CAT_SAFE; //If can't figure, return that its SAFE? Dunno if this is the best choice\n\t\tfloat bestProb = -1;\n\t\tfor(int cat : categories){\n\t\t\tif(class_probability[cat] > bestProb){\n\t\t\t\tbestFit = cat;\n\t\t\t}\n\t\t\tSystem.out.println(class_probability[cat]);\n\t\t}\n\t\tSystem.out.println(bestProb < threshold);\n\t\tif(bestProb < threshold){\n\t\t\tbestFit = DEFAULT_CATEGORY;\n\t\t}\n\n\n\n\t\treturn bestFit;\n\n\t}",
"public void removeAllCommentsThatHasNotNonWordInBody(){\n JSONArray commentWhoHasNonWordInBody=new JSONArray();\n JSONArray commentList= comment.getBody();\n for(Object comments: commentList){\n if(((JSONObject)comments).getString(\"body\").toLowerCase().contains(\"non\"))\n {\n commentWhoHasNonWordInBody.put(comments);\n }\n }\n System.out.println(\"============================ List Of Comments That Has Non word in Body ====================================\");\n System.out.println(commentWhoHasNonWordInBody);\n System.out.println(\"============================================================================================================\");\n\n }",
"protected boolean processShout(String username, String titles, String message){return false;}",
"private void chooseRandomTweet() {\n if (random.nextBoolean()) {\n realTweet = true;\n displayRandomTrumpTweet();\n } else {\n realTweet = false;\n displayRandomFakeTweet();\n }\n }",
"boolean containsUtilize(String word)\n {\n return word.contains(\"utilize\");\n }",
"boolean hasSentimentAnalysis();",
"public abstract boolean isKeyword(@Nullable String text);",
"private boolean containsBlacklistWord(String[] text, int startIndex, int endIndex) {\n for (int i = startIndex; i <= endIndex; i++) {\n if(blacklist.contains(text[i]))\n return true;\n }\n \n return false;\n }",
"public void testBlogEntryHasTagsAndMediaIsNewsfeed() 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.NEWS_FEED);\n decorator.decorate(context, blogEntry);\n\n StringBuffer tags = new StringBuffer();\n// tags.append(\"<!--<div class=\\\"tags\\\">Tags : \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/automated+unit+testing\\\" rel=\\\"tag\\\">automated unit testing</a>, \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/junit\\\" rel=\\\"tag\\\">junit</a>, \");\n// tags.append(\"<a href=\\\"http://technorati.com/tag/java\\\" rel=\\\"tag\\\">java</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 }",
"@Override\n\tpublic void tweet(String message) throws Exception {\n\t\t\n\t}",
"public double getScoreOfString(String tweet) {\n return classifier.classify(tweet);\n }",
"private boolean m36043c(Throwable th) {\n return ((th instanceof ShareTextException) && ((ShareTextException) th).d() == ExceptionType.USER_IS_HIDDEN) ? true : null;\n }",
"private String filterOutURLFromTweet(final Status status) {\n\t\tfinal String tweet = status.getText();\n\t\tfinal URLEntity[] urlEntities = status.getURLEntities();\n\t\tint startOfURL;\n\t\tint endOfURL;\n\t\tString truncatedTweet = \"\";\n\t\tif(urlEntities.length > 0)\n\t\t{\n\t\t\tfor(final URLEntity urlEntity: urlEntities){\n\t\t\t\tstartOfURL = urlEntity.getStart();\n\t\t\t\tendOfURL = urlEntity.getEnd();\n\t\t\t\ttruncatedTweet += tweet.substring(0, startOfURL) + tweet.substring(endOfURL);\n\t\t\t}\n\t\t\treturn truncatedTweet;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn tweet;\n\t\t}\n\n\t}",
"public static boolean sendTweet(String tweet) {\n \t\tif (!isEnabled) {\n \t\t\tlogger.debug(\"Twitter client is disabled > execution aborted!\");\n \t\t\treturn false;\n \t\t}\n \n \t\ttry {\n \t\t\tStatus status = client.updateStatus(tweet);\n\t\t\tlogger.debug(\"Successfully sent Tweet '{}'\", status.getText());\n \t\t\treturn true;\n \t\t} catch (TwitterException e) {\n \t\t\tlogger.error(\"Failed to send Tweet '\" + tweet + \"' because of: \" + e.getLocalizedMessage());\n \t\t\treturn false;\n \t\t}\n \t}",
"public void setTweetMessage( String _strTweetMessage )\n {\n this._strTweetMessage = _strTweetMessage;\n }",
"public boolean isWord2ignore(String word);",
"public Boolean categoryWithoutGuess(char guess) {\n CharSequence seqChar = new StringBuilder(1).append(guess);\n\n\n Boolean containsChar = false;\n for (Map.Entry<String, Set<String>> entry1 : wordsLeft.entrySet()) {\n String tester = entry1.getKey();\n\n if (!tester.contains(seqChar)) {\n containsChar = true;\n possibleCategoryWithoutGuess = tester;\n }\n }\n\n return containsChar;\n }",
"boolean hasHadithText();",
"private String filterText(Player player, String txt)\r\n/* */ {\r\n/* 76 */ if (this.settings.enabled)\r\n/* */ {\r\n/* 78 */ Chatter chatter = ChatterHandler.getChatter(player.getUniqueId());\r\n/* 79 */ String filteredTxt = this.plugin.getFilterHandler().execute(player, txt);\r\n/* */ \r\n/* 81 */ if (filteredTxt != null)\r\n/* */ {\r\n/* */ \r\n/* 84 */ chatter.addMessage(new ChatMessage(filteredTxt));\r\n/* */ \r\n/* 86 */ return filteredTxt;\r\n/* */ }\r\n/* */ \r\n/* 89 */ return null;\r\n/* */ }\r\n/* */ \r\n/* */ \r\n/* 93 */ return txt;\r\n/* */ }",
"public void addTweet (Tweet tweet) throws IllegalArgumentException{\n tweets.add(tweet);\n\n }",
"EmailClass findClass(Email email,boolean noStopWordsRemoval) {\n //email.preprocessEmail(trainingData.stopwords,noStopWordsRemoval);\n double hamProbability = 0;\n double spamProbability = 0;\n\n for (String s : email.processedMessage.keySet()) {\n long n = email.processedMessage.get(s);\n long hc, sc;\n if (words.containsKey(s)) {\n LexiconCount lcTemp = words.get(s);\n hc = lcTemp.numberOfOccurencesInHamDocuments;\n sc = lcTemp.numberOfOccurencesInSpamDocuments;\n } else {\n hc = 0;\n sc = 0;\n }\n double cProbabilityForHam = (hc + 1) / (double) (totalNumberOfWordsInHamDocuments + words.size());\n cProbabilityForHam = Math.pow(cProbabilityForHam, n);\n hamProbability += (Math.log(cProbabilityForHam)) / Math.log(2);\n\n double cProbabilityForSpam = (sc + 1) / (double) (totalNumberOfWordsInSpamDocuments + words.size());\n cProbabilityForSpam = Math.pow(cProbabilityForSpam, n);\n spamProbability += (Math.log(cProbabilityForSpam)) / Math.log(2);\n }\n double priorProbabilityForHam = trainingData.numberOfHamDocuments / (double) (trainingData.numberOfHamDocuments + trainingData.numberOfSpamDocuments);\n hamProbability += (Math.log(priorProbabilityForHam)) / Math.log(2);\n\n double priorProbabilityForSpam = trainingData.numberOfSpamDocuments / (double) (trainingData.numberOfHamDocuments + trainingData.numberOfSpamDocuments);\n spamProbability += (Math.log(priorProbabilityForSpam)) / Math.log(2);\n if (hamProbability > spamProbability) {\n return EmailClass.ham;\n } else {\n return EmailClass.spam;\n }\n }",
"public boolean isAccepted2(String word) {\r\n\t return word.endsWith(\"baa\");\r\n \r\n }",
"public static Set<String> getMentionedUsers(List<Tweet> tweets) {\n\n// throw new RuntimeException(\"not implemented\");\n Set<String> anSet = new HashSet<>();\n Pattern pattern=Pattern.compile(\"@[a-zA-Z]{1,}\");\n Matcher matcher=pattern.matcher(tweets.get(0).getText());\n\n return anSet;\n }",
"public void setALLOWMTMTORUN(java.lang.CharSequence value) {\n this.ALLOW_MTM_TO_RUN = value;\n }",
"public Tweet(String message){\n this.message = message;\n this.Unique = UUID.randomUUID();\n }",
"private void expectTweetsIgnored() {\n tweetDAO.save(anyObject());\n }",
"public int searchTweetsNaive(String pattern, List<String> ans) {\n int compCost = 0;\n Assoc<Integer, Integer> holder;\n\n for(String tweet : tweets) {\n\n holder = StringMatch.matchNaive(pattern.toLowerCase(), tweet.toLowerCase());\n compCost += holder.value;\n\n if(holder.key != -1)\n ans.add(tweet);\n }\n return compCost;\n }",
"public TweetCorrected(String text) {\n super(text);\n }",
"default boolean isSwear() {\n return meta(\"nlpcraft:nlp:swear\");\n }",
"private static boolean shouldInclude(String text) {\n if (text.startsWith(\"RT @\")) return false;\n else if (text.contains(\"https://\") || text.contains(\"http://\")) return false;\n else if (endsWithNumber.matcher(text).find()) return false;\n\n return true;\n }",
"public boolean isSentiment (String lemma){\n boolean sentimentPresent = false;\n \n sentimentPresent = this.keys.contains(lemma);\n\n return sentimentPresent;\n }",
"private static void banFeature(ArrayList t) {\n\t\tSet setKeys = Utility.vocabHM.keySet();\n\t\tIterator i = setKeys.iterator();\n\t\tSystem.out.print(\"Word cut : [\");\n\t\tint idx = 0;\n\t\twhile (i.hasNext()) {\n\t\t\tString s = (String) i.next();\n\t\t\tInteger df = (Integer) Utility.vocabHM.get(s);\n\n\t\t\tif (t.contains(s)){\n\t\t\t\tSystem.out.print(s+\", \");\n\t\t\t\ti.remove();\n\t\t\t\tidx++;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"]\\n ::banned::\"+idx+\" feature.\");\n\t}",
"public void onTweetSuccess(Tweet tweet);",
"@Test(suiteName = \"NowPlaying\", testName = \"Now Playing - Live - Disallowed - Category\", description = \"Validating Disallowed category\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-236:EVQAAND-229\" })\n\tpublic void verifydisallowedCategory() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"Verifying Disallowed Category MOBANDEVER-236:EVQAAND-229\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickNews();\n\t\t\tcommon.scrollUntilTextExists(\"News/Public Radio\");\n\t\t\tgetPageFactory().getEvehome().clickSubCatNews();\n\t\t\tgetPageFactory().getEvehome().clickNewsChannel1();\n\t\t\tgetPageFactory().getEvehome().validateNPLScreen();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public synchronized boolean hasSpamFolder() {\n return !K9.FOLDER_NONE.equalsIgnoreCase(mSpamFolderName);\n }",
"public static boolean isUncountable(String word)\n {\n for (String w : uncountable)\n {\n if (w.equalsIgnoreCase(word))\n {\n return true;\n }\n }\n return false;\n }",
"public TweetCorrected() {}",
"private boolean isSimpleQuestion(String userMessage) {\n List<String> yesNoQuestion = additionalDB.get(\"yesNoQuestion\");\n String firstWord = firstWord(userMessage).toLowerCase();\n for (String str : yesNoQuestion)\n if (firstWord.equals(str))\n return true;\n return false;\n }",
"public void feedCat(){\n this.isHungry = false;\n this.isHappy = false;\n }",
"public static void checkHonorific(Token t) {\r\n\t\tIterator<String> it = WordLists.honorifics().iterator();\r\n\t\t\r\n\t\twhile(it.hasNext()) {\r\n\t\t\tString honorific = it.next();\r\n\t\t\t\r\n\t\t\tif(t.getName().equalsIgnoreCase(honorific)) {\r\n\t\t\t\tt.getFeatures().setHonorific(true);\r\n\t\t\t\treturn;\r\n\t\t\t}\t\r\n\t\t}\r\n\t}",
"@Override\n\tpublic boolean CheckStreamingLike(String mail) {\n\t\treturn false;\n\t}",
"public void downloadTweetsForItem(String item, int numTweets) \n\t\t\tthrows IOException, TwitterException\n\t{\n\t\t/*if (numTweets <= 0) \n\t\t{ \n\t\t\tnumTweets = Integer.MAX_VALUE; \n\t\t}*/\n\t\tFile userDir = new File(String.format(\"%s/%s\", DATA_DIR, item));\n\t\tboolean success = false;\n\t try{\n\t \t //success = userDir.mkdir();\t\n\t \t Files.createDirectory(userDir.toPath());\n\t } \n\t catch(IOException se)\n\t {\n\t \tSystem.out.println(\"****mkdir failed!!!!!!!!\");\n\t }\n\t\t\n\t\tString multiLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets.txt\", DATA_DIR, item, item);\n\t\tString singleLineFile = \n\t\t\tString.format(\"%s/%s/%s_tweets_single.txt\", DATA_DIR, item, item);\n\t\tString multiLineFileRaw = \n\t\t\t\tString.format(\"%s/%s/%s_tweets_multiRaw.txt\", DATA_DIR, item, item);\n\t\t//item = \"@\" + item;\n\t\t\n\t\tList<String> allTweets = GetAllTweets(item, numTweets);//Query(item, numTweets);\n\t\t\n\t\t// Now do some pre-processing on allTweets.\n\t\t// Topic modelling prefers text with stop words removed etc.\n\t\t List<String> filteredTweets = new ArrayList<String>();\n\n\t\t BufferedReader f = new BufferedReader(new FileReader(\"stopwords.txt\"));\n\t\t String line = f.readLine();\n\t\t List<String> stopwords = new ArrayList<String>();\n\t\t while(line != null)\n\t\t {\n\t\t\t stopwords.add(line);\n\t\t\t line = f.readLine();\n\t\t }\n\t\t f.close();\n\t\t \n\t\titem = item.toLowerCase();\n\t\tint i = 0;\n\t\twhile(i < allTweets.size())\n\t\t{\n\t\t\tString text = allTweets.get(i);\n\t\t\t\n\t\t\t// First, remove all non alphabetic characters. This removes a lot of junk! hash tags, prices, etc.\n\t\t\ttext = text.replaceAll(\"[^a-zA-Z\\\\s]\", \"\").toLowerCase();\n\t\t\t\n\t\t\t// first, get rid of our actual search term. we do not want it to come up as a topic,\n\t\t\t// as we already know that we are searching for tweets of that item\n\t\t\ttext = text.replace(item, \"\"); \n\t\t\t\n\t\t\t// Now, remove all words less than a certain length\n\t\t\ttext = text.replaceAll(\"\\\\b\\\\w{1,3}\\\\b\\\\s?\", \"\");\n\t\t\t\n\t\t\t// The DMM package doesn't do stop word removal! So I have to do this manually.\n\t\t\tfor(String word : stopwords){\n\t\t\t text = text.replace(word+\"\\\\s*\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\t// Again, remove strings that are too short!\n\t\t\tif(text.length() > 14)\n\t\t\t{\n\t\t\t\tfilteredTweets.add(text);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// This string is too short, so it must get removed.\n\t\t\t\tallTweets.remove(i);\n\t\t\t\t// don't increment i, since we just deleted this one.\n\t\t\t}\n\t\t}\n\t\t// Sentiment analysis doesn't need pre-processing.\n\t\tsaveTweetsToFile(allTweets, multiLineFileRaw, true);\n\t\t\n\t\t// But our topics needs some stuff removed.\n\t\tsaveTweetsToFile(filteredTweets, multiLineFile, true);\n\t\tsaveTweetsToFile(filteredTweets, singleLineFile, false);\n\n\t}",
"boolean isNotKeyWord(String word);",
"private static String analyzeTerm(String term) {\n String ret = term.toLowerCase();\n if (stopWords.contains(ret) || ret.isEmpty())\n return \"\";\n return stemmer.stem(ret);\n }",
"protected boolean processWhisper(String username, String titles, int rating, int gameNumber, String message){return false;}",
"private boolean handleCShout(String line){\n if (line.indexOf(\"c-shouts: \") == -1)\n return false;\n \n Matcher matcher = CSHOUT_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String message = matcher.group(3);\n\n if (!processCShout(username, titles, message))\n processLine(line);\n\n return true;\n }",
"public boolean killed(Mention mention);",
"public static int getSentiment(Ticket T){\n\t\tint sentimentScore=0;\r\n\t\tTranscript Trans=new Transcript();\r\n\t\tint positive=0;\r\n\t\tint negative=0;\r\n\t\t//System.out.println(\"Entering Sentiment Score Calculator\");\r\n\t\t//System.out.println(\"WordList Size\"+T.Trans.wordList.size()+\"\\n\");\r\n\t\tfor(int i =0;i <T.Trans.wordList.size();i++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tfor(int j =0;j< Trans.positiveLexicons.length;j++){\r\n\t\t\t\tif(T.Trans.wordList.get(i)==Trans.positiveLexicons[j]){\r\n\t\t\t\t\tpositive++;\r\n\t\t\t\t\tSystem.out.println(T.Trans.wordList.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int k=0;k < Trans.negativeLexicons.length;k++){\r\n\t\t\t\tif(T.Trans.wordList.get(i)==Trans.negativeLexicons[k]){\r\n\t\t\t\t\tnegative++;\r\n\t\t\t\t\tSystem.out.println(T.Trans.wordList.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(positive > negative){ \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Assigning sentimentScore according to the number of positive and negative lexicons.\r\n\t\t\tsentimentScore=3;\r\n\t\t}\r\n\r\n\t\telse if(positive < negative){\r\n\t\t\tsentimentScore=1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tsentimentScore=2;\r\n\t\t}\r\n\t\treturn sentimentScore;\r\n\t}",
"protected boolean processAnnouncement(String username, String message){return false;}",
"private boolean isWhiteBearArticle(Document parsed) {\n boolean isCorrect = false;\n Element heading = parsed.getElementById(\"heading\");\n if (heading == null) {\n return false;\n }\n if (heading.text().equals(DirectoryParser.HEADING_TEST_STRING)) {\n isCorrect = true;\n }\n Elements selected = parsed.getElementsByTag(\"article\");\n if (selected.size() != 1) {\n return false;\n } else {\n Attributes articleAttributes = selected.first().attributes();\n if (articleAttributes.size() > 1) {\n return false;\n }\n if (articleAttributes.asList().contains(new Attribute(\"id\", \"main\"))) {\n isCorrect = true;\n }\n }\n selected = parsed.getElementsByClass(\"mainText\");\n if (selected.size() != 1) {\n return false;\n }\n return isCorrect;\n }",
"public void testGetContentDescription_emptyTweet() {\n final Locale originalLocale = TestUtils.setLocale(getContext(), Locale.ENGLISH);\n final BaseTweetView view = createView(context, TestFixtures.TEST_TWEET);\n view.setTweet(TestFixtures.EMPTY_TWEET);\n Assert.assertThat(view.getContentDescription(), is(getResources().getString(R.string.tw__loading_tweet)));\n TestUtils.setLocale(getContext(), originalLocale);\n }",
"@Override\r\n\t\t\tpublic boolean isStopWord(String term) {\n\t\t\t\treturn false;\r\n\t\t\t}",
"private boolean canProcessSuggestions(@CategoryInt int category, @CategoryStatus int status) {\n // If the category was blacklisted, we note that there might be new content to show.\n mBlacklistedCategories.remove(category);\n\n // We never want to add suggestions from unknown categories.\n if (!mSections.containsKey(category)) return false;\n\n // The status may have changed while the suggestions were loading, perhaps they should not\n // be displayed any more.\n if (!SnippetsBridge.isCategoryEnabled(status)) {\n Log.w(TAG, \"Received suggestions for a disabled category (id=%d, status=%d)\", category,\n status);\n return false;\n }\n\n return true;\n }",
"public void postTweet(int userId, int tweetId) {\n\n }",
"protected boolean processPersonalTell(String username, String titles, String message){return false;}",
"boolean isCodeMixed(String text) {\n String[] tokens = text.split(\"\\\\s+\");\r\n for (String word : tokens) {\r\n String nword = word.toLowerCase();\r\n if (keywords.containsKey(nword))\r\n return true;\r\n }\r\n return false;\r\n }",
"private boolean handleWhisper(String line){\n if (line.indexOf(\"whispers: \") == -1)\n return false;\n \n Matcher matcher = WHISPER_REGEX.matcher(line);\n if (!matcher.matches())\n return false;\n\n String username = matcher.group(1);\n String titles = matcher.group(2);\n String ratingString = matcher.group(3);\n String gameNumberString = matcher.group(4);\n String message = matcher.group(5);\n\n int rating = (ratingString != null) && !ratingString.equals(\"----\") ? Integer.parseInt(ratingString) : -1;\n int gameNumber = Integer.parseInt(gameNumberString);\n\n if (!processWhisper(username, titles, rating, gameNumber, message))\n processLine(line);\n\n return true;\n }",
"public boolean fight(String not_used) { \r\n\t\tint num = getRandomInt(100);\r\n\t\tif (num >= fearfullness) {\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"private void sendToCatTheater()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Theater'\", Toast.LENGTH_SHORT).show();\n }",
"private void detectQuestionType(String userMessage) {\n String firstWord = firstWord(userMessage).toLowerCase();\n List<String> answer;\n if (firstWord.equals(\"where\")) {\n answer = additionalDB.get(\"where\");\n } else if (firstWord.equals(\"when\")) {\n answer = additionalDB.get(\"when\");\n }else {\n \tanswer = additionalDB.get(\"ques\");\n }\n responsesList.add(new Response(getRandomElementFromList(answer)));\n }",
"public void processTweet(String tweetStr) {\r\n Tweet tweet = tweetProcessor.deserializeTweet(tweetStr);\r\n\r\n // the simulator never cleared this list as it loaded tweets into the system, causing the\r\n // memory to run out and cause the program to crash\r\n //tweetsList.add(tweet);\r\n tweetProcessor.processTweetText(tweet);\r\n }",
"public Double[] SentiwordsMatch(String tweets) throws IOException\r\n {\r\n String[] ar=new String[100];\r\n \r\n ar=tweets.split(\" \");\r\n \r\n /* for(String splited_text:ar)\r\n System.out.println(splited_text);*/\r\n \r\n Double price[]=PriceCalculator(ar);\r\n \r\n \r\n return price;\r\n \r\n }",
"public Tweet(String message){\n this.message = message;\n this.date = new Date();\n }",
"public boolean isCat() {\r\n\t\tboolean isCat = false;\r\n\r\n\t\tif (numOfLeg == 4 && mammal == true && sound.equals(\"meow\")) {\r\n\r\n\t\t\tisCat = true;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tisCat = false;\r\n\t\t}\r\n\r\n\t\treturn isCat;\r\n\t}",
"public static String noFeats(String category) {\n category = remove_features.matcher(category).replaceAll(\"\");\n category = replace_NP_with_N.matcher(category).replaceAll(\"N\");\n return category;\n }",
"default boolean isStopWord() {\n return meta(\"nlpcraft:nlp:stopword\");\n }",
"private void _tweetShare(Activity act, String title, String description)\n {\n try {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.setPackage(\"com.twitter.android\");\n shareIntent.putExtra(Intent.EXTRA_TITLE, title);\n shareIntent.putExtra(Intent.EXTRA_TEXT, description);\n act.startActivity(shareIntent);\n } catch (ActivityNotFoundException ex) {\n String tweetUrl = StringUtils.join(\" \",\"https://twitter.com/intent/tweet?text=\", title, description);\n Uri uri = Uri.parse(tweetUrl);\n act.startActivity(new Intent(Intent.ACTION_VIEW, uri));\n }\n }",
"public boolean accept(String text)\n {\n return !checker1.accept(text);\n }",
"@Override\r\n public void onPrivmsg(User user, Channel channel, String message) {\r\n if (channel == null || !channel.getName().equals(\"#it06\")) {\r\n return;\r\n }\r\n for (String s : message.split(\" \")) {\r\n /* check if the message contains a username, if so: change the message */\r\n /* to something in the blacklist */\r\n for (User u : channel.getUsers().keySet()) {\r\n if (s.contains(u.getNickname())) {\r\n s = \"hej\";\r\n }\r\n }\r\n \r\n /* if the message is in the blacklist, go to the next one */\r\n if (blackList.contains(s)) {\r\n continue;\r\n }\r\n \r\n /* do we have this word in our \"vocabulary\" (old), else we check google */\r\n String t;\r\n if (old.containsKey(s)) {\r\n t = old.get(s);\r\n } else {\r\n t = getSuggestion(s);\r\n }\r\n old.put(s, t);\r\n \r\n /* if we have found a suggestion, print it to the channel */\r\n if (t != null) {\r\n channel.sendPrivmsg(t);\r\n }\r\n }\r\n }",
"private void checkEasterEgg (String word) {\r\n if (word.startsWith (\"IMAC\") || word.equals (\"APPLE\") || word.equals (\"KATZ\") || word.startsWith (\"IPOD\") || word.startsWith (\"IPHONE\")\r\n || word.startsWith (\"MAC\") && !word.startsWith (\"MACR\") && !word.startsWith (\"MACE\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered cannot be recognized\\nSince we are nice, we will add it for you anyways.\",\r\n \"Woah There!\", JOptionPane.INFORMATION_MESSAGE);\r\n }\r\n }",
"List<String> searchTweets(String keywords) throws TwitterException;",
"void test(String hamEmailsDirectoryPath, String spamEmailsDirectoryPath,boolean noStopWordsRemoval) throws IOException {\n hashLexicons();\n //String hamEmailsDirectoryPath = \"C:\\\\Users\\\\Praveen\\\\OneDrive\\\\Spring 2016\\\\Machine_Learning\\\\Assignment\\\\2\\\\test\\\\ham\";\n findTruePositive(hamEmailsDirectoryPath, EmailClass.ham,noStopWordsRemoval);\n findTruePositive(spamEmailsDirectoryPath, EmailClass.spam,noStopWordsRemoval);\n //System.out.println(\"The accuracy in classifying the ham emails using Naive Bayes classifier is \"+d*100);\n //String spamEmailsDirectoryPath = \"C:\\\\Users\\\\Praveen\\\\OneDrive\\\\Spring 2016\\\\Machine_Learning\\\\Assignment\\\\2\\\\test\\\\spam\";\n //System.out.println(\"The accuracy in classifying the spam emails using Naive Bayes classifier is \"+findAccuracy(spamEmailsDirectoryPath, EmailClass.spam,noStopWordsRemoval)*100);\n System.out.println(\"Accuracy of email clasification using Naive Bayes Algorithm is: \" + (truePositive / (double) testSamples)*100);\n }",
"static boolean containsInvalidCharacters(String topic) {\n Matcher matcher = INVALID_CHARS_PATTERN.matcher(topic);\n return matcher.find();\n }",
"public void train(int category, String tweet){\n\n\n\t\t//Get the words out of the tweet\n\t\tString [] parsedTweet = tweetStripper.parseTweet(tweet).split(\" \");\n\n\t\t//Associate these words with the category\n\t\tfor(String pt : parsedTweet){\n\t\t\tif(!category_count.get(category).containsKey(pt)){\n\t\t\t\tcategory_count.get(category).put(pt,1);\n\t\t\t}\n\t\t\tint numW = category_count.get(category).get(pt);\n\t\t\tcategory_count.get(category).put(pt,numW+1);\n\t\t\tif(prior_totals.containsKey(pt)){\n\t\t\t\tprior_totals.put(pt, prior_totals.get(pt) + 1);\n\t\t\t}else{\n\t\t\t\tprior_totals.put(pt,1);\n\t\t\t}\n\t\t\t\n\t\t\t//Increment the total size of the training set.\n\t\t\ttotal_training_size++;\n\t\t}\n\t\t//count of pt in cat divided by total count of pt in all categories = probability\n\t}",
"public static boolean canCast(Thing b,Thing s) {\r\n \t\tif (s.place!=b) {\r\n \t\t\tGame.warn(\"Spell.canCast: spell not in inventory!\");\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\t\r\n \t\tString order=s.getString(\"Order\");\r\n \t\tif (order.equals(Skill.BLACKMAGIC)) {\r\n \t\t\tint cost=s.getStat(\"SpellCost\");\r\n \t\t\tif (b.getStat(RPG.ST_MPS)<cost) return false;\r\n \t\t\tint us=Recipe.checkIngredients(b,s.getString(\"Ingredients\"));\t\r\n \t\t\treturn (us>0);\r\n \t\t} \r\n \t\t\r\n \t\tint c=s.getStat(\"Charges\");\r\n \t\treturn (c>0);\r\n \r\n \t}",
"private void getSentenceTense(String pos)\n\t{\n\t\tif (pos.equalsIgnoreCase(\"VBD\")) // I ate pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.PAST; \n\t\tif (pos.equalsIgnoreCase(\"VB\"))\tTenseFlag=true; \n\t\tif (pos.equalsIgnoreCase(\"MD\"))\tModalFlag=true; \n\t\tif ((TenseFlag == true) && (ModalFlag==true)) // I will eat pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.FUTURE; \n\t\tif (((TenseFlag == true) && (ModalFlag==false)) || (pos.equalsIgnoreCase(\"VBP\"))) // I eat pizza. \n\t\t\tSentenceTenseDirection = Tense_Direction.PRESENT;\n\t\t\n\t\t// ============== Get Type of Tense: Simple, Continuous, Perfect, Perfect Continuous\n\t\tif (pos.equalsIgnoreCase(\"VBG\")) \n\t\t{\n\t\t\tContinuousFlag=true;\n\t\t\tSentenceTenseModifier = Tense_Modifier.CONTINUOUS; // Continuous: eating, smoking, ...\n\t\t}\n\t\t\n\t\tif (pos.equalsIgnoreCase(\"VBN\"))\n\t\t{\n\t\t\tPerfectFlag=true;\n\t\t\tSentenceTenseModifier = Tense_Modifier.PERFECT; // Perfect: eaten \n\t\t}\n\t\t\n\t\tif ((ContinuousFlag==true) && (PerfectFlag==true))\n\t\t{\n\t\t\tPerfectContinuousFlag = true;\n\t\t\tPerfectFlag = false;\n\t\t\tContinuousFlag = false;\n\t\t\tSentenceTenseModifier = Tense_Modifier.PERFECT_CONTINUOUS; // I will have been eating pizza. \n\t\t}\n\t\t\n\t\tif ((PerfectFlag || ContinuousFlag || PerfectContinuousFlag)) {} else // Perfect Simple: I ate pizza. \n\t\t\tSentenceTenseModifier = Tense_Modifier.SIMPLE; \n\t\n\t}",
"private static Stream<String> createBadWordsDetectingStream(String text, \n List<String> badWords) {\n\t \treturn Arrays.stream(text.split(\" \")).filter(el -> !badWords.contains(el)).distinct().sorted().collect(Collectors.toList()).stream();\n\t }",
"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 CompletableFuture<String> analyzeSentiment(List<Details> sentimentData) {\n\n CompletableFuture<String> sentiment=null;\n CompletableFuture<List<Details>> happyTweets=null;\n\n int count=0;\n happyTweets = CompletableFuture.supplyAsync(() -> sentimentData.stream()\n .filter(d -> d.text.contains(\":-)\"))\n .collect(Collectors.toList()));\n\n CompletableFuture<List<Details>> sadTweets = CompletableFuture.supplyAsync(() -> sentimentData.stream()\n .filter(d -> d.text.contains(\":-(\"))\n .collect(Collectors.toList()));\n\n sentiment = happyTweets.thenCombine(sadTweets, (happyFilter, sadFilter) -> {\n if (happyFilter.size() / sentimentData.size() >= 0.7)\n return \":-)\";\n else if (sadFilter.size() / sentimentData.size() >= 0.7)\n return \":-(\";\n else\n return \":-|\";\n });\n\n return sentiment;\n }",
"private static boolean isMentionedIn(Attribute attr, Test t) {\n\n if (t == null) { \n return false;\n }\n if (t.m_attr == attr.index()) {\n return true;\n }\n return isMentionedIn(attr, t.m_next);\n }",
"public boolean tweet(Integer empId, String tweet) {\n\t\treturn tweetDAO.tweet(empId, tweet);\n\t}",
"public void tweet() {\r\n try {\r\n\r\n String twet = JOptionPane.showInputDialog(\"Tweett:\");\r\n Status status = twitter.updateStatus(twet);\r\n System.out.println(\"Successfully updated the status to [\" + status.getText() + \"].\");\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\n\tpublic void expectTwitterMessage(String username) {\n\t}",
"private Tweet() {\n this(\"\", -1, \"\", false);\n }",
"private void sendToCatFilm()\n {\n Toast.makeText(getApplicationContext(), \"No Results Found For 'Film'\", Toast.LENGTH_SHORT).show();\n }",
"public static boolean tarkastaSahkoposti(String posti)\r\n\t{\r\n\t\tboolean ok = false;\r\n\t\tif (posti != null && posti.trim().length() > 0 &&\r\n\t\t\t\tposti.trim().matches(\"\\\\w{1,}(-\\\\w{1,})?(.\\\\w{1,})?\\\\w{1,}(-\\\\w{1,})?\"\r\n\t\t\t\t\t\t\t+\"@\\\\w{1,}(-\\\\w{1,})?.[a-zA-Z]{2,3}\"))\r\n\t\t{\r\n\t\t\tok = true;\r\n\t\t}\r\n\t\treturn ok;\r\n\t}",
"private boolean isFiltered(String word) {\n boolean filtered = false;\n try {\n Float.parseFloat(word);\n filtered = true;\n } catch (NumberFormatException nfe) {\n }\n if (isAbbreviation(word) || PrefsHelper.isUpperCaseWordsIgnored()\n && isUpperCase(word)) {\n filtered = true;\n }\n // Takes care of the suffixed numbers e.g. 23rd, 45th, 1970s etc.\n filtered = Pattern.matches(\"[0-9]+(st|nd|rd|th|s)?\", word.toLowerCase());\n return filtered;\n }",
"@Override\n\tprotected boolean isStopword(String word) {\n\t\treturn this.stopwords.contains(word);\n\t}",
"private boolean userNotAlreadyFollowing(String url) {\n mStatusTextView.setText(\"\");\n\n if (WearFeedEntry.isFollowingUrl(url)) {\n mStatusTextView.setText(getActivity().getString(R.string.already_following_feed));\n return false;\n }\n\n return true;\n }",
"@SuppressWarnings(\"unused\")\r\n // used by JunitParams\r\n private\r\n Object[] badTweets() {\n return $($((String) null), $(TestDataReader.getString(\"NonJson1\")), $(\"\"),\r\n $(TestDataReader.getString(\"NonJson2\")),\r\n $(TestDataReader.getString(\"NoCreateDate\")),\r\n $(TestDataReader.getString(\"NoId\")),\r\n $(TestDataReader.getString(\"NoText\")));\r\n\r\n }"
] | [
"0.7483347",
"0.5966974",
"0.5550371",
"0.550401",
"0.5430357",
"0.5359727",
"0.532741",
"0.5271016",
"0.5212725",
"0.51556236",
"0.51428795",
"0.50577784",
"0.5015619",
"0.5011591",
"0.49604738",
"0.49277878",
"0.49014115",
"0.48928306",
"0.4878765",
"0.48762834",
"0.48577452",
"0.48465675",
"0.4845576",
"0.48451617",
"0.4841709",
"0.48399702",
"0.4834812",
"0.47865131",
"0.4781608",
"0.47789788",
"0.4756136",
"0.47321776",
"0.4724606",
"0.47159982",
"0.47159737",
"0.4710244",
"0.47036862",
"0.47023717",
"0.4696504",
"0.4692563",
"0.46925136",
"0.46923402",
"0.4691671",
"0.46916303",
"0.46904576",
"0.4683289",
"0.46811536",
"0.46798712",
"0.46788734",
"0.46771148",
"0.46678078",
"0.46572506",
"0.4656179",
"0.46530676",
"0.46401936",
"0.46398753",
"0.46336934",
"0.4630289",
"0.4626323",
"0.46188274",
"0.46162954",
"0.45620835",
"0.45550376",
"0.4554636",
"0.45452985",
"0.4544265",
"0.45403346",
"0.4532096",
"0.45316756",
"0.45275736",
"0.45229134",
"0.4521676",
"0.4518752",
"0.45175907",
"0.45106593",
"0.45075437",
"0.4507357",
"0.45060903",
"0.45009023",
"0.44974944",
"0.44968244",
"0.44956058",
"0.4493394",
"0.44906858",
"0.44867957",
"0.4480453",
"0.4479825",
"0.44787216",
"0.44717315",
"0.4469709",
"0.44695398",
"0.4466073",
"0.446429",
"0.4450132",
"0.44378692",
"0.44338617",
"0.44321835",
"0.442811",
"0.44263",
"0.44255996"
] | 0.76320976 | 0 |
Sets the minimal contrast considered to be readable, default is 1&46;5. | public void setMinReadableContrast(double minReadableContrast) {
_minReadableContrast = minReadableContrast;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setMethod( ContrastMethod method );",
"private void setLowSensitivity() {\n\t\tbuttonLowOn.setVisibility(View.VISIBLE);\n\t\tbuttonMedOn.setVisibility(View.INVISIBLE);\n\t\tbuttonHighOn.setVisibility(View.INVISIBLE);\n\t\t\n\t\tLUT[0] = 2;\n\t\tLUT[1] = (float)6;\n\t\tLUT[2] = (float)10;\n\t\tLUT[3] = (float)20;\n\t\tLUT[4] = (float)30;\n\t\tLUT[5] = (float)150;\n\t\tLUT[6] = (float)700;\n\t\tLUT[7] = (float)2000;\n\t\tLUT[8] = (float)4000;\n\t}",
"public void normalize(){\n\tstrength = 50;\n\tdefense = 55;\n\tattRating = 0.4\t;\n }",
"private void contrastEffect(int barra) {\n float val = barra / 40f;\n Log.i(\"kike\", \"valor efecte: \" + val + \" barra: \" + barra);\n EffectFactory factory = effectContext.getFactory();\n effect = factory.createEffect(EffectFactory.EFFECT_CONTRAST);\n effect.setParameter(\"contrast\", val);\n effect.apply(textures[0], photoWidth, photoHeight, textures[1]);\n }",
"@LargeTest\n public void testContrast() {\n TestAction ta = new TestAction(TestName.CONTRAST);\n runTest(ta, TestName.CONTRAST.name());\n }",
"public void setColourMin(String colourMin)\n {\n this.colourMin = colourMin;\n }",
"public void setStrength(int strength) {\n this.calories = strength;\n }",
"public void setMinAlturaCM(float max);",
"public void setIncreasedExposureMin(String increasedExposureMin) {\n\t\tthis.increasedExposureMin = increasedExposureMin;\n\t}",
"public void showSaturation()\r\n {\r\n\tshowSaturation(\"Saturation\");\r\n }",
"public void setStrength(float strength)\n {\n this.strength = strength;\n }",
"public void setSaturation (short[][] saturation)\r\n {\r\n\tthis.saturation = saturation;\r\n }",
"public void normalize(){\n\t_defense = originalDefense;\n\t_strength = originalStrength;\n }",
"@Override\n\tpublic int strength() {\n\t\treturn 1;\n\t}",
"void setNilWagerMinimum();",
"public void setQuality(int value) {\n this.quality = value;\n }",
"public void setColorAccordingToAge() {\n float brightness = (float) Math.max(0f, Math.min(1f, getLifetime() / fullbrightnessLifetime));\n Color color = Color.getHSBColor(.5f, 1f, brightness);\n setColor(color);\n }",
"@Override\n\tpublic void setMinCpus(int minCpus) {\n\t\t_scienceApp.setMinCpus(minCpus);\n\t}",
"public void setMin( float min )\n {\n this.min = min;\n show_text();\n }",
"public M csmiSexMin(Object min){this.put(\"csmiSexMin\", min);return this;}",
"private int adjustLightness(int color) {\n int red = Color.red(color);\n int green = Color.green(color);\n int blue = Color.blue(color);\n\n float hsl[] = new float[3];\n ColorUtils.RGBToHSL(red, green, blue, hsl);\n\n hsl[2] = 0.58f;\n\n return ColorUtils.HSLToColor(hsl);\n }",
"public void setQuality(float quality);",
"public void maximizeIntensity()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n\tdouble dbL = (double)(L-1);\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\t\tintensity[row][col] = (short)Math.min(L-1, \r\n\t\t Math.round((L-1) * maxIntensity(hue[row][col]/dbL,\r\n\t\t saturation[row][col]/dbL)));\r\n\t }\r\n\t}\r\n }",
"public void registerIllumination() {\n this.setDark(false);\n }",
"public String getColourMin()\n {\n return colourMin;\n }",
"public void setStrength(final int s) {\n this.strength = s;\n }",
"public Color brighter()\n {\n return color.brighter();\n }",
"public void setRarity(char newrareity)\n {\n rarity = newrareity;\n }",
"public void setInfluence(float val) {\n influence = 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}",
"Coding getPriorMaterial();",
"public static void setMinAcceptableNorm(double acceptNorm)\n\t{\n\t\tif((acceptNorm >= 0.001) && (acceptNorm <= 25)) minAcceptableNorm = acceptNorm;\n\t\telse minAcceptableNorm = GConstants.DEF_ACCEPTABLE_NORM;\n\t\t//\t\tSystem.out.println(\"acceptableNorm: \"+minAcceptableNorm);\n\t}",
"public void _setMin(float min)\r\n {\r\n if (valueClass.equals(Float.class))\r\n {\r\n setMinimum((int) (min * 100));\r\n } else\r\n {\r\n setMinimum((int) min);\r\n }\r\n }",
"public void setMinConf (float value) {\r\n min_conf = value; }",
"public void adjustIntensity()\r\n {\r\n\tint rows = getHeight();\r\n\tint cols = getWidth();\r\n\tdouble dbL = (double)(L-1);\r\n\tshort maxI;\r\n\tfor (int row = 0; row < rows; row++)\r\n\t{\r\n\t for (int col = 0; col < cols; col++)\r\n\t {\r\n\t\tmaxI = (short)Math.min(L-1, \r\n\t\t Math.round((L-1) * maxIntensity(hue[row][col]/dbL,\r\n\t\t saturation[row][col]/dbL)));\r\n\t\tintensity[row][col] =\r\n\t\t (short)Math.min(intensity[row][col], maxI);\r\n\t }\r\n\t}\r\n }",
"public int setSilicateMin(Integer silicateMin) {\n try {\n setSilicateMin(silicateMin.floatValue());\n } catch (Exception e) {\n setSilicateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMinError;\n }",
"public int setSilicateMin(Float silicateMin) {\n try {\n setSilicateMin(silicateMin.floatValue());\n } catch (Exception e) {\n setSilicateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMinError;\n }",
"public void setIllumination(Float illumination) {\n this.illumination = illumination;\n }",
"public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }",
"public void specialize(){\n\tdefense *= .6;\n\tattRating *= 1.4;\n\tif ( attRating > 2.0){\n\t attRating = 2.0;\n\t}\n }",
"void setNilFractionalMinimum();",
"public void\nsetEmissiveElt( SbColor color )\n\n{\n coinstate.emissive.copyFrom(color);\n}",
"int getStrength();",
"int getStrength();",
"public int setSilicateMin(String silicateMin) {\n try {\n setSilicateMin(new Float(silicateMin).floatValue());\n } catch (Exception e) {\n setSilicateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return silicateMinError;\n }",
"public void resetLowerface() {\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setSmile(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setClench(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setSmirkLeft(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setSmirkRight(0);\n\t\tdetectionModel.getPrimaryDataModel().getExpressiveDataModel().setLaugh(0);\n\t}",
"public void setHandThrowDamage(short handThrowDamage);",
"public void setSaturation ( float value ) {\n\t\texecute ( handle -> handle.setSaturation ( value ) );\n\t}",
"public EducationalLevel setEducationalLevel(String education) {\n switch (education.split(\"\\\\s+\")[0]) {\n case \"Primary\":\n return EducationalLevel.Primary;\n case \"Secondary\":\n return EducationalLevel.Secondary;\n default:\n return EducationalLevel.JC;\n }\n }",
"void setNilSingleBetMinimum();",
"public void changeStrength(int newStrength) {\n\t\tthis.currentStrength = newStrength;\n\t}",
"public void setLowExposure(String lowExposure) {\n\t\tif (lowExposure != null && !lowExposure.isEmpty()) {\n\t\t\tif (lowExposure.equals(LOW_EXPOSURE_MARKER))\n\t\t\t\tthis.lowExposure = true;\n\t\t}\n\t}",
"public int setNitrateMin(Integer nitrateMin) {\n try {\n setNitrateMin(nitrateMin.floatValue());\n } catch (Exception e) {\n setNitrateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMinError;\n }",
"public String setLetraDaGrade()\r\n\t{\r\n\t\tString letraDaGrade = \"\";\r\n\t\t\r\n\t\tif(media >= 90.0)\r\n\t\t\tletraDaGrade = \"A\";\r\n\t\telse if (media >= 80.0)\r\n\t\t\tletraDaGrade = \"B\";\r\n\t\telse if (media >= 70.0)\r\n\t\t\tletraDaGrade = \"C\";\r\n\t\telse if (media >= 60.0)\r\n\t\t\tletraDaGrade = \"D\";\r\n\t\telse\r\n\t\t\tletraDaGrade = \"F\";\r\n\t\t\r\n\t\treturn letraDaGrade;\r\n\t}",
"private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }",
"private void setSilicateMinError (float silicateMin, Exception e, int error) {\n this.silicateMin = silicateMin;\n silicateMinErrorMessage = e.toString();\n silicateMinError = error;\n }",
"public void SetMinVal(int min_val);",
"public float getMinMixingFactor() {\n return 0;\n }",
"public void setMinRating(int minRating) {\n this.minRating = minRating;\n }",
"protected double getIlluminance() {\n double maxStep = 10.0;\n double randomChange = Math.random() * maxStep - maxStep / 2.0;\n\n illuminance = Math.min(Math.max(illuminance + randomChange, 0.0), 100.0);\n\n return illuminance;\n }",
"public void setAdc_min (int min)\n {\n adc_min_ = min;\n }",
"public int setNitrateMin(Float nitrateMin) {\n try {\n setNitrateMin(nitrateMin.floatValue());\n } catch (Exception e) {\n setNitrateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMinError;\n }",
"public void param_value_min_SET(float src)\n { set_bytes(Float.floatToIntBits(src) & -1L, 4, data, 13); }",
"public int setNitrateMin(String nitrateMin) {\n try {\n setNitrateMin(new Float(nitrateMin).floatValue());\n } catch (Exception e) {\n setNitrateMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return nitrateMinError;\n }",
"@Override\n public void easyMode() {\n super.setHP(900);\n super.getFrontAttack().setBaseDamage(18.75);\n super.getRightAttack().setBaseDamage(18.75);\n super.getBackAttack().setBaseDamage(18.75);\n super.getLeftAttack().setBaseDamage(18.75);\n }",
"public void setSaturation(double saturation) {\n checkArgument(0.0 <= saturation && saturation <= 1.0,\n \"Saturation must be between 0.0 and 1.0 inclusive.\");\n this.saturation = saturation;\n updateColors();\n }",
"public void setMinimal_enroll_scoring(Double minimal_enroll_scoring) {\n this.minimal_enroll_scoring = minimal_enroll_scoring;\n }",
"public void setQuality(int value)\n\t{\n\t\tconfigManager.setQuality(value);\n\t\tupdatePreviewSize();\n\t}",
"public int getStrength() { return strength; }",
"public void setLowerThreshold(int setLowerThreshold) {\r\n\t\tthis.lowerThreshold = setLowerThreshold;\t\t\r\n\t}",
"public void setExpandGrayAlpha(boolean expandGrayAlpha) {\n/* 311 */ this.expandGrayAlpha = expandGrayAlpha;\n/* */ }",
"java.lang.String getQuality();",
"void setColorDepth(int colorDepth);",
"public void setMale(int value) {\n this.male = value;\n }",
"public Builder setStrength(int value) {\n bitField0_ |= 0x00000010;\n strength_ = value;\n onChanged();\n return this;\n }",
"public BatchSummarizer setMinRiskRatio(double minRiskRatio) {\n this.minRiskRatio = minRiskRatio;\n return this;\n }",
"public void setLitWeightRatio(double ratio) { this.exec = this.exec.withProperty(\"sm.improve.lwr\", ratio); }",
"public void set_min(byte value) {\n setSIntBEElement(offsetBits_min(), 8, value);\n }",
"public void setMaxAlturaCM(float max);",
"public void setBrightness(float bri) {\r\n\t\thsb[2] = bri;\r\n\t}",
"private void applyInitialLook() {\r\n\t\tthis.control.setFont(this.initialFont);\r\n\t\tthis.control.setBackground(this.initialBackgroundColor);\r\n\t\tthis.control.setForeground(this.initialForegroundColor);\r\n\t}",
"void xsetColorDepth(com.microsoft.schemas.office.x2006.digsig.STPositiveInteger colorDepth);",
"public float getBrightness(float p_70013_1_) {\n/* 202 */ return super.getBrightness(p_70013_1_);\n/* */ }",
"public void setAbsDFMin(double dFMinimal, int nMax) throws OptimizerException\n {\n setMaxIntRed(nMax); // \"emergency break\"\n dFMin = dFMinimal;\n stoCri = 1;\n }",
"public void setExhaustionLevel(float f) {\n this.c = Math.min(f, 40f);\n }",
"public void setMinWeight(double inMinWeight) {\n minWeight = inMinWeight;\n }",
"@Override \n\tpublic void setNormalColor(){\n\t\tthis.setColor(Color.PINK);\n\t}",
"public void setQuality(Integer quality) {\n this.quality = quality;\n }",
"public int setChlorophyllMin(Integer chlorophyllMin) {\n try {\n setChlorophyllMin(chlorophyllMin.floatValue());\n } catch (Exception e) {\n setChlorophyllMinError(FLOATNULL, e, ERROR_SYSTEM);\n } // try\n return chlorophyllMinError;\n }",
"@Override\n public int strengthBonus() {\n\treturn 4;\n }",
"public void setSiegeWeaponDamage(short siegeWeaponDamage);",
"public void setHue (short[][] hue)\r\n {\r\n\tthis.hue = hue;\r\n }",
"public void setPwrrescat( java.lang.String newValue ) {\n __setCache(\"pwrrescat\", newValue);\n }",
"public void setMinConf(int minConf) {\r\n\t\tthis.minConf = minConf;\r\n\t}",
"public static void clampStencilValue(\n int maximumValue\n ) {\n GL11.glStencilFunc(GL_LESS, maximumValue, 0xFF);\n \n //if stencil test passed, encode the stencil value\n GL11.glStencilOp(GL_KEEP, GL_REPLACE, GL_REPLACE);\n \n //do not manipulate the depth packetBuffer\n GL11.glDepthMask(false);\n \n //do not manipulate the color packetBuffer\n GL11.glColorMask(false, false, false, false);\n \n GlStateManager.disableDepthTest();\n \n MyRenderHelper.renderScreenTriangle();\n \n GL11.glDepthMask(true);\n \n GL11.glColorMask(true, true, true, true);\n \n GlStateManager.enableDepthTest();\n }",
"public void setIncreasedExposureMax(String increasedExposureMax) {\n\t\tthis.increasedExposureMax = increasedExposureMax;\n\t}",
"private ColorAdjust __setSaturation(double saturation) {\n ColorAdjust colorAdjust = new ColorAdjust();\n colorAdjust.setSaturation(saturation);\n return colorAdjust;\n }",
"private void setSentivity(int sens, AppCompatActivity context) {\n Graphic.getInstance().sensitivityOfRecognition =\n context.getResources().getInteger(R.integer.max_sensitivity) - sens;\n }",
"public float getSilicateMin() {\n return silicateMin;\n }",
"private void setNitrateMinError (float nitrateMin, Exception e, int error) {\n this.nitrateMin = nitrateMin;\n nitrateMinErrorMessage = e.toString();\n nitrateMinError = error;\n }"
] | [
"0.59014416",
"0.5583376",
"0.54684615",
"0.54657805",
"0.53622055",
"0.53453714",
"0.5251359",
"0.51986974",
"0.50775415",
"0.50704205",
"0.5047973",
"0.5038472",
"0.50079703",
"0.4998091",
"0.4980593",
"0.49685907",
"0.49430782",
"0.49414733",
"0.49224973",
"0.48786962",
"0.48765424",
"0.48713914",
"0.4870272",
"0.4867503",
"0.48612502",
"0.48597816",
"0.48577017",
"0.4842011",
"0.4838003",
"0.48379382",
"0.4823819",
"0.47963786",
"0.47949082",
"0.4791049",
"0.47894838",
"0.4787883",
"0.47851783",
"0.4765782",
"0.47594914",
"0.4756797",
"0.47552535",
"0.4753237",
"0.47460943",
"0.47460943",
"0.47425234",
"0.47367218",
"0.473524",
"0.47279507",
"0.47274876",
"0.47269496",
"0.47240436",
"0.4719849",
"0.47133863",
"0.470838",
"0.46980047",
"0.46956664",
"0.4686283",
"0.46743727",
"0.4668432",
"0.46661574",
"0.46651548",
"0.46581566",
"0.46549168",
"0.4651702",
"0.4650018",
"0.46429974",
"0.4638889",
"0.46387506",
"0.4634029",
"0.46278912",
"0.46093228",
"0.460711",
"0.46011132",
"0.4599111",
"0.4598898",
"0.45983496",
"0.45956656",
"0.45926306",
"0.45848104",
"0.4583836",
"0.45560497",
"0.4554518",
"0.45528263",
"0.454805",
"0.4545039",
"0.4542913",
"0.45412824",
"0.45342225",
"0.45333135",
"0.4530584",
"0.45303315",
"0.45295596",
"0.45270282",
"0.45243415",
"0.45226708",
"0.45068392",
"0.450508",
"0.4502855",
"0.44995397",
"0.44975004"
] | 0.7395692 | 0 |
Simplest way is by using a helper | Object writeReplace() {
return NodeSerialization.from(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Helper getHelper() {\r\n return this.helper;\r\n }",
"private Helper() {\r\n // empty\r\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"private HelperLocation() {}",
"java.lang.String getHowToUse();",
"java.lang.String getHowToUse();",
"private static void LessonInstanceVsStatic() {\n System.out.println(MathHelper.E);\n System.out.println(MathHelper.PI);\n System.out.println(MathHelper.square(5));\n //Three helper methods for StringHelper\n System.out.println(StringHelper.removeLeadingAndTrailingSpaces(\" Hello \"));\n System.out.println(StringHelper.removeAllSpace(\" He ll o !\"));\n System.out.println(StringHelper.yelling(\"hello\"));\n //Three helper methods for MathHelper\n System.out.println(MathHelper.cubed(5));\n System.out.println(MathHelper.areaOfRectangle(2,3));\n System.out.println(MathHelper.perimeterOfRectangle(4, 5));\n\n }",
"@Test\n public void testCompareTest12a() {\n helperMethoda(\"CompareTest12a.txt\", \"CompareTest12b.txt\");\n }",
"String template();",
"@Test\n public void testCompareTest4a() {\n helperMethoda(\"CompareTest4a.txt\", \"CompareTest4b.txt\");\n }",
"private Helper() {\r\n // do nothing\r\n }",
"@Test\n public void testCompareTest10a() {\n helperMethoda(\"CompareTest10a.txt\", \"CompareTest10b.txt\");\n }",
"@Test\n public void testCompareTest1a() {\n helperMethoda(\"CompareTest1a.txt\", \"CompareTest1b.txt\");\n }",
"@Test\n public void testCompareTest6a() {\n helperMethoda(\"CompareTest6a.txt\", \"CompareTest6b.txt\");\n }",
"@Test\n public void testCompareTest5a() {\n helperMethoda(\"CompareTest5a.txt\", \"CompareTest5b.txt\");\n }",
"@Test\n public void testCompareTest7a() {\n helperMethoda(\"CompareTest7a.txt\", \"CompareTest7b.txt\");\n }",
"@Test\n public void testCompareTest9a() {\n helperMethoda(\"CompareTest9a.txt\", \"CompareTest9b.txt\");\n }",
"@Test\n public void testCompareTest3a() {\n helperMethoda(\"CompareTest3a.txt\", \"CompareTest3b.txt\");\n }",
"@Test\n public void testCompareTest2a() {\n helperMethoda(\"CompareTest2a.txt\", \"CompareTest2b.txt\");\n }",
"@Test\n public void testCompareTest12b() {\n helperMethodb(\"CompareTest12a.txt\", \"CompareTest12b.txt\");\n }",
"@Test\n public void testCompareTest1b() {\n helperMethodb(\"CompareTest1a.txt\", \"CompareTest1b.txt\");\n }",
"@Test\n public void testCompareTest4b() {\n helperMethodb(\"CompareTest4a.txt\", \"CompareTest4b.txt\");\n }",
"@Test\n public void testCompareTest8a() {\n helperMethoda(\"CompareTest8a.txt\", \"CompareTest8b.txt\");\n }",
"@Test\n public void testCompareTest10b() {\n helperMethodb(\"CompareTest10a.txt\", \"CompareTest10b.txt\");\n }",
"@Test\n public void testCompareTest6b() {\n helperMethodb(\"CompareTest6a.txt\", \"CompareTest6b.txt\");\n }",
"public void test17() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }",
"private String helper(int num) {\n if (num == 0) {\n // return empty string here so that we can append a white\n // space in the next if \n return \"\"; \n }\n \n if (num < 20) {\n return LESS_THAN_20[num] + \" \";\n }\n \n if (num < 100) {\n // use helper on num%10 instead of LESS_THAN_20[num%10] so that\n // white space is handled properly\n return TENS[num / 10] + \" \" + helper(num % 10);\n }\n \n return LESS_THAN_20[num / 100] + \" Hundred \" + helper(num % 100);\n }",
"public interface DealsImportedSummaryControllerHelper {\n\n SummaryDto searchDealsSummary(String fileName);\n\n}",
"@Test\n public void testCompareTest2b() {\n helperMethodb(\"CompareTest2a.txt\", \"CompareTest2b.txt\");\n }",
"@Test\n public void testCompareTest3b() {\n helperMethodb(\"CompareTest3a.txt\", \"CompareTest3b.txt\");\n }",
"@Test\n public void testCompareTest5b() {\n helperMethodb(\"CompareTest5a.txt\", \"CompareTest5b.txt\");\n }",
"public void test18() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }",
"public void test19() throws Exception {\n helper1(new String[] {\"b\", \"i\"}\r\n , new String[] {\"I\", \"Z\"}\r\n , false, 0);\r\n }",
"public abstract String use();",
"@Test\n public void testCompareTest9b() {\n helperMethodb(\"CompareTest9a.txt\", \"CompareTest9b.txt\");\n }",
"void mo25969f(TemplateInfo templateInfo);",
"@Test\n public void testCompareTest7b() {\n helperMethodb(\"CompareTest7a.txt\", \"CompareTest7b.txt\");\n }",
"public UrlPathHelper getUrlPathHelper()\n/* */ {\n/* 544 */ return this.urlPathHelper;\n/* */ }",
"public void addHelper(Helper helper) {\r\n myHelpers.add(helper);\r\n }",
"lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();",
"lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();",
"lanyotech.cn.park.protoc.CommonProtoc.PageHelper getPageHelper();",
"public TemplateHelper() {\r\t\tsuper();\r\t}",
"@Test\r\n public void test_concat() {\r\n String res = Helper.concat(\"str\", 1, \"str\", \"2\");\r\n\r\n assertEquals(\"'concat' should be correct.\", \"str1str2\", res);\r\n }",
"default void show1() {\n\t\t\n\t\t\n\t}",
"public interface City56Helper {\n}",
"public abstract T mo36028b(Context context);",
"private TempExpressionHelper() {\r\n\t}",
"@Test\n public void testCompareTest8b() {\n helperMethodb(\"CompareTest8a.txt\", \"CompareTest8b.txt\");\n }",
"public abstract String division();",
"public abstract String mo9239aw();",
"public interface CreditHelper {\n\n public Integer getCreditCount();\n\n}",
"String getTemplate();",
"public interface MessageHelper {\n void showMessage(final String message);\n}",
"public static <T> T genericDisplayMethod(T a){\n System.out.println(a);\n return a;\n }",
"String getSFunc();",
"abstract String display(T value);",
"void mo12147a(View view);",
"public interface InputHelper {\n\n Random random = new Random();\n Scanner scanner = new Scanner(System.in);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n int getInteger(String message);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n String getString(String message);\n\n /**\n * @param message information about type format\n * @return filled input value\n */\n boolean getBoolean(String message);\n}",
"protected abstract void executeHelper();",
"public abstract String getFirstNameAndLastName(T itemVO);",
"String displayValue();",
"public static void thisDemo() {\n\t}",
"@FunctionalInterface // or we can call it SAM\r\n interface ShowMe{\r\n\t\r\n\t void showOk();\r\n\t \r\n\tpublic default void one()\r\n\t {\r\n\t System.out.println(\"method one \");\r\n };\r\n \r\n public static void one1()\r\n {\r\n System.out.println(\"method one 1 \");\r\n };\r\n \r\n public default void one2()\r\n \t {\r\n \t System.out.println(\"method one2 \");\r\n };\r\n \r\n }",
"public interface NameGenerationHelper {\n\n /**\n * Basic name generation method, usually called by back-end methods or actions to generate a node name based\n * on the type\n * @param parent the parent object for which to create a new node name for a new child object\n * @param nodeType the node type of the new child object\n * @return a String containing the generated node name\n */\n String generatNodeName(JCRNodeWrapper parent, String nodeType);\n\n /**\n * Name generation method used mostly by Jahia's UI to generate node names based on the node type or the target\n * name. This method is passed the default language because it might use it to make resource bundle lookups to\n * generate the node name based on the node type.\n * The targetName is the name of the module that was specified in the view if it was set. This might be useful\n * to use as a node name in the case of more specific definitions\n * @param parent the parent object for which to create a new node name for a new child object\n * @param defaultLanguage the language code for the default language\n * @param nodeType the node type of the new child object\n * @param targetName the name of the module for the child node as specified in the definition (maybe be \"*\" if\n * any name is allowed or null if no targetName was specified at all).\n * @return a String containing the generated node name\n */\n String generatNodeName(JCRNodeWrapper parent, String defaultLanguage, ExtendedNodeType nodeType, String targetName);\n}",
"public abstract View mo2155b();",
"String note();",
"private Object wrapperObject(final String item)\n {\n return new Object()\n {\n public String toString()\n {\n return item;\n }\n };\n }",
"public abstract String tiposervicio();",
"abstract int pregnancy();",
"public String elegir();",
"public abstract String generate(Object... args);",
"public static void demo() {\n\t\tlab_2_2_5();\n\n\t}",
"protected String elaboraTemplate(String testoIn) {\n return testoIn;\n }",
"private stendhal() {\n\t}",
"@Test\n public void testCheckNull() {\n Helper.checkNull(\"non-null\", \"non-null name\");\n }",
"public String wantDetail();",
"Simple createSimple();",
"@FunctionalInterface\npublic interface ViewProcess {\n public static final ViewProcess EMPTY = (config , req , resp , view) -> {\n };\n\n void process(ServletConfig config , HttpServletRequest request , HttpServletResponse response , View view) throws ServletException , IOException;\n}",
"public View getGraphicAfter(T anItem)\n{\n Image img = getImageAfter(anItem);\n return img!=null? new ImageView(img) : null;\n}",
"public View getGraphic(T anItem)\n{\n Image img = getImage(anItem);\n return img!=null? new ImageView(img) : null;\n}",
"private FormatUtilities() {}",
"public static String getFoo() {\n return \"foo\";\n }",
"public interface FunnyPresenter {\n\n /**\n * @param currentPage\n * @param time yyyyMMddHHmmss\n */\n void getFunny(String url, int currentPage, String time);\n}",
"public static void doExercise1() {\n // TODO: Complete Exercise 1 Below\n\n }",
"private void Nice(){\n }",
"protected abstract T mo2623i();",
"default boolean isEven(int a){\n return a % 2 ==0;\n }",
"abstract Function get(Object arg);",
"private static void oneUserExample()\t{\n\t}",
"public void smell() {\n\t\t\n\t}",
"public abstract String mo83558a(Object obj);",
"public static void doExercise2() {\n // TODO: Complete Exercise 2 Below\n\n }",
"private T getHelper(T item, BSTNode<T> currentNode) {\n\t\tif (currentNode == null) {\n\t\t\treturn null;\n\t\t} else if (item.compareTo(currentNode.getData()) > 0) {\n\t\t\treturn getHelper(item, currentNode.getRight());\n\t\t} else if (item.compareTo(currentNode.getData()) < 0) {\n\t\t\treturn getHelper(item, currentNode.getLeft());\n\t\t} else {\n\t\t\treturn currentNode.getData();\n\t\t}\n\t}",
"Foreach createForeach();",
"String processing();",
"public static void helpermethod(int numberofsteps){\n ways(numberofsteps, 0, \"[\");\r\n }",
"String getPlaceholder();",
"private Util() { }",
"T mo26439a();"
] | [
"0.564679",
"0.5518978",
"0.53986055",
"0.53986055",
"0.5208945",
"0.5136622",
"0.5136622",
"0.51252335",
"0.50834996",
"0.50728655",
"0.50629103",
"0.50614667",
"0.50291646",
"0.50218415",
"0.50064456",
"0.4999785",
"0.49976873",
"0.49884528",
"0.4975991",
"0.49467304",
"0.4942277",
"0.49271566",
"0.49038875",
"0.49004745",
"0.48819923",
"0.48693168",
"0.4869113",
"0.4861708",
"0.48420882",
"0.4831081",
"0.483038",
"0.48296273",
"0.48228443",
"0.4819686",
"0.4803539",
"0.4802565",
"0.48019287",
"0.47999537",
"0.47904566",
"0.4761427",
"0.47211233",
"0.47211233",
"0.47211233",
"0.47193456",
"0.46738064",
"0.46696383",
"0.46660912",
"0.4659459",
"0.4657172",
"0.46524143",
"0.4648374",
"0.46260923",
"0.46197337",
"0.46136123",
"0.4610343",
"0.46082553",
"0.46025878",
"0.45942998",
"0.45895225",
"0.45890135",
"0.45885134",
"0.458444",
"0.45774573",
"0.45750332",
"0.45747745",
"0.4573872",
"0.45670712",
"0.4565053",
"0.45645392",
"0.45499644",
"0.45495325",
"0.4533348",
"0.45286828",
"0.45269752",
"0.45215112",
"0.4499296",
"0.44963962",
"0.44963545",
"0.44951546",
"0.4485066",
"0.4483021",
"0.44805658",
"0.44782987",
"0.44732475",
"0.44631684",
"0.44605136",
"0.44603854",
"0.4453259",
"0.44493544",
"0.44433618",
"0.44404507",
"0.44339034",
"0.44319662",
"0.44253767",
"0.4414122",
"0.44056922",
"0.4405412",
"0.43980974",
"0.43977126",
"0.4396189",
"0.43941867"
] | 0.0 | -1 |
/ / Defaulting for introspection | @Override
public boolean isMissingNode() { return false; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ospector\n{\n\n public abstract void addAbstractTypeResolver(AbstractTypeResolver abstracttyperesolver);\n\n public abstract void addBeanDeserializerModifier(BeanDeserializerModifier beandeserializermodifier);\n\n public abstract void addBeanSerializerModifier(BeanSerializerModifier beanserializermodifier);\n\n public abstract void addDeserializationProblemHandler(DeserializationProblemHandler deserializationproblemhandler);\n\n public abstract void addDeserializers(Deserializers deserializers);\n\n public abstract void addKeyDeserializers(KeyDeserializers keydeserializers);\n\n public abstract void addKeySerializers(Serializers serializers);\n\n public abstract void addSerializers(Serializers serializers);\n\n public abstract void addTypeModifier(TypeModifier typemodifier);\n\n public abstract void addValueInstantiators(ValueInstantiators valueinstantiators);\n\n public abstract void appendAnnotationIntrospector(AnnotationIntrospector annotationintrospector);\n\n public abstract w getMapperVersion();\n\n public abstract s getOwner();\n\n public abstract TypeFactory getTypeFactory();\n\n public abstract void insertAnnotationIntrospector(AnnotationIntrospector annotationintrospector);\n\n public abstract boolean isEnabled(f f);\n\n public abstract boolean isEnabled(i i);\n\n public abstract boolean isEnabled(n n);\n\n public abstract boolean isEnabled(DeserializationFeature deserializationfeature);\n\n public abstract boolean isEnabled(MapperFeature mapperfeature);\n\n public abstract boolean isEnabled(SerializationFeature serializationfeature);\n\n public transient abstract void registerSubtypes(NamedType anamedtype[]);\n\n public transient abstract void registerSubtypes(Class aclass[]);\n\n public abstract void setClassIntrospector(ClassIntrospector classintrospector);\n\n public abstract void setMixInAnnotations(Class class1, Class class2);\n}",
"private Inspect() {\n }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private Infer() {\n\n }",
"private stendhal() {\n\t}",
"public abstract String getObjectType();",
"private Default()\n {}",
"public void setupConvenienceObjects();",
"interface ResourceClassIntrospector {\n \n /**\n * Initializes the recipient introspector.\n * @param reflectionService reflection service\n */\n void init(ReflectionService reflectionService);\n \n /**\n * Produces a set of resource method descriptors for the given resource\n * class.\n * <p>\n * An implementation of this method must traverse classes identified by\n * subresource locators to produce the complete set of resource methods \n * reachable from the given resource class.\n * \n * @param path path of the resource specified by {@code resourceClass}\n * @param resourceClass the subject resource class\n * @return set of resource method descriptors\n */\n Set<ResourceDescriptor> describe(String path, Class<?> resourceClass);\n \n}",
"default String display() { //just wanted to try out default methods we learned in class here-- abstract format below\r\n\t\treturn \"Nothing to show here\";\r\n\t}",
"private GetMyInfo()\r\n/* 13: */ {\r\n/* 14:13 */ super(new APITag[] { APITag.INFO }, new String[0]);\r\n/* 15: */ }",
"java.lang.String getHowToUse();",
"java.lang.String getHowToUse();",
"default void init() {\n }",
"default void display1(){\n\t\tSystem.out.println(\"Default Method inside interface\");\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@ReflectionDisable\npublic interface BaseObjectNominal extends BaseObjectNoOwnProperties {\n\n\t@Override\n\t@ReflectionHidden\n\tdefault String baseClass() {\n\n\t\treturn this.getClass().getSimpleName();\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitive<?> name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final CharSequence name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseProperty baseFindProperty(final String name, final BaseObject stop) {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\tdefault BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject baseGet(final String name, final BaseObject defaultValue) {\n\n\t\treturn defaultValue;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BaseObject basePrototype() {\n\n\t\treturn null;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveNumber baseToNumber() {\n\n\t\treturn BasePrimitiveNumber.NAN;\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault BasePrimitiveString baseToString() {\n\n\t\treturn Base.forString(this.toString());\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault Object baseValue() {\n\n\t\treturn this;\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\t@ReflectionHidden\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx,\n\t\t\tfinal CharSequence name,\n\t\t\tfinal BaseObject originalIfKnown,\n\t\t\tfinal BaseObject defaultValue,\n\t\t\tfinal ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n\t@Override\n\tdefault ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) {\n\n\t\treturn store.execReturn(ctx, defaultValue);\n\t}\n\n}",
"Object getVerbose();",
"Object getVerbose();",
"public void _default(Object parser, Object data) {\n }",
"public java.lang.String getIntrospectionSource() {\n return introspectionSource;\n }",
"Object yangAugmentedInfo(Class classObject);",
"Object yangAugmentedInfo(Class classObject);",
"Map<String, Object> swagger();",
"public interface IntrospectionFactory {\n\n /**\n * Shortcut for first parameter in parameter property path.\n */\n String ZERO_PARAMETER_ALIAS = \"value\";\n\n /**\n * Check if given introspection factory supports abstract classes or not.\n * @return {@literal true} if given introspection factory supports abstract\n * classes, otherwise only interface-driven mappers are supported.\n */\n boolean isAbstractClassesSupported();\n\n /**\n * Build setter instance.\n * \n * @param beanClass bean class\n * @param path nested property path\n * @return setter instance\n */\n Setter buildSetter(Class<?> beanClass, String path);\n\n /**\n * Build getter instance.\n * \n * @param beanClass bean class\n * @param path nested property path\n * @return getter instance\n */\n Getter buildGetter(Class<?> beanClass, String path);\n\n /**\n * Build parameter getter instance.\n * \n * @param types parameter types\n * @param path nested property path\n * @return getter instance\n */\n Getter buildParameterGetter(Type[] types, String path);\n\n /**\n * Build parameter setter instance. TODO: Write test on this!\n * \n * @param types parameter types\n * @param path nested property path\n * @return setter instance\n */\n Setter buildParameterSetter(Type[] types, String path);\n\n /**\n * Get property type.\n * \n * @param beanClass bean class\n * @param property nested property path\n * @return property type\n */\n Type getPropertyType(Class<?> beanClass, String property);\n\n /**\n * Get property type from parameter-based property path.\n * \n * @param types parameter types\n * @param path nested property path\n * @return property type\n */\n Type getParameterType(Type[] types, String path);\n\n /**\n * Create mapper instance.\n * \n * @param <T> mapper type\n * @param interfaze mapper interface\n * @param config mapper configuration\n * @param delegate query delegate\n * @return mapper instance\n */\n <T> T createMapper(Class<T> interfaze, InternalConfiguration config, QueryDelegate delegate);\n}",
"@Override\n\t\tpublic void rest() {\n\t\t\t\n\t\t}",
"public java.lang.String getIntrospectionSource() {\n return introspectionSource;\n }",
"public void identify() {\n\n\t}",
"public interface Management {\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n void createHandler(final String handlerClassName);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n void deleteHandler(final String handlerName);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n void updateHandler(final String handlerName);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n Logger getLogger(final String loggerName);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n void closeHandler(final String handlerName);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n Handler getHandler(final String handlerName);\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n Map<String, Logger> loggers();\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n Map<String, Handler> handlers();\n\n /**\n * This is a method description.\n *\n * <p>Another description after blank line.\n *\n * @author admin\n */\n ClassLoaderLogInfo getClassLoaderLogInfo();\n}",
"private TypicalPersons() {}",
"private TypicalPersons() {}",
"private Get() {}",
"private Get() {}",
"public interface Visitor {\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param user\n */\n void visit(User user);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param entitlement\n */\n void visit(Entitlement entitlement);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param authToken\n */\n void visit(AuthToken authToken);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @param resource\n */\n void visit(Resource resource);\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isValidStatus();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isValidExpTime();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isHasPermissions();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n boolean isHasResources();\n\n /**\n * please refer to the java doc inside the implementation classes\n * @return\n */\n User getUserUnderValidation();\n\n}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public String describe() {\n return null;\n }",
"String getDefaultType();",
"@Override\n\tpublic ISpecies getDefault() {\n\t\treturn null;\n\t}",
"BasicRestAnnotation() {\n\t}",
"Object getClass_();",
"Object getClass_();",
"private ControllerInfoImpl() {\r\n\t\tthis.identifyControllerType();\r\n\t}",
"Objet getObjetAlloue();",
"private MetallicityUtils() {\n\t\t\n\t}",
"default void printMyName(){ // interfaces can have only 1 method type with body and have default prefix as a keyword\n System.out.println(\"My name is bla bla\");\n }",
"Information getInfo();",
"public abstract Class getDescriptedClass();",
"default public String strandInfo() {\n\t\treturn this.getClass().getName();\n\t}",
"public abstract AnnotationMap mo30683d();",
"abstract public T getInfo();",
"public abstract Annotations mo30682c();",
"default void show1() {\n \tSystem.out.println(\"show default\");\n }",
"default boolean isSpecial() { return false; }",
"public E16_OverloadJavaDoc() {\n System.out.println(\"Planting a seedling\");\n }",
"public abstract Object mo1771a();",
"public abstract String usage();",
"String getDefaultAlias();",
"public abstract String getDefinition();",
"private Mongopool() {\n\t}",
"private void readObject() {\n\t\t/* default - does nothing empty block */}",
"private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }",
"@Override\n\tprotected void initForInspect(AWRequestContext requestContext) {\n\n\t}",
"public static void objectDemo() {\n\t}",
"@Override\n protected void prot() {\n }",
"public OOP_207(){\n\n }",
"public Lexicon lex()\n/* */ {\n/* 505 */ return new BaseLexicon();\n/* */ }",
"public Object caseDevelopmentMethod(DevelopmentMethod object) {\n\t\treturn null;\n\t}",
"public interface IDescriptorViewer\r\n{\r\n\t/**\r\n\t * Get the description for this descriptor\r\n\t * @return\r\n\t */\r\n\tpublic String getDescription();\r\n\t\r\n\t@Override\r\n\tpublic String toString();\r\n}",
"private ImagingActionsParser() {\n\t\t// private constructor.\n\t}",
"public ObjectInfo getObjectInfo();",
"private static void Demo1() {\n\t\tPerson person = new Person();\r\n\t\tSystem.out.println(\"类名:\" + person.getClass().getName());\r\n\t\tSystem.out.println(\"包名:\" + person.getClass().getPackage().getName());\r\n\r\n\t}",
"public void analyseAnnotations(AbsIoc ioc){\n\t\t//0. makeup a cache first\n\t\tMap<String, IocObject> cacheMap = new HashMap<String, IocObject>();\n\t\tIocObject iocObj = null;\n\t\tfor(Class<?> cl : list){\n\t\t\tiocObj = new IocObject();\n\t\t\tiocObj.setType(cl);\n\t\t\t//1.tell if there is an IocBean \n\t\t\tif(!cl.isAnnotationPresent(IocBean.class))\n\t\t\t\tcontinue ;\n\t\t\t//2.if have the class name\n\t\t\tIocBean bean = cl.getAnnotation(IocBean.class);\n\t\t\tif(StringHandler.isEmpty(bean))\n\t\t\t\tcontinue ;\n\t\t\tString className = bean.name();\n\t\t\tif(StringHandler.isEmpty(className))\n\t\t\t\tclassName = cl.getSimpleName(); //if no name has been set, then use simple name\n\t\t\t\n\t\t\t//3. scope properties, here only use default properties\n\t\t\tif(cl.isAnnotationPresent(IocScope.class)){\n\t\t\t\tIocScope scope = cl.getAnnotation(IocScope.class);\n\t\t\t\tString val = scope.value();\n\t\t\t\t//default is singleton\n\t\t\t\tif(StringHandler.isEmpty(val)) \n\t\t\t\t\tval = \"singleton\"; \n\t\t\t\t\n\t\t\t\tiocObj.scope = val.trim();\n\t\t\t}\n\t\t\t\n\t\t\t//4. initial a instance\n\t\t\ttry {\n\t\t\t\tif(iocObj.scope.equals(\"singleton\"))\n\t\t\t\t\tiocObj.instanceObj = cl.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t//XXX later change to logger\n\t\t\tSystem.out.println(\"success load class: \" + cl.getName());\n\t\t\tcacheMap.put(className, iocObj); \n\t\t}\n\t\t\n\t\t//finally replace the map\n\t\tioc.iocMap = cacheMap;\n\t}",
"public abstract Object mo26777y();",
"public interface AccessibleClassParser\n{\n /**\n * Parses a Java-loaded class object to an AccessibleClass\n * \n * @param clazz\n * the class to parse\n * @return the parsed AccessibleClass\n */\n AccessibleClass parseAccessibleClass(Class<?> clazz);\n\n /**\n * Check whever the provided class name is said to be primitive\n * (Primitive_Single) or not (Object_Single)\n * \n * @param className\n * the class name\n * @return true if the type is primitive, false otherwise\n * @deprecated @see {@link PrimitiveTypeUtil}\n */\n @Deprecated\n boolean isPrimitiveType(String className);\n\n /**\n * Give the setter method name according to the field name\n * \n * @param name\n * the filed name\n * @return the setter name\n */\n String attributeToSetter(String name);\n\n /**\n * Give the getter method name according to the field name\n * \n * @param name\n * the field name\n * @return the getter name\n */\n String attributeToGetter(String name);\n\n /**\n * Give the getter method name according to the field name for boolean\n * values (is*())\n * \n * @param name\n * the boolean field name\n * @return the getter name\n */\n String booleanAttributeToGetter(String arg0);\n}",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"public abstract String describe(int depth);",
"FighterInfo() {\r\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\t\t\n\t}",
"default Concept getConcept(ConceptName conceptName) {return (Concept) conceptName;}",
"public void autonomousInit() {\n System.out.println(\"Default autonomousInit() method... Override me!\");\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"public void wild(){\n\t}",
"abstract String applicable(Method[] getters) throws InvalidObjectException;",
"@SuppressWarnings(\"unused\")\n\tprivate static Stream<Arguments> sp800_73_4_DiscoveryObjectTestProvider() {\n\n\t\treturn Stream.of(Arguments.of(APDUConstants.DISCOVERY_OBJECT_OID));\n\n\t}",
"protected Doodler() {\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\npublic void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {\narg2.setType(Feeds.class);\narg2.setName(\"Feeds\");\n\narg2.setNamespace(n1);\n\n}",
"public interface StandardContext extends Context\n{\n public static final String NAME_KEY = \"urn:avalon:name\";\n public static final String PARTITION_KEY = \"urn:avalon:partition\";\n public static final String WORKING_KEY = \"urn:avalon:temp\";\n public static final String HOME_KEY = \"urn:avalon:home\";\n\n /**\n * Return the name assigned to the component\n * @return the name\n */\n String getName();\n\n /**\n * Return the partition name assigned to the component\n * @return the partition name\n */\n String getPartitionName();\n\n /**\n * @return a file representing the home directory\n */\n File getHomeDirectory();\n\n /**\n * @return a file representing the temporary working directory\n */\n File getWorkingDirectory();\n\n}",
"abstract int pregnancy();",
"private AttributeTypeHome( )\n {\n }",
"@Override\n protected String getInitialDoc(PythonParser.FuncdefContext rawMethod) {\n return null;\n }",
"private void visitAdditionalEntrypoints() {\n\tLinkedHashSet<jq_Class> extraClasses = new LinkedHashSet<jq_Class>();\n\tfor(jq_Method m: publicMethods) {\n\t extraClasses.add(m.getDeclaringClass());\n\t}\n\t\n\tfor(jq_Class cl: extraClasses) {\n\t visitClass(cl);\n\t\t\tjq_Method ctor = cl.getInitializer(new jq_NameAndDesc(\"<init>\", \"()V\"));\n\t\t\tif (ctor != null)\n\t\t\t\tvisitMethod(ctor);\n\t}\n\n\tfor(jq_Method m: publicMethods) {\n\t visitMethod(m);\n\t}\n }",
"default void helloDefault() {\n\t\tSystem.out.println(\"Hello from default method definitions from Java8 within interfaces\");\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public interface simpleClassFacade\n extends org.andromda.metafacades.uml.ClassifierFacade\n{\n\n /**\n * Indicates the metafacade type (used for metafacade mappings).\n *\n * @return always <code>true</code>\n */\n public boolean issimpleClassFacadeMetaType();\n\n /**\n * \n */\n public java.util.Collection attrToPy();\n\n /**\n * \n */\n public java.util.Collection operToPy();\n\n}",
"public DefaultLoaderDefinition() {\n\t\t// nothing to do\n\t}",
"public void method_misc_1(Object obj)\r\n\t{\n\t\t\r\n\t\tSystem.out.println(obj.toString());\r\n\t}",
"@Override\n\tprotected void initDefaultCommand() {\n\n\t}"
] | [
"0.58311266",
"0.56669533",
"0.56084746",
"0.5515062",
"0.5415716",
"0.53739923",
"0.533759",
"0.5286645",
"0.528602",
"0.52524316",
"0.5247283",
"0.5230317",
"0.5230317",
"0.5229869",
"0.5222315",
"0.5208093",
"0.52029103",
"0.519901",
"0.519901",
"0.51915604",
"0.5189913",
"0.51827335",
"0.51827335",
"0.51817906",
"0.517204",
"0.5168194",
"0.5167933",
"0.51563907",
"0.5143972",
"0.5107439",
"0.5107439",
"0.5104632",
"0.5104632",
"0.51032037",
"0.50975",
"0.50967133",
"0.5095347",
"0.50913167",
"0.5085962",
"0.50857955",
"0.50857884",
"0.50857884",
"0.50829184",
"0.5080766",
"0.5077371",
"0.50759375",
"0.50701076",
"0.5064168",
"0.5052737",
"0.5046382",
"0.5044122",
"0.5037073",
"0.5036648",
"0.5030963",
"0.5028628",
"0.50231385",
"0.5018228",
"0.5016418",
"0.50028986",
"0.50003225",
"0.49935487",
"0.49919018",
"0.49840826",
"0.49811044",
"0.49778423",
"0.49736217",
"0.49674094",
"0.49648854",
"0.49645948",
"0.49622267",
"0.49618426",
"0.49590358",
"0.4957473",
"0.49574634",
"0.4954852",
"0.4951729",
"0.49464628",
"0.49446496",
"0.4940621",
"0.4940621",
"0.4940621",
"0.4939225",
"0.4939205",
"0.49334982",
"0.4932747",
"0.49299887",
"0.49252158",
"0.49238434",
"0.49235728",
"0.49139795",
"0.49133807",
"0.4910807",
"0.49074733",
"0.4907154",
"0.49060112",
"0.49020314",
"0.49004492",
"0.4899915",
"0.4899764",
"0.4895926",
"0.48924577"
] | 0.0 | -1 |
/ / Basic definitions for noncontainer types | @Override
public final JsonNode findPath(String fieldName)
{
JsonNode value = findValue(fieldName);
if (value == null) {
return MissingNode.getInstance();
}
return value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public Type type();",
"private CollectionType() {}",
"public interface StandardTypesLocalService {\n BigInteger getNewBigInteger(BigInteger bi);\n BigInteger[] getNewBigIntegerArray(BigInteger[] bia);\n \n BigDecimal getNewBigDecimal(BigDecimal bd);\n BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);\n\n Calendar getNewCalendar(Calendar c);\n Calendar[] getNewCalendarArray(Calendar[] ca);\n \n Date getNewDate(Date d);\n Date[] getNewDateArray(Date[] da);\n\n QName getNewQName(QName qname);\n QName[] getNewQNameArray(QName[] qnames);\n \n URI getNewURI(URI uri);\n URI[] getNewURIArray(URI[] uris);\n \n XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);\n XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);\n \n Duration getNewDuration(Duration d);\n Duration[] getNewDurationArray(Duration[] da);\n \n Object getNewObject(Object obj);\n Object[] getNewObjectArray(Object[] objs);\n \n Image getNewImage(Image img);\n Image[] getNewImageArray(Image[] imgs);\n \n DataHandler getNewDataHandler(DataHandler dh);\n DataHandler[] getNewDataHandlerArray(DataHandler[] dha);\n\n Source getNewSource(Source src);\n Source[] getNewSourceArray(Source[] srcs);\n \n UUID getNewUUID(UUID uuid);\n UUID[] getNewUUIDArray(UUID[] uuids);\n}",
"DOMType() {\n // Constructs an empty type node\n }",
"@Override\r\n \tpublic int getElementType() {\r\n \t\treturn 0; \r\n \t}",
"public boolean isContainerType()\n/* */ {\n/* 174 */ return true;\n/* */ }",
"public boolean isContainerType()\n/* */ {\n/* 169 */ return true;\n/* */ }",
"public InsulinType(){\n super();\n }",
"@Override\n public boolean isGeneric() { \n return false;\n }",
"TypeDefinition createTypeDefinition();",
"public interface Type {\n}",
"public interface IContainerTreeNode extends IMutableTypeContainer, MutableTreeNode {\r\n}",
"StructureType createStructureType();",
"protected SimpleTypeImpl getSimpleNoCollection() {\n return new SimpleTypeImpl(\"simpleNameSpace\", SIMPLE_TYPE_NAME, null);\n }",
"@Override\n public TypeWrapper GetWrappedType() {\n return TypeWrapper_Other.NULL;\n }",
"public interface DfType {\n\n /**\n * A type that contains every possible value supported by the type system\n */\n DfType TOP = new DfType() {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return true;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return this;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return this; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return BOTTOM;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return this;\n }\n\n @Override\n public int hashCode() {\n return 1254215;\n }\n\n @Override\n public @NotNull String toString() {\n return \"TOP\";\n }\n };\n /**\n * A type that contains no values\n */\n DfType BOTTOM = new DfType() {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return other == this;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return other; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return this;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return this;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return TOP;\n }\n\n @Override\n public int hashCode() {\n return 67532141;\n }\n\n @Override\n public @NotNull String toString() {\n return \"BOTTOM\";\n }\n };\n /**\n * A special value that represents a contract failure after method return (the control flow should immediately proceed\n * with exception handling). This value is like a constant but its type doesn't correspond to any JVM type.\n */\n DfType FAIL = new DfConstantType<>(ObjectUtils.sentinel(\"FAIL\")) {\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other == this ? this : TOP;\n }\n\n @Override\n public @Nullable DfType tryJoinExactly(@NotNull DfType other) { return other == this ? this : other == NOT_FAIL ? TOP : null; }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other == this ? this : BOTTOM;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return NOT_FAIL;\n }\n\n @Override\n public @NotNull DfType fromRelation(@NotNull RelationType relationType) {\n return relationType == RelationType.EQ ? this :\n relationType == RelationType.NE ? NOT_FAIL :\n BOTTOM;\n }\n\n @Override\n public int hashCode() {\n return 5362412;\n }\n };\n /**\n * Anything but a FAIL value\n */\n DfType NOT_FAIL = new DfAntiConstantType<>(Set.of(Objects.requireNonNull(FAIL.getConstantOfType(Object.class)))) {\n @Override\n public boolean isSuperType(@NotNull DfType other) {\n return other != TOP && other != FAIL;\n }\n\n @Override\n public @NotNull DfType join(@NotNull DfType other) {\n return other == FAIL ? TOP : this;\n }\n\n @Override\n public @NotNull DfType tryJoinExactly(@NotNull DfType other) { return join(other); }\n\n @Override\n public @NotNull DfType meet(@NotNull DfType other) {\n return other == FAIL ? BOTTOM : this;\n }\n\n @Override\n public @NotNull DfType tryNegate() {\n return FAIL;\n }\n\n @Override\n public int hashCode() {\n return 23145416;\n }\n };\n\n /**\n * Checks whether this type is the supertype of the supplied type, i.e. every value from the other type belongs to this type as well.\n * if A.isSuperType(B) then A.join(B) is A and A.meet(B) is B.\n *\n * @param other other type\n * @return true if this type is the supertype of other.\n */\n boolean isSuperType(@NotNull DfType other);\n\n /**\n * @return true if this type contains only local objects (not leaked from the current context to unknown places)\n * In particular, this means that the values of these types are never {@linkplain #mayAlias(DfType) aliased} \n * to any other values.\n */\n default boolean isLocal() {\n return false;\n }\n\n /**\n * @param otherType other type\n * @return true if values qualified by this value might be affected by values qualified by otherType.\n * For example, if both this and otherType are pointer types that may refer to the same memory location.\n */\n default boolean mayAlias(DfType otherType) {\n return false;\n }\n\n /**\n * @return true if values immediately qualified by this type, never change, \n * as long as qualifier never changes.\n */\n default boolean isImmutableQualifier() {\n return false;\n }\n\n /**\n * Checks whether processing the other type is not necessary to get the same analysis result if some value\n * has either this or other state at the same code location. {@code a.isMergeable(b)} implies \n * {@code a.isSuperType(b)}. In most cases, these methods are equivalent but the difference may appear in\n * processing non-strict properties like nullability. E.g. (nullability == unknown) is supertype of\n * (nullability == null) but it's not mergeable, as skipping (nullability == null) processing will remove\n * \"Possible NPE\" warning.\n * \n * @param other other type\n * @return true if processing the other type is not necessary to get the same analysis result if some value\n * has either this or other state at the same code location.\n */\n default boolean isMergeable(@NotNull DfType other) {\n return isSuperType(other);\n }\n\n /**\n * Return the most specific type that contains all values from this type and from other type.\n * @param other type to join\n * @return the result of the join operation\n */\n @NotNull\n DfType join(@NotNull DfType other);\n\n /**\n * Return the type that contains all values from this type and from other type and no other values.\n * @param other type to join\n * @return the result of the join operation; null if exact join cannot be represented\n */\n @Nullable DfType tryJoinExactly(@NotNull DfType other);\n\n /**\n * Returns the least specific type that contains all values that belong both to this type and to other type.\n * @param other type to meet\n * @return the result of the meet operation.\n */\n @NotNull\n DfType meet(@NotNull DfType other);\n\n @NotNull\n default DfType fromRelation(@NotNull RelationType relationType) {\n return relationType == RelationType.EQ ? this : TOP;\n }\n\n /**\n * @return true if equivalence relation on this type is not standard. That is,\n * for constant values belonging to this type, {@code a.meetRelation(EQ, b) != a.equals(b)}\n */\n default boolean hasNonStandardEquivalence() {\n return false;\n }\n \n /**\n * Narrows this value to the set of values that satisfies given relation\n * \n * @param relationType relation applied\n * @param other other operand (e.g., for {@code a < b} relation, this object is {@code a},\n * other is {@code b} and relationType is {@code <}.\n * @return narrowed type containing only values that satisfy the relation \n * (may contain some more values if the exact type cannot be represented).\n * For any {@code meetRelation} arguments, {@code this.isSuperType(this.meetRelation(...))} is true.\n */\n default @NotNull DfType meetRelation(@NotNull RelationType relationType, @NotNull DfType other) {\n return meet(other.fromRelation(relationType));\n }\n\n /**\n * @return the widened version of this type; should be called on back-branches.\n */\n default DfType widen() {\n return this;\n }\n\n /**\n * @return a type that contains all the values of the corresponding JVM type except the values of given type;\n * may return null if the corresponding type is not supported by our type system.\n */\n @Nullable\n default DfType tryNegate() {\n return null;\n }\n\n /**\n * @param constant constant to compare to\n * @return true if this type represents a constant with given value\n */\n default boolean isConst(@Nullable Object constant) {\n return false;\n }\n\n /**\n * @param clazz desired constant class\n * @param <C> type of the constant\n * @return the constant of given type; null if this type does not represent a constant of supplied type.\n */\n default <C> @Nullable C getConstantOfType(@NotNull Class<C> clazz) {\n return null;\n }\n\n /**\n * Correct the inherent variable type when concrete variable state is flushed\n * due to unknown code execution. This could be useful to handle non-strict \n * properties like nullability (e.g. if unstable nullable variable was checked for null,\n * then unknown code was executed, then the variable should not probably reset to nullable)\n * \n * @param typeBeforeFlush type the variable had before flush\n * @return corrected inherent variable type; return this if no correction is necessary.\n */\n default DfType correctTypeOnFlush(DfType typeBeforeFlush) {\n return this;\n }\n\n /**\n * Correct the variable type that is passed from outer context to the closure \n * (e.g. drop the locality flag).\n * \n * @return corrected variable type; return this if no correction is necessary.\n */\n default DfType correctForClosure() {\n return this;\n }\n\n /**\n * Correct the type after applying the relation depending on whether the relation was applied successfully.\n * May be necessary to handle weird relation semantics, like with NaN in some languages.\n * \n * @param relation relation applied\n * @param result if true then the relation was applied successfully. E.g., for {@code a > b},\n * result is true for {@code a > b} state and false for {@code a < b} and for {@code a == b} states.\n * @return corrected type; return this if no correction is necessary\n */\n default @NotNull DfType correctForRelationResult(@NotNull RelationType relation, boolean result) {\n return this;\n }\n\n /**\n * @return basic type for this type. Some types could represent several derived variables. For example,\n * the type \"string of length 3\" could be decomposed to basic type \"string\" and derived variable \"length\"\n * with value \"3\".\n */\n default @NotNull DfType getBasicType() {\n return this;\n }\n\n /**\n * @return list of possible derived variables that could be recorded inside this type.\n * E.g. the type \"string of length 3\" records the derived variable \"string length\" inside.\n */\n default @NotNull List<@NotNull DerivedVariableDescriptor> getDerivedVariables() {\n return List.of();\n }\n\n /**\n * @return values of all derived variables stored inside this type\n */\n default @NotNull Map<@NotNull DerivedVariableDescriptor, @NotNull DfType> getDerivedValues() {\n return Map.of();\n }\n\n /**\n * @return human-readable representation of this DfType, could be localized\n */\n @Override @NlsSafe @NotNull String toString();\n}",
"private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }",
"Type() {\n }",
"public ReocType() \r\n {\r\n super();\r\n }",
"abstract public Type getType();",
"Rule ContainerType() {\n // No direct effect on value stack\n return FirstOf(\n MapType(),\n SetType(),\n ListType());\n }",
"public interface Type {\n\n}",
"public interface FType {\n boolean isPointer();\n boolean isDimension();\n String getCanonicalText();\n FTypeParamValue getKind();\n}",
"@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<Integer> listInteger = new ArrayList<Integer>();\r\n\t\tlistInteger.add(1);\r\n\t\tlistInteger.add(2);\r\n\t\tlistInteger.add(3);\r\n\t\t\r\n\t\t//missing type as Integer\r\n\t\tMyContainer<Integer> mc = new MyContainer<Integer>(listInteger);\r\n\t\t\r\n\t\t//missing type as integer \r\n\t\t//MyContainer<Integer> mc1 = new MyContainer<Integer>();\r\n\t\t\r\n\t}",
"public Type() {\n super();\n }",
"@Override\n public String getType() {\n return \"\";\n }",
"public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}",
"@Override\n public Type type() {\n return null;\n }",
"protected GEDCOMType() {/* intentionally empty block */}",
"protected SimpleTypeImpl getSimpleNoCollectionWithBaseType() {\n return new SimpleTypeImpl(\"simpleNameSpace\", \"simpleType\", null, false, null, getSimpleNoCollection(), null);\n }",
"@Override\n public Type getType() {\n return null;\n }",
"TypeRef getType();",
"public interface NativeDefOperations\n\textends org.omg.CORBA.TypedefDefOperations\n{\n}",
"@Test\n public void testAdd_GenericType() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n boolean expResult = true;\n boolean result = instance.add(1);\n assertEquals(expResult, result);\n }",
"DatatypesType createDatatypesType();",
"public abstract ValueType getValueType();",
"private PTypeRefSkel() {}",
"@Override\r\n\tpublic void visit(TypedefDefinition typedefDefinition) {\n\r\n\t}",
"@Override public Type make_nil(byte nil) { return make(nil,_any); }",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"UserDefinedType createUserDefinedType();",
"DatatypeType createDatatypeType();",
"PrimitiveTypesLibrary createPrimitiveTypesLibrary();",
"public interface ScalarType extends java.io.Serializable\n{\n /** create a clone of this scalar's value. It is important to note that you should return a copy here unless you really want \n scalars of your scalar type to be passed by reference. */\n public ScalarType copyValue(); \n\n /** convert the scalar to an int */\n public int intValue();\n\n /** convert the scalar to a long */\n public long longValue();\n\n /** convert the scalar to a double */\n public double doubleValue();\n\n /** convert the scalar to a string */\n public String toString();\n\n /** convert the scalar to an object value *shrug* */\n public Object objectValue();\n\n /** returns the Class type of this ScalarType. Use this instead of getClass to allow other functions to wrap ScalarType's without breaking\n functionality */\n public Class getType();\n}",
"@Override\n public String getType()\n {\n return \"OO\";\n }",
"public static void main(String a[]){\n SimpleGeneric<String> sgs = new SimpleGeneric<String>(\"JAVA2NOVICE\");\n sgs.printType();\n //we are going to create SimpleGeneric object with Boolean as type parameter\n SimpleGeneric<Boolean> sgb = new SimpleGeneric<Boolean>(Boolean.TRUE);\n sgb.printType();\n }",
"public interface MapObjectType {\n}",
"@Override\npublic String getType() {\n\treturn null;\n}",
"public interface Member2 extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.util.List getListValue();\n java.util.List xgetListValue();\n void setListValue(java.util.List list);\n /** @deprecated */\n java.util.List listValue();\n /** @deprecated */\n java.util.List xlistValue();\n /** @deprecated */\n void set(java.util.List list);\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member2.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anona0e6type\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is a union type. Instances are of one of the following types:\n * org.apache.xmlbeans.XmlAnyURI\n * org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member\n */\n public interface Item extends org.apache.xmlbeans.XmlAnySimpleType\n {\n java.lang.Object getObjectValue();\n void setObjectValue(java.lang.Object val);\n /** @deprecated */\n java.lang.Object objectValue();\n /** @deprecated */\n void objectSet(java.lang.Object val);\n org.apache.xmlbeans.SchemaType instanceType();\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Item.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon16cetype\");\n \n /**\n * An anonymous inner XML type.\n *\n * This is an atomic type that is a restriction of org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n */\n public interface Member extends org.apache.xmlbeans.XmlToken\n {\n public static final org.apache.xmlbeans.SchemaType type = (org.apache.xmlbeans.SchemaType)\n org.apache.xmlbeans.XmlBeans.typeSystemForClassLoader(Member.class.getClassLoader(), \"schemaorg_apache_xmlbeans.system.sXMLSCHEMA\").resolveHandle(\"anon0c73type\");\n \n org.apache.xmlbeans.StringEnumAbstractBase enumValue();\n void set(org.apache.xmlbeans.StringEnumAbstractBase e);\n \n static final Enum TARGET_NAMESPACE = Enum.forString(\"##targetNamespace\");\n static final Enum LOCAL = Enum.forString(\"##local\");\n \n static final int INT_TARGET_NAMESPACE = Enum.INT_TARGET_NAMESPACE;\n static final int INT_LOCAL = Enum.INT_LOCAL;\n \n /**\n * Enumeration value class for org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList$Member2$Item$Member.\n * These enum values can be used as follows:\n * <pre>\n * enum.toString(); // returns the string value of the enum\n * enum.intValue(); // returns an int value, useful for switches\n * // e.g., case Enum.INT_TARGET_NAMESPACE\n * Enum.forString(s); // returns the enum value for a string\n * Enum.forInt(i); // returns the enum value for an int\n * </pre>\n * Enumeration objects are immutable singleton objects that\n * can be compared using == object equality. They have no\n * public constructor. See the constants defined within this\n * class for all the valid values.\n */\n static final class Enum extends org.apache.xmlbeans.StringEnumAbstractBase\n {\n /**\n * Returns the enum value for a string, or null if none.\n */\n public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }\n /**\n * Returns the enum value corresponding to an int, or null if none.\n */\n public static Enum forInt(int i)\n { return (Enum)table.forInt(i); }\n \n private Enum(java.lang.String s, int i)\n { super(s, i); }\n \n static final int INT_TARGET_NAMESPACE = 1;\n static final int INT_LOCAL = 2;\n \n public static final org.apache.xmlbeans.StringEnumAbstractBase.Table table =\n new org.apache.xmlbeans.StringEnumAbstractBase.Table\n (\n new Enum[]\n {\n new Enum(\"##targetNamespace\", INT_TARGET_NAMESPACE),\n new Enum(\"##local\", INT_LOCAL),\n }\n );\n private static final long serialVersionUID = 1L;\n private java.lang.Object readResolve() { return forInt(intValue()); } \n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item.Member) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2.Item) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }\n \n /**\n * A factory class with static methods for creating instances\n * of this type.\n */\n \n public static final class Factory\n {\n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newValue(java.lang.Object obj) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) type.newValue( obj ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newInstance() {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, null ); }\n \n public static org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2 newInstance(org.apache.xmlbeans.XmlOptions options) {\n return (org.apache.xmlbeans.impl.xb.xsdschema.NamespaceList.Member2) org.apache.xmlbeans.XmlBeans.getContextTypeLoader().newInstance( type, options ); }\n \n private Factory() { } // No instance of this class allowed\n }\n }",
"public interface Type<SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept<SomeType> {\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type<SomeType, SomeThing> asType() {\n return this;\n }\n\n @Override\n Remote<SomeType, SomeThing> asRemote(GraknClient.Transaction tx);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n\n interface Local<\n SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept.Local<SomeType>, Type<SomeType, SomeThing> {\n }\n\n /**\n * A Type represents any ontological element in the graph.\n * Types are used to model the behaviour of Thing and how they relate to each other.\n * They also aid in categorising Thing to different types.\n */\n interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }\n}",
"@Override\n\tpublic Type getType() {\n\t\treturn null;\n\t}",
"public Type() {\n\t\tsetSize();\n\t}",
"public interface Container<T> {\n\n\t/**\n\t * Registra un objeto en el contenedor. Un objeto puede estar varias veces en el contenedor\n\t */\n\tpublic void register(T o);\n\t\n\t/**\n\t * Elimina todas las apariciones del objeto objeto del contenedor\n\t */\n\tpublic void unregister(T o);\n}",
"type getType();",
"public interface TypeKey {\n}",
"public interface BinaryNode<T> { }",
"EmptyType createEmptyType();",
"abstract public String getType();",
"public MyAllTypesFirst() {\n myInt = 0;\n myLong = 0;\n myString = \"\";\n myBool = false;\n myOtherInt = 0;\n }",
"public interface C0056a<T> {\n}",
"protected abstract String getType();",
"public abstract Type getType();",
"TypeDescription validated();",
"public interface ContainerColorDefinition extends EObject\n{\n}",
"public interface EffectFullType extends Type\n{\n}",
"public abstract Type treeCopyNoTransform();",
"ScalarTypeDefinition createScalarTypeDefinition();",
"public interface TypeSystemCommonBackendContext extends TypeSystemContext {\n FqNameUnsafe getClassFqNameUnsafe(TypeConstructorMarker typeConstructorMarker);\n\n PrimitiveType getPrimitiveArrayType(TypeConstructorMarker typeConstructorMarker);\n\n PrimitiveType getPrimitiveType(TypeConstructorMarker typeConstructorMarker);\n\n KotlinTypeMarker getRepresentativeUpperBound(TypeParameterMarker typeParameterMarker);\n\n KotlinTypeMarker getSubstitutedUnderlyingType(KotlinTypeMarker kotlinTypeMarker);\n\n TypeParameterMarker getTypeParameterClassifier(TypeConstructorMarker typeConstructorMarker);\n\n boolean hasAnnotation(KotlinTypeMarker kotlinTypeMarker, FqName fqName);\n\n boolean isInlineClass(TypeConstructorMarker typeConstructorMarker);\n\n boolean isMarkedNullable(KotlinTypeMarker kotlinTypeMarker);\n\n boolean isUnderKotlinPackage(TypeConstructorMarker typeConstructorMarker);\n\n KotlinTypeMarker makeNullable(KotlinTypeMarker kotlinTypeMarker);\n\n /* compiled from: TypeSystemCommonBackendContext.kt */\n public static final class DefaultImpls {\n public static boolean isMarkedNullable(TypeSystemCommonBackendContext typeSystemCommonBackendContext, KotlinTypeMarker kotlinTypeMarker) {\n Intrinsics.checkParameterIsNotNull(kotlinTypeMarker, \"$this$isMarkedNullable\");\n return (kotlinTypeMarker instanceof SimpleTypeMarker) && typeSystemCommonBackendContext.isMarkedNullable((SimpleTypeMarker) kotlinTypeMarker);\n }\n\n public static KotlinTypeMarker makeNullable(TypeSystemCommonBackendContext typeSystemCommonBackendContext, KotlinTypeMarker kotlinTypeMarker) {\n SimpleTypeMarker withNullability;\n Intrinsics.checkParameterIsNotNull(kotlinTypeMarker, \"$this$makeNullable\");\n SimpleTypeMarker asSimpleType = typeSystemCommonBackendContext.asSimpleType(kotlinTypeMarker);\n return (asSimpleType == null || (withNullability = typeSystemCommonBackendContext.withNullability(asSimpleType, true)) == null) ? kotlinTypeMarker : withNullability;\n }\n }\n}",
"@Override\r\n\t\tpublic short getNodeType()\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}",
"protected CollectionLikeType(TypeBase base, JavaType elemT)\n/* */ {\n/* 44 */ super(base);\n/* 45 */ this._elementType = elemT;\n/* */ }",
"@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}",
"private Type type()\r\n {\r\n Type t = new Type();\r\n\r\n t.ident = nextToken;\r\n t.type = basicType();\r\n if (t.type == Keyword.NONESY)\r\n {\r\n unresolved.add(t.ident.string = qualident());\r\n }\r\n else\r\n t.ident.string = null;\r\n\r\n t.dim = bracketsOpt();\r\n\r\n return t;\r\n }",
"private JavaType(Type elementType) {\n this.elementType = elementType;\n }",
"public String typeOf() { return null; }",
"BaseContainerType getBaseContainer();",
"@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}",
"public TypeUtils() {\n\t}",
"public interface Generic extends Reference\n{\n}",
"public interface Numeric extends DataType {\n}",
"public Rule nonSimpleMapTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\tfirstOf(funcType(), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\t// Not enforcing [] because of problems with maps like this Str:int[\"\":5]\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), SQ_BRACKET_L, SQ_BRACKET_R)), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"InstrumentedType.WithFlexibleName represent(TypeDescription typeDescription);",
"ElementType getElementType();",
"TypeInterface createTypeInterface();",
"public Rule nonFunctionTypes()\n \t{\n \t\treturn sequence(\n \t\t\t\t// Don't allow simpleMap starting with '|' as this confuses with closinf Function.\n \t\t\t\tfirstOf(sequence(testNot(SP_PIPE), simpleMapType()), mapType(), simpleType()),\n \t\t\t\toptional(\n \t\t\t\tsequence(noNl(), optional(SP_QMARK), noNl(), enforcedSequence(\n \t\t\t\tSQ_BRACKET_L, SQ_BRACKET_R))), // list of '?[]'\n \t\t\t\toptional(sequence(noNl(), SP_QMARK))); // nullable\n \t}",
"Type_use getType_use();",
"DataType createDataType();",
"TypeDef createTypeDef();",
"private AnnotatedTypes() { throw new AssertionError(\"Class AnnotatedTypes cannot be instantiated.\");}",
"@Override abstract public String type();",
"public interface SimapaCollection extends SimapaObject {\r\n}",
"private MCTypeReference<? extends MCTypeSymbol> initTypeRefGeneralType(ASTPort node, StringBuilder typeName, ASTType astType) {\n MCTypeReference<? extends MCTypeSymbol> typeRef = null;\n typeName.append(ArcTypePrinter.printTypeWithoutTypeArgumentsAndDimension(astType));\n //Log.debug(astType.toString(),\"TYPE:\");\n //Log.debug(typeName,\"TYPEName:\");\n typeRef = new CommonMCTypeReference<MCTypeSymbol>(typeName.toString(), MCTypeSymbol.KIND, currentScope().get());\n typeRef.setDimension(TypesHelper.getArrayDimensionIfArrayOrZero(astType));\n addTypeArgumentsToTypeSymbol(typeRef, astType);\n return typeRef;\n }",
"@Test\n\tpublic void testInternalTypes() {\n\t\tlogger.info(\"Run testInternalTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// OrderByDirectionOutputType\n\t\tfinal IntrospectionFullType orderByDirectionOutputType = getFullType(introspection,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\t\tAssert.assertEquals(2, orderByDirectionOutputType.getEnumValues().size());\n\t\tassertEnum(orderByDirectionOutputType, GQLOrderByDirectionEnum.ASC.toString(), false);\n\t\tassertEnum(orderByDirectionOutputType, GQLOrderByDirectionEnum.DESC.toString(), false);\n\n\t\t// OrderByInputType\n\t\tfinal IntrospectionFullType orderByInputType = getFullType(introspection, getOrderByInputTypeName());\n\t\tAssert.assertEquals(2, orderByInputType.getInputFields().size());\n\t\tassertInputField(orderByInputType, \"field\", IntrospectionTypeKindEnum.NON_NULL,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(orderByInputType, \"direction\", IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\n\t\t// OrderByOutputType\n\t\tfinal IntrospectionFullType orderByOutputType = getFullType(introspection, getOrderByOutputTypeName());\n\t\tAssert.assertEquals(2, orderByOutputType.getFields().size());\n\t\tassertField(orderByOutputType, \"field\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertField(orderByOutputType, \"direction\", IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tgetOrderByDirectionOutputTypeName());\n\n\t\t// PagingInputType\n\t\tfinal IntrospectionFullType pagingInputType = getFullType(introspection, getPagingInputTypeName());\n\t\tAssert.assertEquals(2, pagingInputType.getInputFields().size());\n\t\tassertInputField(pagingInputType, \"offset\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(pagingInputType, \"limit\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\n\t\t// PagingOutputType\n\t\tfinal IntrospectionFullType pagingOutputType = getFullType(introspection, getPagingOutputTypeName());\n\t\tAssert.assertEquals(3, pagingOutputType.getFields().size());\n\t\tassertField(pagingOutputType, \"offset\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertField(pagingOutputType, \"limit\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertField(pagingOutputType, \"totalLength\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t}",
"default boolean isPrimitive() {\n return false;\n }",
"public interface I_DomainType {\n\t\n\t/**\n\t * Gets the Type IDentifier.\n\t * \n\t * @return \tthe type identifier\n\t */\n\tpublic int getTid();\n\t\n\t/**\n\t * Sets the Type IDentifier.\n\t * \n\t * @param tid the type identifier\n\t */\n\tpublic void setTid(int tid);\n\t\n\t/**\n\t * Gets the name.\n\t * \n\t * @return the name\n\t */\n\tpublic String getName();\n\t\n\t/**\n\t * Sets the name.\n\t * \n\t * @param name the name\n\t */\n\tpublic void setName(String name);\n\t\n\t/**\n\t * Gets the description.\n\t * \n\t * @return the description\n\t */\n\tpublic String getDescription();\n\t\n\t/**\n\t * Sets the description.\n\t * \n\t * @param description the description\n\t */\n\tpublic void setDescription(String description);\n\t\n\t/**\n\t * Prints to console without any indentation.\n\t */\n\tpublic void print();\n\t\n\t/**\n\t * Prints to console at a specific tab indentation level.\n\t * \n\t * @param tabOrder the indentation level\n\t */\n\tpublic void print(int tabOrder);\n}",
"public interface Force extends Quantity<Force> {\n\n}",
"public abstract BoundType a();",
"@Test\n void shouldReturnPrimitiveTypeOnly() {\n assertThat(TypeVisitor.gatherAllTypes(int.class), contains(int.class));\n assertThat(TypeVisitor.gatherAllTypes(double.class), contains(double.class));\n assertThat(TypeVisitor.gatherAllTypes(char.class), contains(char.class));\n }",
"int getType();",
"int getType();"
] | [
"0.63719016",
"0.6367339",
"0.6329752",
"0.60957533",
"0.6078194",
"0.6066299",
"0.6034458",
"0.6032809",
"0.6014127",
"0.59544486",
"0.5915287",
"0.59045815",
"0.5898603",
"0.58960223",
"0.5876452",
"0.586809",
"0.5860745",
"0.58482015",
"0.58180237",
"0.58110917",
"0.580565",
"0.5800774",
"0.57974046",
"0.57908833",
"0.57805467",
"0.5747324",
"0.5743697",
"0.5741307",
"0.5741002",
"0.57294554",
"0.5712129",
"0.5706117",
"0.57054245",
"0.57021296",
"0.5698001",
"0.5693338",
"0.5681324",
"0.5667957",
"0.5666907",
"0.5650392",
"0.56474864",
"0.56445843",
"0.5643396",
"0.56256056",
"0.56245494",
"0.56167835",
"0.56098926",
"0.55990034",
"0.55969006",
"0.55941737",
"0.5591594",
"0.5585547",
"0.55827546",
"0.55812824",
"0.5571704",
"0.5556506",
"0.55559754",
"0.55542743",
"0.5549089",
"0.55397797",
"0.5535411",
"0.5532048",
"0.5530517",
"0.5528156",
"0.55273306",
"0.5522438",
"0.5520021",
"0.55161744",
"0.5512132",
"0.5511953",
"0.5506192",
"0.55024165",
"0.54978454",
"0.5496694",
"0.5490371",
"0.54890984",
"0.54741895",
"0.54741895",
"0.54665554",
"0.54601586",
"0.5448811",
"0.54380524",
"0.54175663",
"0.54165787",
"0.5415303",
"0.54144603",
"0.5413985",
"0.54115593",
"0.54094785",
"0.54066783",
"0.54042685",
"0.5402559",
"0.54004735",
"0.53980845",
"0.5396853",
"0.538901",
"0.53886116",
"0.5386321",
"0.53850293",
"0.5384264",
"0.5384264"
] | 0.0 | -1 |
/ / Improved requiredness checks for standard JsonNode implementations | @Override
public JsonNode required(String fieldName) {
return _reportRequiredViolation("Node of type %s has no fields",
ClassUtil.nameOf(getClass()));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void validateJson();",
"protected MatchStrength hasJSONFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 507 */ return ByteSourceJsonBootstrapper.hasJSONFormat(acc);\n/* */ }",
"default boolean checkJsonResp(JsonElement response) {\n return false;\n }",
"protected void verificarEstructuraJson(JSONObject node){\n Set<String> keys = node.keySet();\n \n for( String key : keys ){\n if( key.contentEquals(NODE_TYPE_STR) || key.contentEquals(REQUEST_SCOPE_STR) || key.contentEquals(REQUEST_IDENTITY_STR) ||\n key.contentEquals(REQUEST_META_STR) || key.contentEquals(REQUEST_ID_STR) || key.contentEquals(REQUEST_DATA_STR)){ \n }\n else{\n throw new RuntimeException(Mensajes.ERR_SIN_FORMATO_JSON);\n }\n }\n }",
"boolean hasJsonReqMsg();",
"@Override\n\tprotected void preProcessInputData(JsonNode input) {\n\t\t\n\t}",
"private static boolean isJSONValid(String jsonInString){\n\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.readTree(jsonInString);\n\t\t\treturn true;\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"INVALID JSON-LD SYNTAX\");\n\t\t\treturn false;\n\t\t}\n\n\t}",
"private void asertPresentJSON(String json, String fieldName) throws Exception {\n\n ObjectMapper objectMapper = new ObjectMapper();\n\n try {\n\n JsonNode rootNode = objectMapper.readTree(json);\n String value = rootNode.path(fieldName).asText();\n assertNotNull(\"Expected for field <\" + fieldName + \"> value\", value);\n\n } catch (JsonParseException e) {\n System.out.println(\"Trouble trying to check \" + e.getMessage()); // TODO better message \n throw e;\n }\n\n }",
"public interface FieldValidator {\n static boolean validateStringIfPresent(Object o, int len) {\n return o == null || o instanceof String && !((String) o).isEmpty() && ((String) o).length() < len;\n }\n\n static boolean validateString(Object o, int len) {\n return !(o == null || !(o instanceof String) || ((String) o).isEmpty() || (((String) o).length() > len));\n }\n\n static boolean validateInteger(Object o) {\n if (o == null) {\n return false;\n }\n try {\n Integer.valueOf(o.toString());\n } catch (NumberFormatException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateDateWithFormat(Object o, DateTimeFormatter formatter, boolean allowedInPast) {\n if (o == null) {\n return false;\n }\n try {\n LocalDate date = LocalDate.parse(o.toString(), formatter);\n if (!allowedInPast) {\n return date.isAfter(LocalDate.now());\n }\n } catch (DateTimeParseException e) {\n return false;\n }\n return true;\n }\n\n static boolean validateJsonIfPresent(Object o) {\n return o == null || o instanceof JsonObject && !((JsonObject) o).isEmpty();\n }\n\n static boolean validateJson(Object o) {\n return !(o == null || !(o instanceof JsonObject) || ((JsonObject) o).isEmpty());\n }\n\n static boolean validateJsonArrayIfPresent(Object o) {\n return o == null || o instanceof JsonArray && !((JsonArray) o).isEmpty();\n }\n\n static boolean validateJsonArray(Object o) {\n return !(o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty());\n }\n\n static boolean validateDeepJsonArrayIfPresent(Object o, FieldValidator fv) {\n if (o == null) {\n return true;\n } else if (!(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n } else {\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n }\n return true;\n }\n\n static boolean validateDeepJsonArray(Object o, FieldValidator fv) {\n if (o == null || !(o instanceof JsonArray) || ((JsonArray) o).isEmpty()) {\n return false;\n }\n JsonArray array = (JsonArray) o;\n for (Object element : array) {\n if (!fv.validateField(element)) {\n return false;\n }\n }\n return true;\n }\n\n static boolean validateBoolean(Object o) {\n return o != null && o instanceof Boolean;\n }\n\n static boolean validateBooleanIfPresent(Object o) {\n return o == null || o instanceof Boolean;\n }\n\n static boolean validateUuid(Object o) {\n try {\n UUID uuid = UUID.fromString((String) o);\n return true;\n } catch (IllegalArgumentException e) {\n return false;\n }\n }\n\n static boolean validateUuidIfPresent(String o) {\n return o == null || validateUuid(o);\n }\n\n boolean validateField(Object value);\n\n Pattern EMAIL_PATTERN =\n Pattern.compile(\"^[_A-Za-z0-9-\\\\+]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9]+)*(\\\\.[A-Za-z]{2,})$\");\n\n static boolean validateEmail(Object o) {\n Matcher matcher = EMAIL_PATTERN.matcher((String) o);\n return matcher.matches();\n }\n}",
"@Test(timeout = 4000)\n public void test013() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n boolean boolean0 = jSONObject0.isNull(\"wheel.jso.JSONObject\");\n assertTrue(boolean0);\n }",
"@Test\n public void testNodeDefault() throws Exception, JSONException {\n WebResource r = resource();\n ClientResponse response = r.path(\"ws\").path(\"v1\").path(\"node\").get(ClientResponse.class);\n Assert.assertEquals((((MediaType.APPLICATION_JSON) + \"; \") + (JettyUtils.UTF_8)), response.getType().toString());\n JSONObject json = response.getEntity(JSONObject.class);\n verifyNodeInfo(json);\n }",
"@Test(timeout = 4000)\n public void test055() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n try { \n jSONObject0.put((String) null, true);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Null key.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public boolean hasReqJson() {\n return fieldSetFlags()[2];\n }",
"@Test\n\tpublic void testValidation() throws Exception {\n\t\tSchema schema = factory.create(basicSchema);\n\t\tschema.validate(parser.read(basicJson));\n\t}",
"@Test(timeout = 4000)\n public void test094() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n jSONObject1.put(\"su\", 4135.211029659);\n jSONObject1.getDouble(\"su\");\n try { \n jSONObject1.getBoolean(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test025() throws Throwable {\n JSONObject.testValidity((Object) null);\n }",
"public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (RoyaltyEntity.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in RoyaltyEntity is not found in the empty JSON string\", RoyaltyEntity.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!RoyaltyEntity.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `RoyaltyEntity` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"account\") != null && !jsonObj.get(\"account\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `account` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"account\").toString()));\n }\n if (jsonObj.get(\"account_open_id\") != null && !jsonObj.get(\"account_open_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `account_open_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"account_open_id\").toString()));\n }\n if (jsonObj.get(\"bind_login_name\") != null && !jsonObj.get(\"bind_login_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bind_login_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bind_login_name\").toString()));\n }\n if (jsonObj.get(\"login_name\") != null && !jsonObj.get(\"login_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `login_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"login_name\").toString()));\n }\n if (jsonObj.get(\"memo\") != null && !jsonObj.get(\"memo\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `memo` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"memo\").toString()));\n }\n if (jsonObj.get(\"name\") != null && !jsonObj.get(\"name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"name\").toString()));\n }\n if (jsonObj.get(\"type\") != null && !jsonObj.get(\"type\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `type` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"type\").toString()));\n }\n }",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousObjNodeShape() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomPropertyGraphRequestModel();\n\t requestModel.setObjNodeShape(SPACE);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}",
"public boolean supportsJsonType() {\n return false;\n }",
"public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (JinyouTestOne.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in JinyouTestOne is not found in the empty JSON string\", JinyouTestOne.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!JinyouTestOne.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `JinyouTestOne` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"o_1_n\") != null && !jsonObj.get(\"o_1_n\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_1_n` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_1_n\").toString()));\n }\n if (jsonObj.get(\"o_2_openid\") != null && !jsonObj.get(\"o_2_openid\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_2_openid` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_2_openid\").toString()));\n }\n if (jsonObj.get(\"o_2_y\") != null && !jsonObj.get(\"o_2_y\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_2_y` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_2_y\").toString()));\n }\n if (jsonObj.get(\"o_3_openid\") != null && !jsonObj.get(\"o_3_openid\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `o_3_openid` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"o_3_openid\").toString()));\n }\n }",
"@Test\n public void testNodeInfoDefault() throws Exception, JSONException {\n WebResource r = resource();\n ClientResponse response = r.path(\"ws\").path(\"v1\").path(\"node\").path(\"info\").get(ClientResponse.class);\n Assert.assertEquals((((MediaType.APPLICATION_JSON) + \"; \") + (JettyUtils.UTF_8)), response.getType().toString());\n JSONObject json = response.getEntity(JSONObject.class);\n verifyNodeInfo(json);\n }",
"@Override\n public boolean isMaybeStrJSON() {\n checkNotPolymorphicOrUnknown();\n return (flags & STR_JSON) != 0;\n }",
"@Override\n public boolean isValid(JsonElement el) {\n return doValidate(el, null);\n }",
"private static JsonNode validate (Request req, Response res) {\n FeedVersion version = requestFeedVersion(req, \"manage\");\n\n // FIXME: Update for sql-loader validation process?\n return null;\n// return version.retrieveValidationResult(true);\n }",
"@Test(timeout = 4000)\n public void test12() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n jSONObject0.optLong(\"wheel.json.JSONException\");\n jSONObject0.remove((String) null);\n jSONObject0.optString(\"is\");\n LinkedList<Short> linkedList0 = new LinkedList<Short>();\n jSONObject0.put(\"\\b\", (Collection) linkedList0);\n String string0 = \"-)#>`U+F=\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"JSON does not allow non-finite numbers.\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of JSON does not allow non-finite numbers.\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"boolean isValid(JsonMessage message);",
"@Test(timeout = 4000)\n public void test049() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMGL\", (Object) \"MnMGL\");\n jSONObject1.put(\"MnMGL\", 0.0);\n try { \n jSONObject1.getBoolean(\"MnMGL\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMGL\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"public static boolean isValidNode(Node node) {\r\n\t\tif (node == null ||\r\n\t\t\t\tnode.getCreatedByPrincipalId() == null ||\r\n\t\t\t\tnode.getCreatedOn() == null ||\r\n\t\t\t\tnode.getETag() == null ||\r\n\t\t\t\tnode.getId() == null ||\r\n\t\t\t\tnode.getModifiedByPrincipalId() == null ||\r\n\t\t\t\tnode.getModifiedOn() == null ||\r\n\t\t\t\tnode.getName() == null ||\r\n\t\t\t\tnode.getNodeType() == null) \r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"@Test\n\tvoid testJSONObject1() {\n\t\tassertNotNull(r1.getOutput());\n\t}",
"@Test\n public void verifyJsonBackWardCompatible() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_noDesc.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }",
"@Test(timeout = 4000)\n public void test20() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(jSONObject1);\n jSONObject0.optBoolean(\"Z\");\n try { \n jSONObject0.getJSONArray(\"A1 `'ski<ljrq9;O7L\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"A1 `'ski<ljrq9;O7L\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test077() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.putOpt(\"\", jSONObject0);\n jSONObject1.getJSONObject(\"\");\n Object object0 = JSONObject.NULL;\n JSONObject jSONObject2 = new JSONObject();\n assertEquals(0, jSONObject2.length());\n }",
"public static void jsonAssertAndValidate(JsonNode expected, JsonNode actual,\n Map<String, Object> fromMap) {\n }",
"@Test(timeout = 4000)\n public void test05() throws Throwable {\n HashMap<Object, Double> hashMap0 = new HashMap<Object, Double>(13);\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n String[] stringArray0 = new String[9];\n stringArray0[0] = \"\";\n Float float0 = new Float(3525.726934349);\n Double double0 = new Double(Double.NaN);\n hashMap0.put(float0, double0);\n stringArray0[1] = \"Z\";\n stringArray0[2] = \"] is not a Boolean.\";\n jSONObject0.optBoolean(\"Expected a ',' or ']'\");\n stringArray0[3] = \"p0JV~u{VV\";\n stringArray0[4] = \"a>(3H]W1\";\n stringArray0[5] = \"4v)7wYwy@>>\";\n stringArray0[6] = \"`00MMvjO_a\";\n stringArray0[7] = \";Az%j \";\n stringArray0[8] = \"L;IoBM\";\n JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0);\n JSONObject.testValidity(\";Az%j \");\n jSONObject1.optBoolean(\"`00MMvjO_a\");\n try { \n jSONObject1.getJSONArray((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getLong(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n\tpublic void testTipoDeFicheroPatron(){\n\t\tassertTrue(json.get(\"tipo\").equals(\"patron\"));\n\t}",
"@Test(timeout = 4000)\n public void test22() throws Throwable {\n Integer integer0 = new Integer((-821));\n JSONObject jSONObject0 = new JSONObject(integer0);\n String string0 = \"53N/{T[\";\n JSONObject jSONObject1 = jSONObject0.put(\"53N/{T[\", (-1913.632));\n jSONObject1.toString((-821));\n jSONObject0.optString(\"53N/{T[\", \"53N/{T[\");\n jSONObject0.opt(\",2fHJL;.]tm*PJ9\");\n jSONObject0.optLong((String) null);\n jSONObject0.toString((-821));\n Byte byte0 = new Byte((byte)1);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONObject jSONObject2 = jSONObject1.put(\"|f}%!.^JO \", (Collection) linkedList0);\n JSONObject jSONObject3 = jSONObject2.accumulate(\"o%,g eOJ=9n\\\"\", \"java.lang.Double@0000000003\");\n try { \n jSONObject3.getJSONObject(\"{\\n\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003,\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{\\\\n\\\\\\\"java.lang.String@0000000002\\\\\\\": java.lang.Double@0000000003,\\\\n\\\\\\\"java.lang.String@0000000004\\\\\\\": \\\\\\\"java.lang.Class@0000000005\\\\\\\"\\\\n}\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test087() throws Throwable {\n Float float0 = new Float(Double.NaN);\n try { \n JSONObject.testValidity(float0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSON does not allow non-finite numbers.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test099() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n JSONObject jSONObject2 = jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)42, (byte)42);\n JSONObject.quote(\"\");\n Byte.toUnsignedInt((byte)42);\n JSONObject.valueToString(jSONObject2, (-1394), (-1394));\n JSONObject jSONObject3 = new JSONObject(\"{\\n\\\"java.lang.String@0000000003\\\": {},\\n\\\"java.lang.String@0000000004\\\": \\\"java.lang.Class@0000000005\\\"\\n}\");\n String string0 = \"&<uWyN63)KiOjjs&n3\";\n JSONObject jSONObject4 = null;\n try {\n jSONObject4 = new JSONObject(\"&<uWyN63)KiOjjs&n3\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of &<uWyN63)KiOjjs&n3\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test031() throws Throwable {\n Double double0 = new Double(Double.NaN);\n try { \n JSONObject.testValidity(double0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSON does not allow non-finite numbers.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test02() throws Throwable {\n float float0 = (-327.5252F);\n Float float1 = new Float((-327.5252F));\n Float.min(0.0F, 0.0F);\n JSONObject jSONObject0 = new JSONObject(float1);\n String string0 = \"{}\";\n JSONObject jSONObject1 = jSONObject0.put(\"{}\", 518.9508);\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray((Collection) linkedList0);\n jSONObject1.put(\"J,/Ph.9`e('Sb=@\", (Object) jSONArray0);\n try { \n jSONObject1.getBoolean(\"{}\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"{}\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Override\n\tpublic boolean isPrimitiveTypeExpected() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}",
"void shouldParseTheJsonPostData() {\n }",
"@Test(timeout = 4000)\n public void test032() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n try { \n jSONObject0.put((String) null, false);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Null key.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test011() throws Throwable {\n JSONObject.quote(\"e(h'R;/n&72HYkju\");\n HashMap<Object, String> hashMap0 = new HashMap<Object, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n try { \n jSONObject0.getBoolean((String) null);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"\\\"] not found.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test020() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject1.optLong(\"|q\", 0L);\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test076() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n Integer integer0 = new Integer(55);\n JSONObject jSONObject1 = jSONObject0.append(\"Substring bounds error\", integer0);\n jSONObject1.getJSONArray(\"Substring bounds error\");\n jSONObject1.append(\"Bad value from toJSONString: \", integer0);\n String string0 = jSONObject1.optString(\"Substring bounds error\", \"num\");\n assertNotNull(string0);\n }",
"@Test(timeout = 4000)\n public void test019() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.optBoolean(\",\\n\");\n JSONObject.doubleToString(0.0);\n Object object0 = JSONObject.NULL;\n jSONObject0.append(\"] is not a Boolean.\", object0);\n assertEquals(1, jSONObject0.length());\n }",
"@Test(timeout = 4000)\n public void test051() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.putOpt((String) null, (Object) null);\n Object object0 = JSONObject.NULL;\n assertNotNull(object0);\n }",
"@Test(timeout = 4000)\n public void test075() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must end with '}' at character 1 of {\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test101() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject(jSONObject0);\n assertEquals(1, jSONObject1.length());\n \n jSONObject0.toJSONArray((JSONArray) null);\n JSONObject jSONObject2 = jSONObject0.put(\"false\", (Object) \"false\");\n boolean boolean0 = jSONObject2.getBoolean(\"false\");\n assertFalse(boolean0);\n \n String string0 = JSONObject.quote(\"true\");\n assertEquals(\"\\\"true\\\"\", string0);\n }",
"private void asertEqualJSON(String json, String fieldName, String expectedValue) throws Exception {\n\n ObjectMapper objectMapper = new ObjectMapper();\n\n try {\n\n JsonNode rootNode = objectMapper.readTree(json);\n String value = rootNode.path(fieldName).asText();\n assertEquals(\"Expected for field <\" + fieldName + \"> value\", expectedValue, value);\n\n } catch (JsonParseException e) {\n System.err.println(\"Unable to compare field '\"+fieldName+\"' for expected value '\"+expectedValue+\"' \" + e.getMessage()); \n throw e;\n }\n\n }",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.getJSONArray(\"su\");\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Override\n public boolean isMissingNode() { return false; }",
"@Test\n public void testEmptyStringWithoutGetMethod() {\n JsonableTestClassWithoutGetMethod jtc = Jsonable.loadFromJson(\"{}\", JsonableTestClassWithoutGetMethod.class);\n assertEquals(0, jtc.publicDouble, 0);\n assertEquals(0, jtc.publicInt);\n assertEquals(0, jtc.publicFloat, 0);\n assertNull(jtc.publicString);\n assertEquals(0, jtc.getPrivateDouble(), 0);\n assertEquals(0, jtc.getPrivateFloat(), 0);\n assertEquals(0, jtc.getPrivateInt());\n assertNull(jtc.getPrivateString());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"publicDouble\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicFloat\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicInt\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicString\\\":\\\"\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateInt\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateFloat\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateDouble\\\":0\"));\n assertThat(jsonString, Matchers.not(Matchers.containsString(\"\\\"privateString\\\"\")));\n }",
"@Test\n public void testWithNonEmptyJsonObjectAsString() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(\"{\\\"test\\\":1}\");\n function.run(parameters);\n assertEquals(FALSE, parameters.pop());\n }",
"@Override\n\tpublic boolean isReadable(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType arg3) {\n\t\treturn arg0 == JSONObject.class && MediaType.APPLICATION_JSON_TYPE.equals(arg3);\n\t}",
"@Test(timeout = 4000)\n public void test061() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n jSONObject0.optLong(\"su\");\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"private void canCreateRegion(JsonNode json) {\n removeDynamicValues(json);\n assertThat(json, matchesSnapshot());\n }",
"public MatchStrength hasFormat(InputAccessor acc)\n/* */ throws IOException\n/* */ {\n/* 478 */ if (getClass() == JsonFactory.class) {\n/* 479 */ return hasJSONFormat(acc);\n/* */ }\n/* 481 */ return null;\n/* */ }",
"@Test\n void getAndFormatJson() {\n g.getJsonFromGitHub();\n String json = g.getJsonString();\n\n boolean isValid;\n try {\n new Gson().fromJson(json, Object.class);\n isValid = true;\n } catch(com.google.gson.JsonSyntaxException ex) {\n isValid = false;\n }\n assertTrue(isValid, \"Invalid JSON\");\n }",
"@Test(timeout = 4000)\n public void test15() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n StringWriter stringWriter0 = new StringWriter(12);\n Double.sum(0.0, (-2252.167794836282));\n Double.isFinite((-710.25));\n JSONObject.getNames((Object) stringWriter0);\n String string0 = \"\";\n String string1 = \"RT8u3l.~].,i\";\n JSONObject jSONObject1 = null;\n try {\n jSONObject1 = new JSONObject(\"RT8u3l.~].,i\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 1 of RT8u3l.~].,i\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"private boolean nodeRequiresInput() {\n boolean requiresInput = false;\n \n return requiresInput;\n }",
"private void checkValidTree(Node node) {\n node.walk(store::updateObject);\n assertTrue(service.validateTree(node));\n }",
"@Override\n public boolean validate(JsonElement el, StringBuilder sb) {\n return doValidate(el, sb);\n }",
"boolean hasMetadataJson();",
"@Test \n\tpublic void testTopologyNodes() { \n\t\tRestAssured.registerParser(\"text/plain\", Parser.JSON);\n\t\texpect().get(\"/rest/topo\").then().statusCode(200).assertThat().body(\"nodes\", Matchers.notNullValue());\n\t}",
"public static void jsonAssertAndValidate(JsonNode expected, JsonNode actual,\n Map<String, Object> fromMap, String... paths) throws IOException {\n }",
"private Node loadNode(JsonObject jsonNode) {\n Node returnedNode = null;\r\n\r\n returnedNode = loadStation(jsonNode);\r\n// case JSON_IS_LINE:\r\n// returnedNode = loadLine(jsonNode);\r\n// break;\r\n\r\n\r\n return returnedNode;\r\n }",
"@Test(timeout = 4000)\n public void test027() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"MnMG\";\n JSONObject jSONObject1 = jSONObject0.put(\"MnMG\", (Object) \"MnMG\");\n jSONObject0.optInt(\"MnMG\", (-646));\n try { \n jSONObject1.getBoolean(\"MnMG\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"MnMG\\\"] is not a Boolean.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test069() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Float> linkedList0 = new LinkedList<Float>();\n HashMap<Boolean, Integer> hashMap0 = new HashMap<Boolean, Integer>();\n JSONObject jSONObject1 = new JSONObject((Map) hashMap0);\n JSONArray jSONArray0 = jSONObject1.toJSONArray((JSONArray) null);\n assertNull(jSONArray0);\n }",
"@Test\n public void testWithEmptyJsonObject() throws org.nfunk.jep.ParseException\n {\n Stack<Object> parameters = CollectionsUtils.newParametersStack(new JSONObject());\n function.run(parameters);\n assertEquals(TRUE, parameters.pop());\n }",
"@Test(timeout = 4000)\n public void test089() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n String string0 = \"Qn<G\";\n jSONObject0.put(\"Qn<G\", (Object) \"Qn<G\");\n try { \n jSONObject0.getJSONArray(\"Qn<G\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"Qn<G\\\"] is not a JSONArray.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject();\n jSONObject1.putOpt(\"\", jSONObject0);\n Byte.compare((byte)47, (byte)47);\n JSONObject.quote(\"\");\n JSONObject jSONObject2 = jSONObject1.optJSONObject(\"\");\n assertNotSame(jSONObject1, jSONObject2);\n }",
"public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (IndirectFinancialOrgInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in IndirectFinancialOrgInfo is not found in the empty JSON string\", IndirectFinancialOrgInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!IndirectFinancialOrgInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `IndirectFinancialOrgInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n // ensure the json data is an array\n if (jsonObj.get(\"financial_org_cert_img\") != null && !jsonObj.get(\"financial_org_cert_img\").isJsonArray()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `financial_org_cert_img` to be an array in the JSON string but got `%s`\", jsonObj.get(\"financial_org_cert_img\").toString()));\n }\n if (jsonObj.get(\"financial_org_type\") != null && !jsonObj.get(\"financial_org_type\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `financial_org_type` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"financial_org_type\").toString()));\n }\n }",
"public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (VoucherPackageSalesInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in VoucherPackageSalesInfo is not found in the empty JSON string\", VoucherPackageSalesInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!VoucherPackageSalesInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `VoucherPackageSalesInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"pay_channel\") != null && !jsonObj.get(\"pay_channel\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `pay_channel` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"pay_channel\").toString()));\n }\n if (jsonObj.get(\"purchase_url\") != null && !jsonObj.get(\"purchase_url\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `purchase_url` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"purchase_url\").toString()));\n }\n if (jsonObj.get(\"sale_period_limit\") != null && !jsonObj.get(\"sale_period_limit\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `sale_period_limit` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"sale_period_limit\").toString()));\n }\n if (jsonObj.get(\"sale_price\") != null && !jsonObj.get(\"sale_price\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `sale_price` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"sale_price\").toString()));\n }\n }",
"@Test(timeout = 4000)\n public void test058() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n try { \n jSONObject1.getJSONObject(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a JSONObject.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test079() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n JSONObject jSONObject1 = new JSONObject((Object) \"gettoUpperCase\");\n jSONObject1.names();\n Integer integer0 = new Integer(92);\n JSONObject jSONObject2 = jSONObject0.append(\"gettoUpperCase\", integer0);\n jSONObject2.names();\n jSONObject0.optJSONArray(\"gettoUpperCase\");\n JSONObject.numberToString(integer0);\n Boolean boolean0 = new Boolean(true);\n JSONObject.testValidity(boolean0);\n }",
"boolean isAnyTypeReference();",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n Object object0 = JSONObject.NULL;\n JSONObject.valueToString(object0);\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray((Object) \"null\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test071() throws Throwable {\n JSONTokener jSONTokener0 = new JSONTokener(\"{o?Z\");\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Expected a ':' after a key at character 4 of {o?Z\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"protected boolean isJSONValid(String callReoprtResponse2) {\n try {\n new JSONObject(callReoprtResponse2);\n } catch (JSONException ex) {\n // edited, to include @Arthur's comment\n // e.g. in case JSONArray is valid as well...\n try {\n new JSONArray(callReoprtResponse2);\n } catch (JSONException ex1) {\n return false;\n }\n }\n return true;\n }",
"public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (BoxBusinessDistrictInfo.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in BoxBusinessDistrictInfo is not found in the empty JSON string\", BoxBusinessDistrictInfo.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!BoxBusinessDistrictInfo.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `BoxBusinessDistrictInfo` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n if (jsonObj.get(\"app_name\") != null && !jsonObj.get(\"app_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `app_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"app_name\").toString()));\n }\n if (jsonObj.get(\"business_district_id\") != null && !jsonObj.get(\"business_district_id\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `business_district_id` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"business_district_id\").toString()));\n }\n if (jsonObj.get(\"business_district_name\") != null && !jsonObj.get(\"business_district_name\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `business_district_name` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"business_district_name\").toString()));\n }\n if (jsonObj.get(\"relate_appid\") != null && !jsonObj.get(\"relate_appid\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `relate_appid` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"relate_appid\").toString()));\n }\n if (jsonObj.get(\"service_code\") != null && !jsonObj.get(\"service_code\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `service_code` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"service_code\").toString()));\n }\n }",
"public static void validateJsonObject(JsonObject jsonObj) throws IOException {\n if (jsonObj == null) {\n if (BankAccount.openapiRequiredFields.isEmpty()) {\n return;\n } else { // has required fields\n throw new IllegalArgumentException(String.format(\"The required field(s) %s in BankAccount is not found in the empty JSON string\", BankAccount.openapiRequiredFields.toString()));\n }\n }\n\n Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();\n // check to see if the JSON string contains additional fields\n for (Entry<String, JsonElement> entry : entries) {\n if (!BankAccount.openapiFields.contains(entry.getKey())) {\n throw new IllegalArgumentException(String.format(\"The field `%s` in the JSON string is not defined in the `BankAccount` properties. JSON: %s\", entry.getKey(), jsonObj.toString()));\n }\n }\n // validate the optional field bankAccountNumber\n if (jsonObj.get(\"bankAccountNumber\") != null && !jsonObj.get(\"bankAccountNumber\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankAccountNumber` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankAccountNumber\").toString()));\n }\n // validate the optional field bankCity\n if (jsonObj.get(\"bankCity\") != null && !jsonObj.get(\"bankCity\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankCity` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankCity\").toString()));\n }\n // validate the optional field bankLocationId\n if (jsonObj.get(\"bankLocationId\") != null && !jsonObj.get(\"bankLocationId\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankLocationId` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankLocationId\").toString()));\n }\n // validate the optional field bankName\n if (jsonObj.get(\"bankName\") != null && !jsonObj.get(\"bankName\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bankName` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bankName\").toString()));\n }\n // validate the optional field bic\n if (jsonObj.get(\"bic\") != null && !jsonObj.get(\"bic\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `bic` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"bic\").toString()));\n }\n // validate the optional field countryCode\n if (jsonObj.get(\"countryCode\") != null && !jsonObj.get(\"countryCode\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `countryCode` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"countryCode\").toString()));\n }\n // validate the optional field iban\n if (jsonObj.get(\"iban\") != null && !jsonObj.get(\"iban\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `iban` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"iban\").toString()));\n }\n // validate the optional field ownerName\n if (jsonObj.get(\"ownerName\") != null && !jsonObj.get(\"ownerName\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `ownerName` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"ownerName\").toString()));\n }\n // validate the optional field taxId\n if (jsonObj.get(\"taxId\") != null && !jsonObj.get(\"taxId\").isJsonPrimitive()) {\n throw new IllegalArgumentException(String.format(\"Expected the field `taxId` to be a primitive type in the JSON string but got `%s`\", jsonObj.get(\"taxId\").toString()));\n }\n }",
"@Test\n public void testEmptyStringWithGetMethod() {\n JsonableTestClassWithGetMethod jtc = Jsonable.loadFromJson(\"{}\", JsonableTestClassWithGetMethod.class);\n assertEquals(0, jtc.publicDouble, 0);\n assertEquals(0, jtc.publicInt);\n assertEquals(0, jtc.publicFloat, 0);\n assertNull(jtc.publicString);\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"publicDouble\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicFloat\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicInt\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicString\\\":\\\"\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateInt\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateFloat\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateDouble\\\":0\"));\n assertThat(jsonString, Matchers.not(Matchers.containsString(\"\\\"privateString\\\":\\\"\\\"\")));\n }",
"public void testImportNodeWithExactName() throws IOException, JsonException {\n \timportNodeWithExactName(\"exactNodeName\");\n }",
"boolean process(JsonElement element);",
"@Test(timeout = 4000)\n public void test081() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n JSONArray jSONArray0 = new JSONArray();\n jSONArray0.optBoolean(46);\n String string0 = \"su\";\n JSONObject jSONObject1 = jSONObject0.append(\"su\", jSONArray0);\n jSONObject1.isNull(\"su\");\n Integer integer0 = new Integer((-884));\n jSONObject1.append(\"su\", integer0);\n try { \n jSONObject1.getDouble(\"su\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONObject[\\\"su\\\"] is not a number.\n //\n verifyException(\"wheel.json.JSONObject\", e);\n }\n }",
"@Test\n public void validateWithSchema(){\n\n Schema schema = SchemaLoader.load(getSchemaJson());\n String jsonString=\"{bankInfo:{\\\"accountHolderName\\\":\\\"Way L\\\", \\\"institution\\\":\\\"TD\\\", \\\"transitNumber\\\":101, \\\"accountNumber\\\":123456789},\\\"email\\\":\\\"[email protected]\\\", \\\"phone\\\":\\\"416-336-6689\\\"}\";\n\n JSONObject json=null;\n try {\n json = new JSONObject(jsonString);\n }catch (Exception e){\n e.printStackTrace();\n }\n schema.validate(json);\n\n }",
"@Test(timeout = 4000)\n public void test08() throws Throwable {\n Double double0 = new Double((-1197.0));\n Double.sum(0.0, 0.0);\n Double.isFinite((-2514.460436234822));\n JSONObject.getNames((Object) double0);\n String string0 = \"\";\n JSONObject jSONObject0 = null;\n try {\n jSONObject0 = new JSONObject(\"\");\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONObject text must begin with '{' at character 0 of \n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }",
"abstract Object read(@NonNull JsonReader reader) throws IOException;",
"@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousTypeNodeShape() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomIndividualGraphRequestModel();\n\t requestModel.setClassNodeShape(SPACE);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}",
"@Test(timeout = 4000)\n public void test24() throws Throwable {\n double double0 = 0.0;\n Double double1 = new Double(0.0);\n JSONObject jSONObject0 = new JSONObject(double1);\n long long0 = 0L;\n Long long1 = new Long(0L);\n String string0 = \"] is not a JSONArray.\";\n HashMap<Float, JSONArray> hashMap0 = new HashMap<Float, JSONArray>();\n jSONObject0.optJSONArray(\"] is not a JSONArray.\");\n JSONArray jSONArray0 = new JSONArray();\n jSONObject0.toJSONArray(jSONArray0);\n float float0 = (-2236.0F);\n Float float1 = new Float((float) 0L);\n Object object0 = JSONObject.NULL;\n JSONArray jSONArray1 = null;\n try {\n jSONArray1 = new JSONArray(object0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }",
"public interface ATypeCheckNode {}",
"@Test\n public void testPublicValuesWithoutGetMethod() {\n JsonableTestClassWithoutGetMethod jtc = Jsonable.loadFromJson(\"{\\\"publicDouble\\\":4.765765,\\\"publicInt\\\":4765765,\\\"publicFloat\\\":4.7657,\\\"publicString\\\":\\\"String Value\\\"}\", JsonableTestClassWithoutGetMethod.class);\n assertEquals(4.765765, jtc.publicDouble, 0);\n assertEquals(4765765, jtc.publicInt);\n assertEquals(4.7657, jtc.publicFloat, .00001);\n assertEquals(\"String Value\", jtc.publicString);\n assertEquals(0, jtc.getPrivateDouble(), 0);\n assertEquals(0, jtc.getPrivateFloat(), 0);\n assertEquals(0, jtc.getPrivateInt());\n assertNull(jtc.getPrivateString());\n String jsonString = jtc.toJSON().toString();\n assertThat(jsonString, Matchers.containsString(\"\\\"publicDouble\\\":4.765765\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicFloat\\\":4.7657\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicInt\\\":4765765\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"publicString\\\":\\\"String Value\\\"\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateInt\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateFloat\\\":0\"));\n assertThat(jsonString, Matchers.containsString(\"\\\"privateDouble\\\":0\"));\n assertThat(jsonString, Matchers.not(Matchers.containsString(\"\\\"privateString\\\"\")));\n }",
"@Test(dataProvider = \"getInputs\")\n public final void patchOperationSerializationWorks(final JsonNode input)\n throws IOException\n {\n final String in = input.toString();\n final JsonPatchOperation op\n = mapper.readValue(in, JsonPatchOperation.class);\n\n /*\n * Check that the class of the operation is what is expected\n */\n assertSame(op.getClass(), c);\n\n /*\n * Now, write the operation as a String...\n */\n final String out = mapper.writeValueAsString(op);\n\n /*\n * And read it as a JsonNode again, then test for equality.\n *\n * The reason we do that is that JSON does not guarantee the order of\n * object members; but JsonNode's .equals() method will correctly handle\n * this event, and we trust its .toString().\n */\n final JsonNode output = mapper.readTree(out);\n assertTrue(EQUIVALENCE.equivalent(input, output));\n }",
"@Override\n public final JsonNode get(int index) { return null; }",
"public static void confirmNodeType(JsonNode node, JsonNodeType need_type,\n\t\t\tString node_name, Logger logger) throws JsonFilterException {\n\t\tif (need_type != node.getNodeType()) {\n\t\t\tString err = String.format(\"'%s' must be an %s, it is '%s'\",\n\t\t\t\t\tnode_name, need_type, node.getNodeType());\n\t\t\tif (logger != null) {\n\t\t\t\tlogger.error(err);\n\t\t\t}\n\t\t\tthrow new JsonFilterException(err);\n\t\t}\n\t}"
] | [
"0.6484642",
"0.60932845",
"0.6013013",
"0.59236306",
"0.58164984",
"0.5813122",
"0.57989854",
"0.5750813",
"0.5702792",
"0.5666276",
"0.56357455",
"0.558442",
"0.55794406",
"0.5545757",
"0.54793066",
"0.54417443",
"0.54386616",
"0.54340386",
"0.5431082",
"0.5428507",
"0.541229",
"0.54111",
"0.54110855",
"0.5408108",
"0.5383019",
"0.5381554",
"0.53728807",
"0.5372106",
"0.5359584",
"0.53458774",
"0.5343551",
"0.5343246",
"0.53406864",
"0.53403944",
"0.53262883",
"0.53164256",
"0.5308095",
"0.5307823",
"0.5302374",
"0.53022426",
"0.5300057",
"0.5289859",
"0.5287184",
"0.5284044",
"0.52800864",
"0.52672064",
"0.5258338",
"0.5253486",
"0.5246956",
"0.5242239",
"0.52415293",
"0.52384955",
"0.5231085",
"0.52151006",
"0.52128637",
"0.5201554",
"0.5198736",
"0.5197059",
"0.51962966",
"0.5192631",
"0.5186998",
"0.5185107",
"0.5174034",
"0.51669645",
"0.5163553",
"0.5151891",
"0.51420146",
"0.51381373",
"0.5122709",
"0.5122241",
"0.5120483",
"0.5109753",
"0.50999695",
"0.5096085",
"0.5095362",
"0.5090677",
"0.5089488",
"0.5088745",
"0.50841105",
"0.50828654",
"0.50767434",
"0.50756794",
"0.5071567",
"0.5069212",
"0.5064335",
"0.50523466",
"0.50453085",
"0.50403666",
"0.5035262",
"0.5025699",
"0.5014607",
"0.50106937",
"0.5009134",
"0.50085396",
"0.5000892",
"0.4998776",
"0.49984363",
"0.49959284",
"0.49934575",
"0.49895048"
] | 0.60739 | 2 |
/ / Support for traversalasstream | @Override
public JsonParser traverse(ObjectReadContext readCtxt) {
return new TreeTraversingParser(this, readCtxt);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String traverseStream(InputStream stream){\n\n\t\tScanner input = new Scanner(stream);\n\t\tString res = \"\";\n\n\t\twhile(input.hasNext()){\n\t\t\tres += input.next() + \" \";\n\t\t}\n\n\t\treturn res;\n\t}",
"protected abstract List<List<SearchResults>> processStream();",
"public interface Stream {\n\tpublic char getNext();\t\n\tpublic boolean hasNext();\n}",
"protected abstract void traverse();",
"IEmpleado next();",
"default Stream<Token<?>> stream() {\n return stream(true);\n }",
"Iterable<T> followNode(T start) throws NullPointerException;",
"@Override\r\n\tpublic Node visitStreamPattern(StreamPatternContext ctx) {\n\t\treturn super.visitStreamPattern(ctx);\r\n\t}",
"protected void beginTraversal(SoNode node)\n\t //\n\t {\n\t traverse(node);\n\t }",
"Iterable<T> followNodeAndSelef(T start) throws NullPointerException;",
"DataStreamApi getDataStreamApi();",
"public abstract void read0(int aPosition, PageIOStream aStream);",
"boolean getStream();",
"XMLStreamReader createXMLStreamReader(DataObject sdo);",
"Stream<Token<?>> stream(final boolean includeChildren);",
"StreamReader underlyingReader();",
"public StreamInfo getStreamInformation(SrvSession sess, TreeConnection tree, StreamInfo streamInfo)\n throws IOException {\n\n // DEBUG\n \n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"### getStreamInformation() called ###\");\n \n // TODO Auto-generated method stub\n return null;\n }",
"public void processStreamInput() {\n }",
"public boolean continueTraversal() \r\n\t{\r\n\treturn true;\r\n\t}",
"void onNext(CorfuStreamEntries results);",
"public long getStream();",
"private Stream<String> processLines(Stream<String> lines) {\n System.out.println(\"processlines\" + Thread.currentThread().getName());\n Pattern pattern = Pattern.compile(\"<a href=\\\"([^\\\\/]*\\\\/)\\\".*\");\n\n return lines\n .map(s -> pattern.matcher(s))\n .filter(m -> m.matches())\n .map(m -> m.group(1))\n .filter(s -> !\"../\".equals(s));\n }",
"public synchronized boolean streamXML(String path, ContentHandler contentHandler,\n LexicalHandler lexicalHandler)\n throws SAXException, ProcessingException {\n NodeList list;\n boolean streamed = false;\n path = this.createPath(path);\n\n String[] pathComponents = DOMUtil.buildPathArray(path);\n if (pathComponents == null) {\n list = this.xpathProcessor.selectNodeList(this.data, path);\n } else {\n list = DOMUtil.getNodeListFromPath(data, pathComponents);\n }\n if (list != null && list.getLength() > 0) {\n streamed = true;\n for(int i = 0; i < list.getLength(); i++) {\n\n // the found node is either an attribute or an element\n if (list.item(i).getNodeType() == Node.ATTRIBUTE_NODE) {\n // if it is an attribute simple create a new text node with the value of the attribute\n String value = list.item(i).getNodeValue();\n contentHandler.characters(value.toCharArray(), 0, value.length());\n } else {\n // now we have an element\n // stream all children of this element to the resulting tree\n NodeList childs = list.item(i).getChildNodes();\n if (childs != null) {\n for(int m = 0; m < childs.getLength(); m++) {\n IncludeXMLConsumer.includeNode(childs.item(m), contentHandler, lexicalHandler);\n }\n }\n }\n }\n }\n\n return streamed;\n }",
"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}",
"@Override\n\tpublic void walk() {\n\t\t\n\t}",
"private static Stream<Path> listRecur(Path p) {\n if (Files.isDirectory(p)) {\n try {\n return Files.list(p).flatMap(DirectoryClassPath::listRecur);\n } catch (IOException e) {\n throw new UncheckedIOException(e);\n }\n } else {\n return Stream.of(p);\n }\n }",
"public interface IterativeReader\n{\n /**\n * Constant which specifies that the IterativeReader/IterativeWriter is not\n * done with nextRead/nextWrite.\n */\n public static final int CONTINUE = 0;\n /**\n * Constant which specifies that the IterativeReader/IterativeWriter is done\n * with nextRead/nextWrite. This means that the reading/writing is complete\n * and further calls of nextRead/nextWrite are not expected.\n */\n public static final int STOP = 1;\n\n /**\n * Specifies that numBytes bytes are to be read. The InputStream to read\n * from should be stored in the implementing class.\n * @param numBytes Number of bytes to read. This is only indicative. The\n * implementor may read more or less. Reading too less impacts performance\n * due to repeated nextRead calls. Reading too much more than numBytes leads\n * to performance impact due to buffer reallocation in case of\n * SplitInputStream and an IOException due to Empty Buffer in an\n * OutStreamToIterativeReader.<p>\n *\n * The InputStream returned for use by an IterativeReader by directio's\n * classes implement {@link ByteCounter} which can help in keeping track of\n * the number of bytes read or remaining during a nextRead call.\n * @return {@link #CONTINUE} to indicate that there is more to be read and\n * STOP to indicate that the IterativeReader is done with reading.\n * @exception IOException In case of an error during read. Note that data\n * errors can also be handled by returning STOP and storing the error\n * instead of throwing an Exception. This may be desirable for a\n * SplitInputStream since the main Read can continue unhindered by the\n * SubStream's error.\n */\n public int nextRead(int numBytes) throws IOException;\n}",
"@Override\n\t\tpublic FileInputStream nextElement() {\n\t\t\treturn fileStreams[index++];\n\t\t}",
"public Stream<Path> loadAll() {\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(\"File Retrived\");\n\t\t\treturn Files.walk(this.path, 1).filter(path->!path.equals(this.path)).map(this.path::relativize);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File Retrived Error\");\n\t\t}\n\t\treturn null;\n\t}",
"public abstract Iterator getCascadableChildrenIterator(EventSource session, CollectionType collectionType, Object collection);",
"public static void main(String[] args) {\n\t\tStream st = new Stream();\r\n\t\tSystem.out.println(\">>> Filtrar <<<\");\r\n\t\tst.filtrar();\r\n\t\tSystem.out.println(\">>> Transformar <<<\");\r\n\t\tst.transformar();\r\n\t\tSystem.out.println(\">>> Ordenar <<<\");\r\n\t\tst.ordenar();\r\n\t\tSystem.out.println(\">>> Limitar <<<\");\r\n\t\tst.limitar();\r\n\t\tSystem.out.println(\">>> Contar <<<\");\r\n\t\tst.contar();\r\n\t\t\r\n\t}",
"public Stream<Path> getDirectoryStream() throws IOException\n\t{\n\t\treturn Files.walk(this.root);\n\t}",
"private void seekBy() {\n Queue<File> queue = new LinkedList<>();\n queue.offer(new File(root));\n while (!queue.isEmpty()) {\n File file = queue.poll();\n File[] list = file.listFiles();\n if (file.isDirectory() && list != null) {\n for (File tempFile : list) {\n queue.offer(tempFile);\n }\n } else {\n if (args.isFullMatch() && searchingFile.equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isMask() && searchingFile.replaceAll(\"\\\\*\", \".*\").equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isRegex() && file.getName().matches(args.getName())) {\n result.add(file);\n }\n }\n }\n this.writeLog(output, result);\n }",
"void read(StreamOption streamOpt);",
"@Test\n public void Traversal_Test()\n {\n\n ct = new CompoundTransaction(\"compound1\");\n ct1 = new CompoundTransaction(\"compound2\");\n\n acc3 = new Account(3,\"Jacob&Leon3\",2000);\n\n acc_db.addAccount(acc);\n acc_db.addAccount(acc2);\n acc_db.addAccount(acc3);\n\n Transaction atomic = new Transaction(\"atomic1\", acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),100);\n Transaction atomic2 =new Transaction(\"atomic2\", acc_db,acc3.get_Account_Number(),acc2.get_Account_Number(),100);\n Transaction atomic3 = new Transaction(\"atomic3\",acc_db,acc.get_Account_Number(),acc2.get_Account_Number(),200);\n\n ct.addTransaction(atomic);\n ct.addTransaction(atomic2);\n\n ct1.addTransaction(atomic3);\n\n ct.addTransaction(ct1);\n\n //Desired Output\n List<Transaction> desired_output = new ArrayList<Transaction>();\n\n desired_output.add(atomic);\n desired_output.add(atomic2);\n desired_output.add(atomic3);\n\n Iterator my_iter = new Iterator(ct);\n\n Assert.assertEquals(desired_output.size(),my_iter.getTraversal_result().size());\n Assert.assertEquals(true,my_iter.getTraversal_result().contains(atomic));\n Assert.assertEquals(true,my_iter.getTraversal_result().contains(atomic2));\n Assert.assertEquals(true,my_iter.getTraversal_result().contains(atomic3));\n }",
"@Override\n\tpublic void next() {\n\t\t\n\t}",
"private static void iterator() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void walk() {\n\r\n\t}",
"@Override\r\n\tpublic void next() {\n\n\t}",
"@Override\r\n public Object next() {\r\n if (this.hasNext()) {\r\n Object temp = this.nextMatchingFile;\r\n this.nextMatchingFile = this.callNext();\r\n return temp;\r\n } else {\r\n throw new NoSuchElementException(\"There is no other file object in the directory.\");\r\n }\r\n}",
"Split getNext();",
"public interface StreamGenerator {\n Interpretation next();\n\n boolean hasNext();\n\n void reset();\n}",
"@Test\n public void test6() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1352,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test6\");\n LinkedList<String> linkedList0 = new LinkedList<String>();\n SingletonListIterator<LinkedList<String>> singletonListIterator0 = new SingletonListIterator<LinkedList<String>>(linkedList0);\n Iterator<Object> iterator0 = IteratorUtils.peekingIterator((Iterator<?>) singletonListIterator0);\n assertEquals(true, iterator0.hasNext());\n }",
"public StreamInfoList getStreamList(SrvSession sess, TreeConnection tree, String fileName)\n throws IOException {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Get the file state for the top level file\n \n FileState fstate = getFileState(fileName, dbCtx, true);\n \n // Check if the file state already has the streams list cached\n \n StreamInfoList streamList = (StreamInfoList) fstate.findAttribute(DBStreamList);\n if ( streamList != null)\n return streamList;\n \n // Get the main file information and convert to stream information\n \n DBFileInfo finfo = getFileDetails(fileName,dbCtx, fstate);\n \n // Create the stream list\n \n streamList = new StreamInfoList();\n \n StreamInfo sinfo = new StreamInfo(\"::$DATA\", finfo.getFileId(), 0, finfo.getSize(), finfo.getAllocationSize());\n streamList.addStream(sinfo);\n\n // Get the list of streams\n \n StreamInfoList sList = loadStreamList(fstate, finfo, dbCtx, true);\n if ( sList != null) {\n \n // Copy the stream information to the main list\n \n for ( int i = 0; i < sList.numberOfStreams(); i++) {\n \n // Add the stream to the main list\n\n streamList.addStream(sList.getStreamAt(i));\n }\n }\n\n // Cache the stream list\n \n fstate.addAttribute(DBStreamList, streamList);\n \n // Return the stream list\n \n return streamList;\n }",
"public abstract Stream<E> streamBlockwise();",
"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 }",
"private String readToken( PushbackInputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n stream.unread( c );\n done = true;\n break;\n case ' ':\n case '\\t':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }",
"@Override\n E next();",
"public abstract boolean hasNext() throws TrippiException;",
"protected void openStream ()\n {\n stream = Util.stream (entry, \"Holder.java\");\n }",
"abstract void walk();",
"@Override\n\tpublic void next()\n\t{\n\n\t}",
"public boolean next() throws IOException;",
"Stream<Line> stream(Consumer<JSaParException> errorConsumer) throws IOException;",
"public void next();",
"public void next();",
"@Test\n public void test19() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1339,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test19\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode(\"\");\n NodeListIterator nodeListIterator0 = IteratorUtils.nodeListIterator((NodeList) iIOMetadataNode0);\n assertEquals(false, nodeListIterator0.hasNext());\n }",
"void visitEchoNode(EchoNode node);",
"@Override\n public final boolean isStreaming() {\n return false;\n }",
"public Boolean isTraversable(FileObject f)\n {\n return null;\n }",
"@Test\n public void test4() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(579,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test4\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n iIOMetadataNode0.insertBefore((Node) iIOMetadataNode0, (Node) iIOMetadataNode0);\n NodeListIterator nodeListIterator0 = new NodeListIterator((NodeList) iIOMetadataNode0);\n boolean boolean0 = nodeListIterator0.hasNext();\n assertEquals(true, boolean0);\n }",
"Datastream asDatastream(Node node) throws ResourceTypeException;",
"void next();",
"public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }",
"private static void traverse(ItemInfo rootItem, List<ItemInfo> results, int depth, String extraAttributes) throws Exception {\n Objects.requireNonNull(extraAttributes);\n\n final Collection<ItemInfo> children = new ArrayList<>();\n\n// final URL itemURL\n// = UriBuilder\n// .fromUri(rootItem.href.replace(\" \", \"%20\"))\n// .queryParam(\"attributes\", extraAttributes)\n// .build()\n// .toURL();\n\n final HttpURLConnection getItemConnection = (HttpURLConnection) rootItem.href.openConnection();\n getItemConnection.setConnectTimeout(PlatformTools.getDefaultConnectionTimeoutms());\n getItemConnection.setReadTimeout(PlatformTools.getDefaultReadTimeoutms());\n getItemConnection.setRequestProperty(\"Accept\", \"application/hal+json\");\n\n final int itemStatus = getItemConnection.getResponseCode();\n if (HttpURLConnection.HTTP_OK == itemStatus) {\n final String rawItemPageResults = PlatformTools.getContent(getItemConnection);\n final JSONObject itemResult = JSONObject.fromObject(rawItemPageResults);\n results.add(new ItemInfo(itemResult, depth));\n\n final JSONObject embedded = (JSONObject) itemResult.get(\"_embedded\");\n JSONObject collection = null;\n if (null != embedded) {\n collection = (JSONObject) embedded.get(\"loc:collection\");\n }\n // The item to traverse is a folder:\n if (null != collection) {\n // Get the items of the folder pagewise:\n JSONObject embeddedItems = (JSONObject) collection.get(\"_embedded\");\n if (null != embeddedItems) {\n do {\n final Object itemsObject = embeddedItems.get(\"loc:item\");\n if (null != itemsObject) {\n if (itemsObject instanceof JSONArray) {\n final JSONArray items = (JSONArray) itemsObject;\n\n final Collection<ItemInfo> itemPage = new ArrayList<>(items.size());\n for (final Object item : items) {\n final JSONObject folderItem = (JSONObject) item;\n itemPage.add(new ItemInfo(folderItem, depth + 1));\n }\n children.addAll(itemPage);\n } else {\n children.add(new ItemInfo((JSONObject) itemsObject, depth + 1));\n }\n }\n\n final JSONObject linkToNextPage = (JSONObject) collection.getJSONObject(\"_links\").get(\"next\");\n if (null != linkToNextPage) {\n final HttpURLConnection itemNextPageConnection = (HttpURLConnection) new URL(linkToNextPage.getString(\"href\").replace(\" \", \"%20\")).openConnection();\n itemNextPageConnection.setConnectTimeout(PlatformTools.getDefaultConnectionTimeoutms());\n itemNextPageConnection.setReadTimeout(PlatformTools.getDefaultReadTimeoutms());\n itemNextPageConnection.setRequestProperty(\"Accept\", \"application/hal+json\");\n\n final int itemNextPageStatus = itemNextPageConnection.getResponseCode();\n if (HttpURLConnection.HTTP_OK == itemNextPageStatus) {\n final String rawNextItemPageResults = PlatformTools.getContent(itemNextPageConnection);\n collection = JSONObject.fromObject(rawNextItemPageResults);\n embeddedItems = (JSONObject) collection.get(\"_embedded\");\n } else {\n collection = null;\n }\n } else {\n collection = null;\n }\n } while (null != collection && null != embeddedItems);\n }\n }\n\n for (final ItemInfo item : children) {\n if (item.hasChildren) {\n traverse(item, results, depth + 1, extraAttributes);\n }\n }\n\n for (final ItemInfo item : children) {\n if (!item.hasChildren) {\n results.add(item);\n }\n }\n } else {\n LOG.log(Level.INFO, \"Get item failed for item <{0}>. -> {1}\", new Object[] {rootItem.href, PlatformTools.getContent(getItemConnection)});\n }\n }",
"@Test\n public void test6() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(581,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test6\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n iIOMetadataNode0.insertBefore((Node) iIOMetadataNode0, (Node) iIOMetadataNode0);\n NodeListIterator nodeListIterator0 = new NodeListIterator((NodeList) iIOMetadataNode0);\n assertEquals(true, nodeListIterator0.hasNext());\n \n nodeListIterator0.next();\n assertEquals(false, nodeListIterator0.hasNext());\n }",
"public TraversalResults traverse(ObjectNode traverse);",
"default Stream<E> stream() {\n return StreamSupport.stream(this.spliterator(), false);\n }",
"boolean hasNext(){\n\t\treturn stream.hasNext();\n\t}",
"@Test\n public void verifyStreamTest() throws ApiException {\n String chainId = null;\n File stream = null;\n // VerifyContentResponse response = api.verifyStream(chainId, stream);\n\n // TODO: test validations\n }",
"@Override\r\n\tpublic List<Node<T>> getInOrderTraversal() {\r\n\t\tList<Node<T>> lista = new LinkedList<Node<T>>();// Lista para el\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// recursivo\r\n\t\tlista = auxiliarRecorridoIn(raiz, lista, raiz);\r\n\t\treturn lista;\r\n\t}",
"@Test()\n public void findPessoaStream() {\n try (Session session = factoryJpa.openSession()) {\n Stream<Perfil> perfilUsandoNameQueryComStream = findPerfilUsandoNameQueryComStream(session, nome);\n perfilUsandoNameQueryComStream.forEach(System.out::println);\n }\n }",
"public List<Tailor> read();",
"@Override\n public Spliterator<ContentHandle> spliterator() {\n throw new UnsupportedOperationException();\n }",
"@Test\n public void test3() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(578,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test3\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n NodeListIterator nodeListIterator0 = new NodeListIterator((Node) iIOMetadataNode0);\n boolean boolean0 = nodeListIterator0.hasNext();\n assertEquals(false, boolean0);\n }",
"@Override\n\t\t\t\t\tpublic void onNext(Object p1) {\n\t\t\t\t\t}",
"public abstract void next ();",
"@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }",
"protected final void deleteStream(SrvSession sess, TreeConnection tree, String name)\n throws IOException {\n\n // Access the JDBC context\n\n DBDeviceContext dbCtx = (DBDeviceContext) tree.getContext();\n\n // Parse the path string to get the directory, file name and stream name\n \n String[] paths = FileName.splitPathStream(name);\n\n // Get, or create, the file state for main file path and stream\n \n String filePath = paths[0] + paths[1];\n FileState fstate = getFileState(filePath, dbCtx, true);\n FileState sstate = getFileState(name, dbCtx, false);\n\n // Check if the file is within an active retention period\n \n if ( fstate.hasActiveRetentionPeriod())\n throw new AccessDeniedException(\"File retention active\");\n\n\n // Get the top level file information\n \n DBFileInfo finfo = getFileDetails(filePath,dbCtx, fstate);\n \n // Get the stream list for the top level file\n \n StreamInfoList streamList = (StreamInfoList) fstate.findAttribute(DBStreamList);\n if ( streamList == null)\n streamList = loadStreamList(fstate, finfo, dbCtx, true);\n \n if ( streamList == null)\n throw new FileNotFoundException(\"Stream not found, \" + name);\n \n // Find the required stream details\n \n StreamInfo sInfo = streamList.findStream(paths[2]);\n if ( sInfo == null)\n throw new FileNotFoundException(\"Stream not found, \" + name);\n\n // Delete the stream record from the database\n \n try {\n\n // Call the file loader to delete the stream data\n \n dbCtx.getFileLoader().deleteFile(name, sInfo.getFileId(), sInfo.getStreamId());\n \n // Delete the stream record\n \n dbCtx.getDBInterface().deleteStreamRecord(sInfo.getFileId(), sInfo.getStreamId(), dbCtx.isTrashCanEnabled());\n \n // Remove the stream information from the in memory list\n \n streamList.removeStream(sInfo.getName());\n \n // Set the streams file state to indicate that it does not exist\n \n if ( sstate != null)\n sstate.setFileStatus( FileStatus.NotExist);\n }\n catch (DBException ex) {\n Debug.println(\"Error: \" + ex.toString());\n Debug.println(ex);\n }\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(traverse(0,0,5,5));\r\n\t}",
"@Override\n\tpublic TokenStream getStream() {\n\t\treturn t_stream;\n\t}",
"protected boolean acceptForTraversal(Atom atom)\r\n {\r\n return true;\r\n }",
"public abstract void next();",
"SearchResult findNext(SearchResult result);",
"String directsTo();",
"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 StreamContainer(String name){\n\t\tindices = new Vector<Integer>();\n\t\tindices.add(0);\n\t\tcontenido = name + ':';\n\t}",
"void seekToFirst();",
"@Override\n\tprotected void flowThrough(Object in, Object d, Object out) {\n\t\t\n\t}",
"Object peek();",
"public JsonObject readStream(HashMap<String,String> meta, String name, InputStream stream, long length, StringBuilder errors) {\n try{\n javax.json.JsonReader rdr = Json.createReader(stream);\n return rdr.readObject();}\n catch(Exception ex) {errors.append(ex.toString());}\n return null;}",
"public void test_002_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_002_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss, cached by RFC\n sendRequest2(request, 0);\n // R1.2 hit\n checkHit(request, 2, VALID_RESPONSE);\n }",
"public static GetFilesFromUserResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\r\n GetFilesFromUserResponse object =\r\n new GetFilesFromUserResponse();\r\n\r\n int event;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix =\"\";\r\n java.lang.String namespaceuri =\"\";\r\n try {\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n \r\n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n if (fullTypeName!=null){\r\n java.lang.String nsPrefix = null;\r\n if (fullTypeName.indexOf(\":\") > -1){\r\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\r\n }\r\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\r\n \r\n if (!\"getFilesFromUserResponse\".equals(type)){\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\r\n return (GetFilesFromUserResponse)ExtensionMapper.getTypeObject(\r\n nsUri,type,reader);\r\n }\r\n \r\n\r\n }\r\n \r\n\r\n }\r\n\r\n \r\n\r\n \r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n \r\n\r\n \r\n \r\n reader.next();\r\n \r\n java.util.ArrayList list1 = new java.util.ArrayList();\r\n \r\n \r\n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\r\n \r\n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n \r\n \r\n // Process the array and step past its final element's end.\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n \r\n reader.next();\r\n } else {\r\n list1.add(reader.getElementText());\r\n }\r\n //loop until we find a start element that is not part of this array\r\n boolean loopDone1 = false;\r\n while(!loopDone1){\r\n // Ensure we are at the EndElement\r\n while (!reader.isEndElement()){\r\n reader.next();\r\n }\r\n // Step out of this element\r\n reader.next();\r\n // Step to next element event.\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n if (reader.isEndElement()){\r\n //two continuous end elements means we are exiting the xml structure\r\n loopDone1 = true;\r\n } else {\r\n if (new javax.xml.namespace.QName(\"http://registry\",\"return\").equals(reader.getName())){\r\n \r\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\r\n if (\"true\".equals(nillableValue) || \"1\".equals(nillableValue)){\r\n list1.add(null);\r\n \r\n reader.next();\r\n } else {\r\n list1.add(reader.getElementText());\r\n }\r\n }else{\r\n loopDone1 = true;\r\n }\r\n }\r\n }\r\n // call the converter utility to convert and set the array\r\n \r\n object.set_return((java.lang.String[])\r\n list1.toArray(new java.lang.String[list1.size()]));\r\n \r\n } // End of if for expected property start element\r\n \r\n else {\r\n \r\n }\r\n \r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n \r\n if (reader.isStartElement())\r\n // A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getName());\r\n \r\n\r\n\r\n\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }",
"private synchronized Pair<K, V> seekInternal(K key) throws IOException {\n\t\t\treadIndex(); // make sure index is read\n\n\t\t\tLong pos = keys.get(key);\n\t\t\tif (pos != null) {\n\t\t\t\tdata.seek(pos);\n\t\t\t\treturn data.next();\n\t\t\t} else\n\t\t\t\treturn null;\n\t\t}",
"public String getStream(){\n return this.stream;\n }",
"NodeList getNodeList(String path)\n throws ProcessingException;",
"public Iterator trip() {\n\t\tStack path = new Stack();\n\t\ttry {\n\t\t\t// initializes path to the stack of nodes from starting point to end\n\t\t\t// point\n\t\t\tpath = path(BusLines, BusLines.getNode(start), BusLines.getNode(dest));\n\n\t\t\t// checks if there is a path, otherwise return null\n\t\t\tif (path == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\treturn path.iterator();\n\t\t\t}\n\t\t} catch (GraphException e) {\n\t\t\tSystem.out.println(\"Error: the path does not exists.\");\n\t\t}\n\t\treturn null;\n\n\t}",
"public void test_001_Stream() throws Throwable {\n\n final String RESOURCE_URI = \"asimov_it_test_001_SP_PROXYING\";\n String uri = createTestResourceUri(RESOURCE_URI);\n\n HttpRequest request = createRequest().setUri(uri).addHeaderField(\"Cache-Control\" ,\"max-age=500\").getRequest();\n PrepareResourceUtil.prepareResource(uri, false);\n\n //miss\n sendRequest2(request, 10);\n //R1.2 miss\n checkMiss(request, 2, VALID_RESPONSE);\n }",
"public static Stream<Node> preorderStream(Node node) {\n return StreamSupport.stream(new PreorderSpliterator<>(n -> {\n final NodeList childNodes = n.getChildNodes();\n return () -> new ChildIterator<>(childNodes.getLength(), childNodes::item);\n }, node), false);\n }",
"public Stream getStream(Streamable type){\n return Stream.builder().add(type).build() ;\n }",
"@Override\n\tpublic void read(InStream inStream) {\n\t}"
] | [
"0.6154569",
"0.5870997",
"0.56327605",
"0.56217605",
"0.54957414",
"0.533468",
"0.5306069",
"0.5265398",
"0.5198504",
"0.51968056",
"0.51733905",
"0.5078643",
"0.50410867",
"0.5009983",
"0.4996359",
"0.49844068",
"0.49656674",
"0.49573246",
"0.4954139",
"0.48921484",
"0.4891659",
"0.48527208",
"0.48418504",
"0.48343974",
"0.48322117",
"0.48205757",
"0.48068303",
"0.48047346",
"0.48033",
"0.48007485",
"0.4786892",
"0.47765446",
"0.47741926",
"0.47706765",
"0.47667292",
"0.47464103",
"0.4744122",
"0.47374663",
"0.47372967",
"0.4726681",
"0.47225726",
"0.47178012",
"0.47155434",
"0.4713692",
"0.47101927",
"0.47045663",
"0.47032776",
"0.4701964",
"0.47015634",
"0.46928868",
"0.4691954",
"0.46891388",
"0.468702",
"0.46838465",
"0.46787894",
"0.46787894",
"0.46780643",
"0.46775532",
"0.46772537",
"0.46738055",
"0.4673044",
"0.46687558",
"0.46669602",
"0.46591333",
"0.46559644",
"0.46552774",
"0.4654594",
"0.46511117",
"0.46475783",
"0.46373293",
"0.46310645",
"0.4626514",
"0.46188328",
"0.46180382",
"0.4616551",
"0.46164656",
"0.4614365",
"0.46107602",
"0.46105352",
"0.4610052",
"0.4607897",
"0.46039706",
"0.46015623",
"0.45995122",
"0.45989254",
"0.4591084",
"0.45863953",
"0.45859677",
"0.4585647",
"0.45814815",
"0.45784262",
"0.4576857",
"0.45737904",
"0.4569236",
"0.4568711",
"0.45663738",
"0.4565701",
"0.4563171",
"0.45631528",
"0.45586377",
"0.45527193"
] | 0.0 | -1 |
Returns code that identifies type of underlying numeric value, if (and only if) node is a number node. | @Override
public JsonParser.NumberType numberType() {
// most types non-numeric, so:
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public abstract JsonParser.NumberType numberType();",
"public Number getNumberValue();",
"public abstract Number getPrimitiveType();",
"public abstract boolean isNumeric();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"int getTypeValue();",
"public int getNumericValue() {\n return value;\n }",
"public static boolean numeric(Type p) {\n\t\tif (p == Type.Char || p == Type.Int || p == Type.Float) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public int getNumericValue() {\n return value;\n }",
"public boolean isNumberValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_NUMBER);\n }",
"public boolean isNumeric() {\n\t\tif (this instanceof Integer) {\n\t\t\treturn true;\n\t\t} else if (this instanceof Array) {\n\t\t\treturn ((Array) this).getElementType().isNumeric();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"@Override\n\tpublic Object visit(ASTNum node, Object data)\n\t{\n\t\tFormulaSemantics semantics = (FormulaSemantics) data;\n\t\tif (node.jjtGetNumChildren() != 0)\n\t\t{\n\t\t\tFormulaSemanticsUtilities.setInvalid(semantics,\n\t\t\t\tgetInvalidCountReport(node, 0));\n\t\t\treturn semantics;\n\t\t}\n\t\ttry\n\t\t{\n\t\t\tDouble.parseDouble(node.getText());\n\t\t\tsemantics.setInfo(FormulaSemanticsUtilities.SEM_FORMAT,\n\t\t\t\tnew FormulaFormat(NUMBER_CLASS));\n\t\t}\n\t\tcatch (NumberFormatException e)\n\t\t{\n\t\t\tFormulaSemanticsUtilities.setInvalid(semantics, node.getClass()\n\t\t\t\t+ \" had invalid number: \" + node.getText());\n\t\t}\n\t\treturn semantics;\n\t}",
"@Override\n\tpublic int getNumericCode() {\n\t\treturn 0;\n\t}",
"protected IExpressionValue getNum() throws TableFunctionMalformedException {\r\n\t\tvalue = \"\";\r\n\r\n\t\tif (!((isNumeric(look)) || ((look == '.') && (value.indexOf('.') == -1))))\r\n\t\t\texpected(\"Number\");\r\n\r\n\t\twhile ((isNumeric(look))\r\n\t\t\t\t|| ((look == '.') && (value.indexOf('.') == -1))) {\r\n\t\t\tvalue += look;\r\n\t\t\tnextChar();\r\n\t\t}\r\n\r\n\t\ttoken = '#';\r\n\t\tskipWhite();\r\n\r\n\t\t// Debug.println(\"GetNum returned \" + Float.parseFloat(value));\r\n\t\treturn new SimpleProbabilityValue(Float.parseFloat(value));\r\n\t}",
"public int getNumeric() {\r\n\t\treturn numeric;\r\n\t}",
"short getNodeType(Object node);",
"@Override\n public Type evaluateType() throws Exception {\n return new IntegerType();\n }",
"long getNumericField();",
"public String getType(JmmNode node) {\n switch (node.getKind()) {\n case \"Add\":\n case \"Sub\":\n case \"Mul\":\n case \"Div\":\n return \"int\";\n\n case \"LessThan\":\n case \"And\":\n case \"Not\":\n return \"boolean\";\n\n case \"Var\":\n return getVariableSymbol(node.get(\"name\")).getType().getName();\n default:\n return null;\n }\n }",
"int getDataTypeValue();",
"private Token number() {\n\t\tStringBuffer sb = new StringBuffer();\n\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t}\n\t\t//处理小数\n\t\tif(this.currentChar == '.') {\n\t\t\tsb.append(this.currentChar);\n\t\t\tnext_char();\n\t\t\t\n\t\t\twhile(isDigit(this.currentChar) && this.pos != Integer.MIN_VALUE) {\n\t\t\t\tsb.append(this.currentChar);\n\t\t\t\tnext_char();\n\t\t\t}\n\t\t\treturn new Token(Type.REAL_CONST, sb.toString());\n\t\t}else {\n\t\t\treturn new Token(Type.INTEGER_CONST, sb.toString());\n\t\t}\n\t}",
"@Override\n\tpublic Type visit(TLANumber tlaNumber) throws RuntimeException {\n\t\tif (tlaNumber.getVal().contains(\".\")) {\n\t\t\treturn new RealType(Collections.singletonList(tlaNumber));\n\t\t}\n\t\treturn TLABuiltins.getPolymorphicNumberType(tlaNumber, solver, generator);\n\t}",
"public static Number asNumber(Object value) {\n Number num = null;\n if (value == null) {\n num = null;\n } else if (value instanceof Number) {\n num = (Number) value;\n } else if (value instanceof Boolean) {\n num = ((Boolean) value) ? 1 : 0;\n }\n return num;\n }",
"public Object getValue(JmmNode node) {\n Object left = (node.getNumChildren() > 0) ? getValue(node.getChildren().get(0)) : null;\n Object right = (node.getNumChildren() > 1) ? getValue(node.getChildren().get(1)) : null;\n\n switch (node.getKind()) {\n case \"Add\":\n return ((left == null) || (right == null)) ? null : (Integer) left + (Integer) right;\n case \"Sub\":\n return ((left == null) || (right == null)) ? null : (Integer) left - (Integer) right;\n case \"Mul\":\n return ((left == null) || (right == null)) ? null : (Integer) left * (Integer) right;\n case \"Div\":\n return ((left == null) || (right == null)) ? null : (Integer) left / (Integer) right;\n case \"LessThan\":\n return ((left == null) || (right == null)) ? null : (Integer) left < (Integer) right;\n case \"And\":\n return ((left == null) || (right == null)) ? null : (Boolean) left && (Boolean) right;\n case \"Not\":\n return (left == null) ? null : !(Boolean) left;\n case \"Int\":\n return Integer.parseInt(node.get(\"value\"));\n case \"False\":\n return false;\n case \"True\":\n return true;\n case \"Var\":\n return getVariableValue(getVariableSymbol(node.get(\"name\")));\n default:\n return null;\n }\n }",
"public Literal getLiteralNumber(Double literalData);",
"public Class<?> getPrimitiveType();",
"NumberValue createNumberValue();",
"@Test\n\tpublic void testNumberType() throws Exception {\n\t\tassertThat(0, is(0));\n\t}",
"public int getNumericValue() {\n return Integer.parseInt(value);\n }",
"public boolean isNumeric() {\n return this.isInteger() || this.isDecimal() || this.isDouble();\n }",
"public String getPrimitiveType() {\r\n return type;\r\n }",
"Num\t\tgetNumValue();",
"boolean isNumeric() {\r\n\t\treturn isNumeric;\r\n\t}",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"java.lang.String getNumber();",
"public org.ccsds.moims.mo.mal.structures.UInteger getNumericValue()\n {\n return _ENUMERATION_NUMERIC_VALUES[ordinal];\n }",
"@Override\n public boolean ll_isPrimitiveType(int typeCode) {\n return !ll_isRefType(typeCode);\n }",
"public int getValueType() {\n\t\t\treturn valueType;\n\t\t}",
"public Integer getType() {\n\t\treturn (Integer) getValue(3);\n\t}",
"@Override\n\tpublic Type generateIntermediateCode(Function fun) {\n\t\tif(number instanceof Double)\n\t\t\treturn Type.FLOAT;\n\t\telse if (number instanceof Integer)\n\t\t\treturn Type.INT;\n\t\treturn Type.NULL;\n\t\t\t\n\t}",
"@Override\n\tpublic Class<Number> getAcceptedBinClass () {\n\t\treturn Number.class;\n\t}",
"@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }",
"public boolean isNumeric() {\n\t\treturn numeric;\n\t}",
"public Class<?> getType()\r\n {\r\n return Integer.class;\r\n }",
"public Integer getNumberValue()\n\t{\n\t\treturn (number == null) ? null : number.value;\n\t}",
"public default boolean hasNumber() {\n\t\treturn false;\n\t}",
"@Override\r\n\t\tpublic short getNodeType()\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public LlvmValue visit(IntegerType n){\n\t\treturn LlvmPrimitiveType.I32;\n\t}",
"public double toNumber(org.w3c.dom.Node n){\n int nodeHandle=getDTMHandleFromNode(n);\n DTM dtm=getDTM(nodeHandle);\n XString xobj=(XString)dtm.getStringValue(nodeHandle);\n return xobj.num();\n }",
"public boolean testForNumber() throws IOException {\n int token = fTokenizer.nextToken();\n\tfTokenizer.pushBack();\n return (token == StreamTokenizer.TT_NUMBER);\n }",
"public static boolean isNumberType(byte t) {\n switch (t) {\n case INTEGER: return true ;\n case LONG: return true ;\n case FLOAT: return true ;\n case DOUBLE: return true ;\n case BIGINTEGER: return true ;\n case BIGDECIMAL: return true ;\n default: return false ;\n }\n }",
"public Integer getTypeCode() {\n return typeCode;\n }",
"@Test\n public void testTypeOf() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst);\n Utils.testTypeOf(context, ConstraintType.TYPE_OF, cValue);\n cValue.release();\n }",
"default T handleNumber(double val) {\n throw new UnsupportedOperationException();\n }",
"public static Value makeAnyNum() {\n return theNumAny;\n }",
"public int getDataTypeValue() {\n return dataType_;\n }",
"public Integer getTypeCode() {\n return (Integer) getAttributeInternal(TYPECODE);\n }",
"boolean hasNumber();",
"NodeType getType();",
"private void processNumeric() {\n\n Token token = tokens.get(currentTokenPointer);\n\n String tokenString = string(token);\n\n pushIt(new ReplacementTransformer(tokenString));\n\n }",
"public PrimitiveType getPrimitiveType();",
"public static boolean esNumerico (int tipoSQL) {\n\t \n\t switch (tipoSQL) {\n\t \tcase Types.BIGINT :\n\t \tcase Types.DECIMAL :\n\t \tcase Types.DOUBLE :\n\t \tcase Types.FLOAT :\n\t \tcase Types.INTEGER :\n\t \tcase Types.NUMERIC :\n\t \tcase Types.REAL :\n\t \tcase Types.SMALLINT :\n\t \tcase Types.TINYINT :\n\t \t return true;\n\t }\n\t return false;\n\t}",
"@Override\n public Class getValueType() {\n return Double.class;\n }",
"public T caseNumber(org.uis.lenguajegrafico.lenguajegrafico.Number object)\n {\n return null;\n }",
"public String getNumericString() {\r\n\t\treturn Integer.toString(numeric);\r\n\t}",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type.Value xgetValue();",
"private static Expression getNumericLiteral(String token, ExceptionMetadata metadataFromContext) {\n if (!token.contains(\".\") && !token.contains(\"e\") && !token.contains(\"E\")) {\n return new IntegerLiteralExpression(Integer.parseInt(token), metadataFromContext);\n }\n if (!token.contains(\"e\") && !token.contains(\"E\")) {\n return new DecimalLiteralExpression(new BigDecimal(token), metadataFromContext);\n }\n return new DoubleLiteralExpression(Double.parseDouble(token), metadataFromContext);\n\n }",
"public boolean isNum() \n\t{ \n\t try \n\t { \n\t int d = Integer.parseInt(numeric); \n\t } \n\t catch(NumberFormatException nfe) \n\t { \n\t return false; \n\t } \n\t return true; \n\t}",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public static boolean isNumeric(Object number) {\n\t\treturn isNumericClass(number.getClass());\n\t}",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"Integer getValue();",
"Integer getValue();",
"public interface Numeric extends DataType {\n}",
"public int getNumberValue() {\r\n return number;\r\n }",
"Uint32 getType();",
"private void processNumericModifier() {\n\n Token token = tokens.get(currentTokenPointer);\n\n if (currentVersionComponent == 3) {\n\n raiseParseProblem(\"cannot specify a numerical +/- value for the qualifier, found '\" + string(token) + \"' at position \" + token.start,\n\n token.start);\n\n }\n\n String tokenString = string(token);\n\n try {\n\n Integer value = null;\n\n if (token.kind == TokenKind.PLUSNUMBER) {\n\n value = Integer.parseInt(tokenString.substring(1));\n\n } else {\n\n value = Integer.parseInt(tokenString);\n\n }\n\n pushIt(new SumTransformer(value));\n\n } catch (NumberFormatException nfe) {\n\n raiseParseProblem(\"cannot parse numerical value '\" + tokenString + \"' at position \" + token.start, token.start);\n\n }\n\n }",
"public int getDataTypeValue() {\n return dataType_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }",
"public int getTypeValue() {\n return type_;\n }"
] | [
"0.67699564",
"0.6329334",
"0.6301648",
"0.6204095",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5993355",
"0.5991221",
"0.59807885",
"0.597338",
"0.59227383",
"0.58665496",
"0.58598334",
"0.5854697",
"0.5778183",
"0.5748911",
"0.572792",
"0.572673",
"0.5719294",
"0.56901443",
"0.5662123",
"0.5637323",
"0.5607057",
"0.560581",
"0.5579377",
"0.5579106",
"0.55763644",
"0.55654633",
"0.554606",
"0.5528836",
"0.55222327",
"0.5514586",
"0.5501728",
"0.54878294",
"0.54769504",
"0.54769504",
"0.54769504",
"0.5472691",
"0.54711074",
"0.5462838",
"0.54544395",
"0.54513997",
"0.5421888",
"0.54187375",
"0.5412758",
"0.53917927",
"0.53893274",
"0.5381626",
"0.53676057",
"0.5359981",
"0.5351473",
"0.5344606",
"0.5330889",
"0.53163826",
"0.53102696",
"0.5308236",
"0.5291495",
"0.5291128",
"0.5289258",
"0.5285177",
"0.52834815",
"0.52794385",
"0.5273648",
"0.5272794",
"0.5266199",
"0.525979",
"0.52547145",
"0.52544945",
"0.52489245",
"0.52486175",
"0.5244848",
"0.5244848",
"0.524454",
"0.52439505",
"0.52439505",
"0.52439505",
"0.52439505",
"0.52439505",
"0.5240166",
"0.5240166",
"0.5239754",
"0.52385217",
"0.5235247",
"0.52283055",
"0.5221628",
"0.5220744",
"0.52183366",
"0.52183366",
"0.52183366",
"0.52183366"
] | 0.66526806 | 1 |
Threepart logic: 1) If we are at the end of JSON Pointer; if so, return `this` if Object node, `null` if not (for caller to handle) 2) If not at the end, if we can follow next segment, call recursively handle nonnull (existing Object node, return) vs `null` (must replace; may not be allowed to) 3) Can not follow the segment? Try constructing, adding path But the default implementation assumes noncontainer behavior so it'll simply return `null` | protected ObjectNode _withObject(JsonPointer origPtr,
JsonPointer currentPtr,
OverwriteMode overwriteMode, boolean preferIndex)
{
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface JsonPath {\n\n JsonPath parent();\n\n Optional<JsonObject> getJsonObject(JsonObject jsonObject);\n\n Optional<JsonArray> getJsonArray(JsonObject jsonObject);\n\n static JsonPath root() {\n return new JsonPathImpl(ImmutableList.of());\n }\n\n boolean isRoot();\n\n JsonPath concat(JsonObjectPathSpecImpl jsonObjectPathSpec);\n\n JsonPath concat(JsonArrayPathSpecImpl jsonArrayPathSpec);\n\n JsonPath concat(JsonPath jsonPath);\n\n List<PathSpec> parts();\n\n JsonPath subpath(int start, int end);\n\n int size();\n\n static JsonPath parse(final String pathStr) {\n\n Objects.requireNonNull(pathStr);\n\n ImmutableList.Builder<PathSpec> listBuilder = ImmutableList.builder();\n\n String[] split = pathStr.split(\"\\\\.\");\n for (int i = 0; i < split.length; i++) {\n String strPart = split[i];\n\n if (strPart.isEmpty()) {\n continue;\n }\n\n int start = strPart.indexOf('[');\n\n if (start > 0) {\n int end = strPart.indexOf(']');\n\n listBuilder.add(\n new JsonArrayPathSpecImpl(\n strPart.substring(0, start),\n Integer.parseInt(strPart.substring(start + 1, end))\n )\n );\n continue;\n }\n\n listBuilder.add(\n new JsonObjectPathSpecImpl(\n strPart\n )\n );\n }\n return new JsonPathImpl(\n listBuilder.build()\n );\n }\n\n static void main(String[] asdf) {\n\n String[] ss = {};\n JsonPath parse = JsonPath.parse(\"departments[0].department.department.employee.departments[0].name\");\n System.out.println(\"path: [\" + parse + \"] size: \" + parse.size());\n }\n}",
"public JsonPointer() {\n\t\tpathFragments = new LinkedList<>();\n\t}",
"@Override\n protected JsonNode _at(JsonPointer ptr) {\n return null;\n }",
"public SoNode \ngetCurPathTail() \n{\n//#ifdef DEBUG\n if (currentpath.getTail() != (SoFullPath.cast(getCurPath())).getTail()){\n SoDebugError.post(\"SoAction::getCurPathTail\\n\", \n \"Inconsistent path tail. Did you change the scene graph\\n\"+\n \"During traversal?\\n\");\n }\n//#endif /*DEBUG*/\n return(currentpath.getTail());\n}",
"public JsonPointer shift() {\n\t\tif (!pathFragments.isEmpty()) {\n\t\t\tpathFragments.removeFirst();\n\t\t}\n\t\treturn this;\n\t}",
"public ObjectNode resolvePaths();",
"private void processEndObject() {\n\t\tif (parentNode != null) {\r\n\t\t\t// go up the param tree from the current field name\r\n\t\t\tFieldFilterTree tmpIncludes = parentNode.getParent();\r\n\t\t\tcurNode = parentNode;\r\n\t\t\tparentNode = tmpIncludes;\r\n\r\n\t\t\tcurrentFieldName = curNode.getData().getValue();\r\n\t\t}\r\n\t}",
"public JsonPointer root() {\n\t\tpathFragments.clear();\n\t\treturn this;\n\t}",
"private Node loadNode(JsonObject jsonNode) {\n Node returnedNode = null;\r\n\r\n returnedNode = loadStation(jsonNode);\r\n// case JSON_IS_LINE:\r\n// returnedNode = loadLine(jsonNode);\r\n// break;\r\n\r\n\r\n return returnedNode;\r\n }",
"public JsonPointer path(String fragment) {\n\t\tpathFragments.addLast(escapeFragment(fragment));\n\t\treturn this;\n\t}",
"@Override\n public final type$ptr<?> $TrailingObjects() {\n return super.$this$plus1();\n }",
"public T caseRelationshipEnd(RelationshipEnd object) {\n\t\treturn null;\n\t}",
"public T casePathLiteral(PathLiteral object)\n {\n return null;\n }",
"public JsonPointer pop() {\n\t\tif (!pathFragments.isEmpty()) {\n\t\t\tpathFragments.removeLast();\n\t\t}\n\t\treturn this;\n\t}",
"private boolean addFirstElement(Object obj) {\n if (size == 0) {\n start = new Node(null, null, obj);\n end = start;\n size++;\n return true;\n }\n return false;\n }",
"private ObjectNode ProcessObject(RDFNode node){\n if(node.isLiteral()){\n //handle literal\n return TransformUtils.GenerateLiteralJsonObject(mapper, node.asLiteral(), null);\n }\n else {\n //else handle resource\n return ProcessResource(node.asResource());\n }\n }",
"Optional<Node<UnderlyingData>> prevNode(Node<UnderlyingData> node);",
"public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }",
"public T caseFromClassOrOuterQueryPath(FromClassOrOuterQueryPath object)\n {\n return null;\n }",
"@Override\n\tpublic ArrayList<Edge<Object>> getPath(String startNode, String endNode) {\n\t\treturn null;\n\t}",
"Iterable<T> followNode(T start) throws NullPointerException;",
"public void pushCurPath()\n\t {\n\t \t this.currentpath.simpleAppend((SoNode)( null), -1);\n\t \t}",
"AssignmentPathSegment beforeLast(int n);",
"private void recurseThroughObject(Object obj, List<String> path, String currentField) {\n\n MethodAccess methodAccess = MethodAccess.get(obj.getClass());\n\n for (LogCache logCache : CacheableAccessors.getMethodIndexes(obj.getClass(), methodAccess)) {\n\n if (canLogMethod(logCache, methodAccess)) {\n\n List<String> recursivePath = Lists.newArrayList(path);\n\n Object logResult;\n\n try {\n logResult = methodAccess.invoke(obj, logCache.getIndex());\n }\n catch(IllegalAccessError er) {\n logResult = \"<Illegal Method Access Error>\";\n }\n catch (Throwable t) {\n logResult = configs.getExceptionTranslator().translate(t);\n }\n\n try {\n buildMessage(getLogMessage(logCache, logResult), recursivePath,\n formatMethod(recursivePath, methodAccess.getMethodNames()[logCache.getIndex()]));\n }\n catch (Throwable t) {\n // result is ignored, but can be captured for debugging since we've already tried to catch\n // and build\n configs.getExceptionTranslator().translate(t);\n }\n }\n }\n\n FieldAccess fieldAccess = FieldAccess.get(obj.getClass());\n\n for (LogCache logCache : CacheableAccessors.getFieldIndexes(obj.getClass(), fieldAccess)) {\n String fieldName = \"???\";\n\n try {\n if (Scope.SKIP == logCache.getLogScope()) {\n continue;\n }\n\n fieldName = fieldAccess.getFieldNames()[logCache.getIndex()];\n\n List<String> recursivePath = Lists.newArrayList(path);\n recursivePath.add(fieldName);\n\n if (!configs.getExcludesPrefixes().stream().anyMatch(fieldName::startsWith)) {\n buildMessage(getLogMessage(logCache, fieldAccess.get(obj, logCache.getIndex())), recursivePath,\n formatField(currentField, fieldName));\n }\n }\n catch (Throwable t) {\n String fieldError = configs.getExceptionTranslator().translate(t);\n\n buildMessage(getLogMessage(logCache, fieldError), path,\n formatField(currentField, fieldName));\n }\n }\n\n }",
"public interface JsonStructure\n/* */ extends JsonValue\n/* */ {\n/* */ default JsonValue getValue(String jsonPointer) {\n/* 60 */ return Json.createPointer(jsonPointer).getValue(this);\n/* */ }\n/* */ }",
"private Void followNestedPathOrSetValue(Consumer<? super S> pathElementCallback, Consumer<? super T> setter, Model<? extends T> valueModel) {\r\n if (path.hasNext()) {\r\n pathElementCallback.accept(path.next());\r\n } else {\r\n setter.accept(converter.convert(valueModel.accept(new TypeModelVisitor<>()), valueToSet));\r\n }\r\n return null;\r\n }",
"static Pair<String, Integer> resolveJSONPathNode(String node) {\n int bracketBeginning = node.indexOf('[');\n if (bracketBeginning < 0) {\n return Pair.of(node, null);\n } else if (bracketBeginning == 0) {\n return Pair.of(null, Integer.parseInt(node.substring(1, node.length() - 1)));\n } else {\n return Pair.of(node.substring(0, bracketBeginning), Integer.parseInt(node.substring(bracketBeginning + 1, node.length() - 1)));\n }\n }",
"@Override\n public JsonParser traverse(ObjectReadContext readCtxt) {\n return new TreeTraversingParser(this, readCtxt);\n }",
"public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }",
"@Override\n public E remove(E obj) {\n if (isEmpty())\n return null;\n else {\n Node<E> headPointer = head;\n Node<E> tailPointer = tail;\n if (obj.compareTo(peekFirst()) == 0) {\n removeFirst();\n modificationCounter++;\n return headPointer.data;\n } else if (obj.compareTo(peekLast()) == 0) {\n removeLast();\n modificationCounter++;\n return tailPointer.data;\n } else {\n while (true) {\n if (headPointer.data.compareTo(obj) == 0) {\n Node tempHead = headPointer.previous;\n Node tempTail = headPointer.next;\n tempHead.next = tempTail;\n tempTail.previous = tempHead;\n currentSize--;\n modificationCounter++;\n return headPointer.data;\n } else if (headPointer.next == null) {\n return null;\n } else\n headPointer = headPointer.next;\n }\n }\n }\n }",
"Iterable<T> followNodeAndSelef(T start) throws NullPointerException;",
"public static synchronized boolean resolveFully(final PdfObject pdfObject, final PdfFileReader objectReader){\n \n boolean fullyResolved=pdfObject!=null;\n \n if(fullyResolved){\n \n final byte[] raw;\n if(pdfObject.getStatus()==PdfObject.DECODED) {\n raw = StringUtils.toBytes(pdfObject.getObjectRefAsString());\n } else {\n raw = pdfObject.getUnresolvedData();\n }\n \n //flag now done and flush raw data\n pdfObject.setStatus(PdfObject.DECODED);\n \n //allow for empty object\n if(raw[0]!='e' && raw[1]!='n' && raw[2]!='d' && raw[3]!='o' && raw[4]!='b' ){\n \n int j=0;\n \n //allow for [ref] at top level (may be followed by gap\n while (raw[j] == 91 || raw[j] == 32 || raw[j] == 13 || raw[j] == 10) {\n j++;\n }\n \n // get object ref\n int keyStart = j;\n \n //move cursor to end of reference\n while (raw[j] != 10 && raw[j] != 13 && raw[j] != 32 && raw[j] != 47 && raw[j] != 60 && raw[j] != 62) {\n j++;\n }\n \n final int ref = NumberUtils.parseInt(keyStart, j, raw);\n \n //move cursor to start of generation or next value\n while (raw[j] == 10 || raw[j] == 13 || raw[j] == 32)// || data[j]==47 || data[j]==60)\n {\n j++;\n }\n \n /**\n * get generation number\n */\n keyStart = j;\n \n //move cursor to end of reference\n while (raw[j] != 10 && raw[j] != 13 && raw[j] != 32 && raw[j] != 47 && raw[j] != 60 && raw[j] != 62) {\n j++;\n }\n \n final int generation = NumberUtils.parseInt(keyStart, j, raw);\n \n if(raw[raw.length-1]=='R') //recursively validate all child objects\n {\n fullyResolved = resolveFullyChildren(pdfObject, fullyResolved, raw, ref, generation, objectReader);\n }\n \n if(fullyResolved){\n pdfObject.ignoreRecursion(false);\n final ObjectDecoder objDecoder=new ObjectDecoder(objectReader);\n objDecoder.readDictionaryAsObject(pdfObject, j, raw);\n \n //if(!pdfObject.isFullyResolved())\n // fullyResolved=false;\n }\n }\n }\n \n return fullyResolved;\n }",
"@SuppressWarnings(\"rawtypes\")\n protected LocationPath checkForSingleKeyCurrent(LocationPath locationPath, DynaBean dynaBean) {\n LocationPath newPath = locationPath;\n Step[] oldSteps = locationPath.getSteps();\n DynaBean contextBean = dynaBean;\n Step[] newSteps = new Step[oldSteps.length];\n SchemaPath currentPath = null;\n int index = 0;\n if (locationPath.toString().contains(DataStoreValidationUtil.CURRENT_SINGLE_KEY) || locationPath.toString().contains(DataStoreValidationUtil.CURRENT_PARENT_SINGLE_KEY)) {\n if (locationPath.isAbsolute()) {\n ModelNode rootNode = getRootNodeFor(locationPath);\n contextBean = (DynaBean) rootNode.getValue();\n newSteps[0] = oldSteps[0];\n index = 1;\n }\n for (int i = index; i < oldSteps.length; i++) {\n Object value = null;\n if (contextBean != null && DataStoreValidationUtil.isReadable(contextBean, DataStoreValidationUtil.getLocalName(oldSteps[i]))) {\n value = contextBean.get(DataStoreValidationUtil.getLocalName(oldSteps[i]));\n } else if (contextBean != null && oldSteps[i].getAxis() == Compiler.AXIS_PARENT) {\n value = contextBean.get(ModelNodeWithAttributes.PARENT);\n }\n\n if (value instanceof DynaBean) {\n contextBean = (DynaBean) value;\n } else if (value instanceof Collection) {\n Object object = ((Collection)value).iterator().next();\n if (object instanceof DynaBean) {\n contextBean = (DynaBean) object;\n } else {\n // last leaf/leaf list. no point going further\n object = null;\n }\n } else if (value != null && oldSteps.length - 1 == i) {\n // we are at the last step\n contextBean = null;\n if (newSteps[0] != null) {\n // most likely the last leaf/leaf-list in the xPath\n newSteps[i] = oldSteps[i];\n }\n break;\n } else if (value != null && currentPath == null) {\n // well we chose a wrong list node, which does not have further children down.\n // but we can still traverse the schema.\n \tModelNode modelNode = (ModelNode) contextBean.get(ModelNodeWithAttributes.MODEL_NODE);\n\t\t\t SchemaRegistry registry = SchemaRegistryUtil.getSchemaRegistry(modelNode, m_schemaRegistry);\n SchemaPath previousPath = modelNode.getModelNodeSchemaPath();\n String name = ModelNodeDynaBeanFactory.getModelNodeAttributeName(DataStoreValidationUtil.getLocalName(oldSteps[i]));\n currentPath = DataStoreValidationUtil.getChildPath(registry, previousPath, name);\n contextBean = null;\n } else if (currentPath != null) {\n String name = ModelNodeDynaBeanFactory.getModelNodeAttributeName(DataStoreValidationUtil.getLocalName(oldSteps[i]));\n currentPath = DataStoreValidationUtil.getChildPath(m_schemaRegistry, currentPath, name);\n } else if (value == null && currentPath == null && contextBean != null && DataStoreValidationUtil.isReadable(contextBean, ModelNodeWithAttributes.MODEL_NODE)) {\n \tModelNode modelNode = (ModelNode) contextBean.get(ModelNodeWithAttributes.MODEL_NODE);\n\t\t\t SchemaRegistry registry = SchemaRegistryUtil.getSchemaRegistry(modelNode, m_schemaRegistry);\n String stepName = ModelNodeDynaBeanFactory.getModelNodeAttributeName(DataStoreValidationUtil.getLocalName(oldSteps[i]));\n currentPath = DataStoreValidationUtil.getChildPath(registry, modelNode.getModelNodeSchemaPath(), stepName);\n contextBean = null;\n if (currentPath == null) {\n newSteps = null;\n break;\n }\n } else {\n logDebug(null, \" we had a wrong contextNode to start with for path - {} and bean {}\", locationPath, dynaBean);\n newSteps = null;\n break;\n }\n\n if (isSingleKeyCurrent(oldSteps[i])) {\n // Since [current()] is applicable only on List, the DynaBean will have a modelNode and it is\n // expected to have only one key\n DataSchemaNode schemaNode = null;\n if (contextBean != null) {\n ModelNode modelNode = (ModelNode) contextBean.get(ModelNodeWithAttributes.MODEL_NODE);\n SchemaPath schemaPath = modelNode.getModelNodeSchemaPath();\n schemaNode = (ListSchemaNode) modelNode.getSchemaRegistry().getDataSchemaNode(schemaPath);\n } else if (currentPath != null) {\n schemaNode = m_schemaRegistry.getDataSchemaNode(currentPath);\n } else {\n LOGGER.warn(\" neither contextBean/CurrentPath can be null for {} and bean -\", locationPath, dynaBean);\n newSteps = null;\n break;\n }\n\n if (schemaNode == null) {\n logDebug(\"we traversed a wrong path for {} and bean \", locationPath, dynaBean);\n newSteps = null;\n break;\n }\n \n QName keyName = null;\n if (schemaNode instanceof ListSchemaNode) {\n keyName = ((ListSchemaNode)schemaNode).getKeyDefinition().get(0);\n }\n\n // build key = current() as the new predicate\n Expression[] newExpression = new Expression[1];\n if (keyName != null) {\n String dynaBeanAlignedName = ModelNodeDynaBeanFactory.getDynaBeanAttributeName(keyName.getLocalName());\n StringBuilder newPredicate = new StringBuilder().append(dynaBeanAlignedName).append(\"=\")\n .append(oldSteps[i].getPredicates()[0].toString());\n newExpression[0] = JXPathUtils.getExpression(newPredicate.toString());\n }\n\n // build the new Step\n if (oldSteps[i].getNodeTest() instanceof NodeNameTest) {\n NodeNameTest node = (NodeNameTest) oldSteps[i].getNodeTest();\n Step newStep = new YangStep(node.getNodeName(), node.getNamespaceURI(), newExpression);\n newSteps[i] = newStep;\n }\n } else {\n newSteps[i] = oldSteps[i];\n }\n }\n }\n\n if (newSteps != null && newSteps[0] != null) {\n newPath = new LocationPath(locationPath.isAbsolute(), newSteps);\n }\n\n return newPath;\n }",
"@Override\r\n\tpublic Path findSeaPath(Point start, Point end) {\n\t\treturn null;\r\n\t}",
"Optional<Node<UnderlyingData>> nextNode(Node<UnderlyingData> node);",
"@Override\n\tprotected int parse(String json, int startIndex, boolean delayed) throws JsonParseException\n\t{\n\t\t//Verify all required data structures exist\n\t\tsetup();\n\t\t\n\t\t//Verify what is being parsed is indeed an object\n\t\tif(json.charAt(startIndex) != ParserUtil.OBJECT_OPEN)\n\t\t\tthrow new JsonParseException(JsonParseException.Type.INVALID_FORMAT, 0);\n\t\t\n\t\tint index = startIndex+1;\n\t\tboolean seenElement = false;\n\t\tdo\n\t\t{\n\t\t\t//Move to the start of the next key\n\t\t\tindex = ParserUtil.nextNonWhitespace(json, index);\n\t\t\t\n\t\t\t//Get information on the key type\n\t\t\tchar startChar = json.charAt(index);\n\t\t\t\n\t\t\t//Make sure it's an allowable character\n\t\t\t//--Separation point (',')\n\t\t\tif(startChar == ParserUtil.SPLIT)\n\t\t\t{\n\t\t\t\tindex = ParserUtil.nextNonWhitespace(json, index+1);\n\t\t\t\tstartChar = json.charAt(index);\n\t\t\t}\n\t\t\t//--Or end of the object ('}')\n\t\t\telse if(startChar == ParserUtil.OBJECT_CLOSE)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//--Or someone is bad at formatting their JSON!\n\t\t\telse if(seenElement)\n\t\t\t{\n\t\t\t\t//System.out.println(\"ERROR ON: \"+json.substring(startIndex, startIndex+getRawLength()));\n\t\t\t\tthrow new JsonParseException(JsonParseException.Type.INVALID_CHAR, index, startChar);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Get the key\n\t\t\tString key;\n\t\t\t//--String type\n\t\t\tif(ParserUtil.isStringChar(startChar))\n\t\t\t{\n\t\t\t\tkey = ParserUtil.getStringBlock(json, index);\n\t\t\t\tindex += key.length()+2;\n\t\t\t}\n\t\t\t//--Unknown type\n\t\t\telse\n\t\t\t{\n\t\t\t\tkey = ParserUtil.getUnknownBlock(json, index);\n\t\t\t\tindex += key.length();\n\t\t\t}\n\t\t\t\n\t\t\t//Move to the start of the value\n\t\t\tif(json.charAt(index) != ParserUtil.OBJECT_MAP)\n\t\t\t{\n\t\t\t\tindex = ParserUtil.nextNonWhitespace(json, index+1);\n\t\t\t\tif(json.charAt(index) != ParserUtil.OBJECT_MAP)\n\t\t\t\t\tthrow new JsonParseException(JsonParseException.Type.INVALID_FORMAT, index);\n\t\t\t}\n\t\t\tindex = ParserUtil.nextNonWhitespace(json, index+1);\n\t\t\t\n\t\t\t//Get the value and store it\n\t\t\tstartChar = json.charAt(index);\n\t\t\t\n\t\t\t//Parse the value based on type\n\t\t\tValue value = null;\n\t\t\tint len;\n\t\t\tswitch(startChar)\n\t\t\t{\n\t\t\t\t//String\n\t\t\t\tcase ParserUtil.STRING_1: \n\t\t\t\tcase ParserUtil.STRING_2: \n\t\t\t\t\tString str = ParserUtil.getStringBlock(json, index);\n\t\t\t\t\tvalue = ValueUtil.createValue(str);\n\t\t\t\t\tindex += str.length()+2;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//Object\n\t\t\t\tcase ParserUtil.OBJECT_OPEN: \n\t\t\t\t\tJsonObject object = new JsonObject(json, index, delayed);\n\t\t\t\t\tvalue = ValueUtil.createValue(object);\n\t\t\t\t\tif((len = object.getRawLength()) < 2)\n\t\t\t\t\t\tthrow new JsonParseException(JsonParseException.Type.INVALID_FORMAT, index);\n\t\t\t\t\tindex += len;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//Array\n\t\t\t\tcase ParserUtil.ARRAY_OPEN: \n\t\t\t\t\tJsonArray array = new JsonArray(json, index, delayed);\n\t\t\t\t\tvalue = ValueUtil.createValue(array);\n\t\t\t\t\tif((len = array.getRawLength()) < 2)\n\t\t\t\t\t\tthrow new JsonParseException(JsonParseException.Type.INVALID_FORMAT, index);\n\t\t\t\t\tindex += len;\n\t\t\t\t\tbreak;\n\t\t\t\tcase ParserUtil.ARRAY_CLOSE:\n\t\t\t\t\tthrow new JsonParseException(JsonParseException.Type.INVALID_FORMAT, index);\n\t\t\t\t\n\t\t\t\t//Unknown: boolean, number, or null\n\t\t\t\tdefault: \n\t\t\t\t\tString valueStr = ParserUtil.getUnknownBlock(json, index);\n\t\t\t\t\tvalue = ParserUtil.parseUnknown(valueStr);\n\t\t\t\t\tindex += valueStr.length();\n\t\t\t}\n\t\t\t\n\t\t\t//Add the value\n\t\t\tvalues.put(key, value);\n\t\t\tseenElement = true;\n\t\t\t\n\t\t}while(index < json.length()-1);\n\t\t\n\t\t//Check the very last character to make sure the object was closed\n\t\tif(json.charAt(index) != ParserUtil.OBJECT_CLOSE)\n\t\t\tthrow new JsonParseException(JsonParseException.Type.BAD_END, index);\n\t\t\n\t\treturn index-startIndex+1;\n\t}",
"@Nullable\n private static Step nextStepHelper(@Nullable Step initialStep, @Nullable Node current,\n AtomicBoolean hasFoundInitial) {\n if (current == null) {\n return null;\n }\n\n if (current.step != null) {\n if ((initialStep == null || hasFoundInitial.get()) && current.isLeaf()) {\n return current.step;\n }\n\n if (current.step.equals(initialStep)) {\n hasFoundInitial.set(true);\n }\n }\n\n if (current.children != null) {\n for (Node child : current.children) {\n Step found = nextStepHelper(initialStep, child, hasFoundInitial);\n if (found != null) {\n return found;\n }\n }\n }\n\n return null;\n }",
"boolean reachedTargetPosition(JsonNode valueAsJson);",
"protected T removeBeginning() {\r\n\t\tif (!this.isEmpty()) {\r\n\t\t\tSNode<T> startNode = this.getHead().getPrev();\r\n\t\t\tthis.getHead().setPrev(startNode.getPrev());\r\n\t\t\tsize--;\r\n\t\t\treturn startNode.getValue();\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private ObjectNode ProcessResource(Resource res){\n if (res.isURIResource()){\n return ProcessUri(res);\n }\n else if (res.isAnon()){\n //handle blank node\n String anonId = res.getId().toString();\n\n ObjectNode json_object = mapper.createObjectNode();\n json_object.put(ArangoAttributes.TYPE, RdfObjectTypes.BLANK_NODE);\n json_object.put(ArangoAttributes.VALUE, anonId);\n\n return json_object;\n }\n return null;\n }",
"private AbstractConfigObject parseObject(boolean hadOpenCurly) {\n Map<String, AbstractConfigValue> values = new HashMap<String, AbstractConfigValue>();\n ConfigOrigin objectOrigin = lineOrigin();\n boolean afterComma = false;\n Path lastPath = null;\n boolean lastInsideEquals = false;\n\n while (true) {\n TokenWithComments t = nextTokenIgnoringNewline();\n if (t.token == Tokens.CLOSE_CURLY) {\n if (flavor == ConfigSyntax.JSON && afterComma) {\n throw parseError(addQuoteSuggestion(t.toString(),\n \"expecting a field name after a comma, got a close brace } instead\"));\n } else if (!hadOpenCurly) {\n throw parseError(addQuoteSuggestion(t.toString(),\n \"unbalanced close brace '}' with no open brace\"));\n }\n break;\n } else if (t.token == Tokens.END && !hadOpenCurly) {\n putBack(t);\n break;\n } else if (flavor != ConfigSyntax.JSON && isIncludeKeyword(t.token)) {\n parseInclude(values);\n\n afterComma = false;\n } else {\n TokenWithComments keyToken = t;\n Path path = parseKey(keyToken);\n TokenWithComments afterKey = nextTokenIgnoringNewline();\n boolean insideEquals = false;\n\n // path must be on-stack while we parse the value\n pathStack.push(path);\n\n TokenWithComments valueToken;\n AbstractConfigValue newValue;\n if (flavor == ConfigSyntax.CONF && afterKey.token == Tokens.OPEN_CURLY) {\n // can omit the ':' or '=' before an object value\n valueToken = afterKey;\n } else {\n if (!isKeyValueSeparatorToken(afterKey.token)) {\n throw parseError(addQuoteSuggestion(afterKey.toString(),\n \"Key '\" + path.render() + \"' may not be followed by token: \"\n + afterKey));\n }\n\n if (afterKey.token == Tokens.EQUALS) {\n insideEquals = true;\n equalsCount += 1;\n }\n\n consolidateValueTokens();\n valueToken = nextTokenIgnoringNewline();\n }\n\n newValue = parseValue(valueToken.prepend(keyToken.comments));\n\n lastPath = pathStack.pop();\n if (insideEquals) {\n equalsCount -= 1;\n }\n lastInsideEquals = insideEquals;\n\n String key = path.first();\n Path remaining = path.remainder();\n\n if (remaining == null) {\n AbstractConfigValue existing = values.get(key);\n if (existing != null) {\n // In strict JSON, dups should be an error; while in\n // our custom config language, they should be merged\n // if the value is an object (or substitution that\n // could become an object).\n\n if (flavor == ConfigSyntax.JSON) {\n throw parseError(\"JSON does not allow duplicate fields: '\"\n + key\n + \"' was already seen at \"\n + existing.origin().description());\n } else {\n newValue = newValue.withFallback(existing);\n }\n }\n values.put(key, newValue);\n } else {\n if (flavor == ConfigSyntax.JSON) {\n throw new ConfigException.BugOrBroken(\n \"somehow got multi-element path in JSON mode\");\n }\n\n AbstractConfigObject obj = createValueUnderPath(\n remaining, newValue);\n AbstractConfigValue existing = values.get(key);\n if (existing != null) {\n obj = obj.withFallback(existing);\n }\n values.put(key, obj);\n }\n\n afterComma = false;\n }\n\n if (checkElementSeparator()) {\n // continue looping\n afterComma = true;\n } else {\n t = nextTokenIgnoringNewline();\n if (t.token == Tokens.CLOSE_CURLY) {\n if (!hadOpenCurly) {\n throw parseError(addQuoteSuggestion(lastPath, lastInsideEquals,\n t.toString(), \"unbalanced close brace '}' with no open brace\"));\n }\n break;\n } else if (hadOpenCurly) {\n throw parseError(addQuoteSuggestion(lastPath, lastInsideEquals,\n t.toString(), \"Expecting close brace } or a comma, got \" + t));\n } else {\n if (t.token == Tokens.END) {\n putBack(t);\n break;\n } else {\n throw parseError(addQuoteSuggestion(lastPath, lastInsideEquals,\n t.toString(), \"Expecting end of input or a comma, got \" + t));\n }\n }\n }\n }\n\n return new SimpleConfigObject(objectOrigin, values);\n }",
"public T caseTypePathNameNestedCS(TypePathNameNestedCS object) {\r\n return null;\r\n }",
"boolean getRecursiveNull();",
"public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }",
"@Test\n public void a_hierarchical_non_existent_path_can_be_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.carrier\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n \"Alpha Transports\",pathConfiguration);\n String result = parse(output).read(path);\n assertThat(result).matches(\"Alpha Transports\");\n\n }",
"@Override\r\n public List<PathSegment> getPathSegments(boolean arg0) {\n return pathSegments;\r\n }",
"public T caseRoot(Root object) {\r\n\t\treturn null;\r\n\t}",
"public JsonWriter endObject() {\n if (!context.map()) {\n throw new IllegalStateException(\"Unexpected end, not in object.\");\n }\n if (context.value()) {\n throw new IllegalStateException(\"Expected map value but got end.\");\n }\n writer.write('}');\n context = stack.pop();\n return this;\n }",
"private void processStartObject() {\n\t\tif (currentFieldName != null) {\r\n\t\t\t// go down the tree following the field name\r\n\t\t\tFieldFilterTree tmpIncludes = curNode.getChild(currentFieldName);\r\n\t\t\tparentNode = curNode;\r\n\t\t\tcurNode = tmpIncludes;\r\n\t\t}\r\n\t}",
"public T casePropertyCallExplicitPathExpCS(PropertyCallExplicitPathExpCS object) {\r\n return null;\r\n }",
"public Object getSegment(K node);",
"boolean add(String s, int depth) {\n\n\t\t\t// First case: we are at the end of the string and this is the correct node\n\t\t\tif(depth >= s.length() || (s.charAt(depth) == character.get()) && depth == s.length() - 1) {\n\t\t\t\tAtomicBoolean result = absent;\n\t\t\t\tabsent.set(false);\n\t\t\t\treturn result.get();\n\t\t\t}\n\n\t\t\t// Second case: the next character in the string was found, but this is not the end of the string\n\t\t\t// We continue in member \"suffix\"\n\t\t\tif(s.charAt(depth) == character.get()) {\n\t\t\t\tif (suffix == null || suffix.get().character.get() > s.charAt(depth+1)) \n\t\t\t\t\tsuffix = new AtomicReference<Node>(new Node(s.charAt(depth+1), suffix.get()));\n\t\t\t\treturn suffix.get().add(s, depth+1);\n\t\t\t}\n\n\t\t\t// Third case: the next character in the string was not found\n\t\t\t// We continue in member \"next\"\n\t\t\t// To maintain the order, we may have to add a new node before \"next\" first\n\t\t\tif (next == null || next.get().character.get() > s.charAt(depth))\n\t\t\t\tnext.set(new Node(s.charAt(depth), next.get()));\n\t\n\t\t\treturn next.get().add(s, depth);\n\t\t}",
"private SkiNode updateNextNodeToBestTail(SkiNode head, int nextI, int nextJ, int nextId) {\n\t\tif (!MatrixHelper.isPosValid(nextI, nextJ, map)) {\n\t\t\treturn null;\n\t\t}\n\t\tif (head.level - 1 != hMap[nextI][nextJ]) {\n\t\t\treturn null;\n\t\t}\n\t\thead.next[nextId] = new SkiNode(map[nextI][nextJ], nextI, nextJ, head);\n\t\thead.next[nextId].level = hMap[nextI][nextJ];\n\t\tif (head.next[nextId].level == 1) {\n\t\t\treturn head.next[nextId];\n\t\t}\n\t\treturn findBestTail(head.next[nextId]);\n\t}",
"public JsonCursor first() {\n JsonArray res = peekArray();\n\n assert res.size() > 0 && res.get(0) instanceof JsonObject;\n\n this.stack.push((JsonObject) res.get(0));\n\n return this;\n }",
"public line subDivide(MyTreeNode n, line l){\r\n line t = n.data; //store the line\r\n while (true){ //while we still can\r\n if(n.leftChild == null && n.rightChild == null){\r\n break; //break when there is nowhere left to go\r\n }\r\n //should just check if point is invalid, why did I do this?\r\n else if(n.leftChild == null && Geometry.endTest(n.data, n.rightChild.data).equals(new point(-10,-10))){ //if the left child is null, and the point isn't valid\r\n break;\r\n }\r\n else if(n.rightChild == null && Geometry.endTest(n.data, n.leftChild.data).equals(new point(-10,-10))){ //right child null point isn't valid\r\n break;\r\n }\r\n else if(n.leftChild == null){ //if the left child is null jsut check the right\r\n point temp = Geometry.endTest(n.data, n.rightChild.data);\r\n if (!(Geometry.intersect(new line (n.data.start, temp), l).equals(new point(-10,-10)))){\r\n t = new line(n.data.start, temp);\r\n }\r\n else{\r\n t = new line(temp, n.data.end);\r\n }\r\n n = n.rightChild;\r\n }\r\n\r\n else if(n.rightChild == null){ //if the right is null just check the left\r\n point temp = Geometry.endTest(n.data, n.leftChild.data);\r\n if (!(Geometry.intersect(new line (n.data.start, temp), l).equals(new point(-10,-10)))){\r\n t = new line(n.data.start, temp);\r\n }\r\n else{\r\n t = new line(temp, n.data.end);\r\n }\r\n n = n.leftChild;\r\n }\r\n //Should update else to allow for both children to be checked w/o the continue...\r\n else{ //otherwise check them both\r\n point temp = Geometry.endTest(n.data, n.leftChild.data); //find the point of intsection between the line and its children\r\n point rtemp = Geometry.endTest(n.data, n.rightChild.data);\r\n if (!(temp.equals(new point (-10, -10)))){ //if not an invalid point, check left child possibilities\r\n if (!(Geometry.intersect(new line (n.data.start, temp), l).equals(new point(-10,-10)))){\r\n t = new line(n.data.start, temp);\r\n n = n.leftChild;\r\n continue;\r\n }\r\n else if (!(Geometry.intersect(new line (n.data.end, temp), l).equals(new point(-10,-10)))){\r\n t = new line(n.data.end, temp);\r\n n = n.leftChild;\r\n continue;\r\n }\r\n }\r\n if (!(rtemp.equals(new point (-10, -10)))){//if not an invalid point, check right child\r\n if (!(Geometry.intersect(new line (n.data.start, rtemp), l).equals(new point(-10,-10)))){\r\n t = new line(n.data.start, rtemp);\r\n n = n.rightChild;\r\n continue;\r\n }\r\n else if (!(Geometry.intersect(new line (n.data.end, rtemp), l).equals(new point(-10,-10)))){\r\n t = new line(n.data.end, rtemp);\r\n n = n.rightChild;\r\n continue;\r\n }\r\n\r\n break; //so this also should never really be hit, but when it is it is because of (as far as I could tell) rounding errors in the math.\r\n }\r\n else{\r\n System.out.println(\"This line cannot be broken down more, due to issues with the mathematcal rounding\");\r\n return t;\r\n }\r\n }\r\n }\r\n return t;\r\n }",
"interface Segment {\n /**\n * @return the start value.\n */\n Object[] getStart();\n\n /**\n * @return set end value.\n */\n Object[] getEnd();\n\n /**\n * Computes this segment's length\n */\n float getLength();\n\n /**\n * Collapses this segment with the one passed as a parameter.\n * Note that if the input segment is not of the same class\n * as this one, an IllegalArgumentException is thrown. The \n * method also throws an exception if the input segment's\n * end does not have the same number of components as this \n * segment's end.\n *\n * After this method is called, this segment's end value\n * is the one of the input <code>seg</code> parameter.\n *\n * @param seg the Segment to collapse with this one.\n * @param anim the Animation this segment is part of.\n */\n void collapse(Segment seg, Animation anim);\n\n /**\n * Adds the input value to this Segment's end value.\n * \n * @param by the value to add. Throws IllegalArgumentException if this\n * Segment type is not additive or if the input value is incompatible (e.g.,\n * different number of components or different number of dimensions on a\n * component).\n */\n void addToEnd(Object[] by);\n\n /**\n * @return true if this segment type supports addition. false\n * otherwise.\n */\n boolean isAdditive();\n\n /**\n * Sets the start value to its notion of 'zero'\n */\n void setZeroStart();\n\n /**\n * Sets the start value. \n *\n * @param newStart the new segment start value.\n */\n void setStart(Object[] newStart);\n\n /**\n * Should be called after the segment's configuration is complete\n * to give the segment's implementation a chance to initialize \n * internal data and cache values.\n */\n void initialize();\n}",
"public JsonPointer path(int index) {\n\t\tpathFragments.addLast(Integer.toString(index));\n\t\treturn this;\n\t}",
"@Override\n public final void addWhenEmpty(final ET object) throws ConcurrentModificationException, UnsupportedOperationException {\n concurrencyCheck();\n emptyCheck();\n final Link<ET> newLink = new Link<>(object, null, null);\n newLink.left = newLink;\n newLink.right = newLink;\n list.voidLink.left = newLink;\n list.voidLink.right = newLink;\n pos++;\n expectedModCount++;\n list.size++;\n list.modCount++;\n }",
"public T caseFieldPath(FieldPath object)\n {\n return null;\n }",
"public Route parseRoutes(JSONObject jObject) {\n //Route route = new Route();\n List<Route> routeList = new ArrayList<>();\n //List<String> polylines = new ArrayList<>();\n List<List<HashMap<String, String>>> routes = new ArrayList<>();\n JSONArray jRoutes;\n JSONArray jLegs;\n JSONArray jSteps;\n\n try {\n\n jRoutes = jObject.getJSONArray(\"routes\");\n /** Traversing all routes */\n for (int i = 0; i < jRoutes.length(); i++) {\n Route route = new Route();\n routeList.add(route);\n\n JSONObject boundsObj = ((JSONObject) jRoutes.get(i)).getJSONObject(\"bounds\");\n JSONObject norteastObj = boundsObj.getJSONObject(\"northeast\");\n JSONObject southwestObj = boundsObj.getJSONObject(\"southwest\");\n LatLng norteast = new LatLng(norteastObj.getDouble(\"lat\"), norteastObj.getDouble(\"lng\"));\n LatLng southwest = new LatLng(southwestObj.getDouble(\"lat\"), southwestObj.getDouble(\"lng\"));\n List<LatLng> bounds = new ArrayList<>();\n bounds.add(norteast);\n bounds.add(southwest);\n route.setBounds(bounds);\n\n jLegs = ((JSONObject) jRoutes.get(i)).getJSONArray(\"legs\");\n\n List path = new ArrayList<>();\n List<Leg> legs = new ArrayList<>();\n route.setLegs(legs);\n\n /** Traversing all legs */\n for (int j = 0; j < jLegs.length(); j++) {\n JSONObject jLeg = (JSONObject) jLegs.get(j);\n JSONObject distanceObj = jLeg.getJSONObject(\"distance\");\n JSONObject durationObj = jLeg.getJSONObject(\"distance\");\n JSONObject startLocObj = jLeg.getJSONObject(\"start_location\");\n JSONObject endLocObj = jLeg.getJSONObject(\"end_location\");\n\n TextValue distance = new TextValue(distanceObj.getString(\"text\"), distanceObj.getString(\"value\"));\n TextValue duration = new TextValue(durationObj.getString(\"text\"), durationObj.getString(\"value\"));\n LatLng startLocation = new LatLng(startLocObj.getDouble(\"lat\"), startLocObj.getDouble(\"lng\"));\n LatLng endLocation = new LatLng(endLocObj.getDouble(\"lat\"), endLocObj.getDouble(\"lng\"));\n\n route.setDistance(distance);\n route.setDuration(duration);\n Leg leg = new Leg();\n legs.add(leg);\n leg.setDistance(distance);\n leg.setDuration(duration);\n leg.setStart_location(startLocation);\n leg.setEnd_location(endLocation);\n\n jSteps = jLeg.getJSONArray(\"steps\");\n List<Step> steps = new ArrayList<>();\n leg.setSteps(steps);\n\n /** Traversing all steps */\n for (int k = 0; k < jSteps.length(); k++) {\n Step step = new Step();\n steps.add(step);\n\n JSONObject jStep = (JSONObject) jSteps.get(k);\n JSONObject distanceObjS = jStep.getJSONObject(\"distance\");\n JSONObject durationObjS = jStep.getJSONObject(\"distance\");\n JSONObject startLocObjS = jStep.getJSONObject(\"start_location\");\n JSONObject endLocObjS = jStep.getJSONObject(\"end_location\");\n\n TextValue distanceS = new TextValue(distanceObjS.getString(\"text\"), distanceObjS.getString(\"value\"));\n TextValue durationS = new TextValue(durationObjS.getString(\"text\"), durationObjS.getString(\"value\"));\n LatLng startLocationS = new LatLng(startLocObjS.getDouble(\"lat\"), startLocObjS.getDouble(\"lng\"));\n LatLng endLocationS = new LatLng(endLocObjS.getDouble(\"lat\"), endLocObjS.getDouble(\"lng\"));\n\n step.setDistance(distanceS);\n step.setDuration(durationS);\n step.setStart_location(startLocationS);\n step.setEnd_location(endLocationS);\n\n String polyline = \"\";\n polyline = (String) ((JSONObject) ((JSONObject) jSteps.get(k)).get(\"polyline\")).get(\"points\");\n step.setPolyline(polyline);\n path.addAll(step.getPath());\n /*List<LatLng> list = decodePoly(polyline);\n\n /** Traversing all points /\n for(int l=0;l<list.size();l++){\n HashMap<String, String> hm = new HashMap<>();\n hm.put(\"lat\", Double.toString((list.get(l)).latitude) );\n hm.put(\"lng\", Double.toString((list.get(l)).longitude) );\n path.add(hm);\n }*/\n }\n routes.add(path);\n }\n route.setRoutes(routes);\n }\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return getBestRoute(routeList);\n }",
"@Override\n public S trySplit(){\n return null;\n }",
"public interface AssignmentPath extends DebugDumpable, ShortDumpable, Cloneable {\n\n\tList<? extends AssignmentPathSegment> getSegments();\n\t\n\t/**\n\t * Returns segment specified by index. Negative indexes work in reverse direction.\n\t * @throws IndexOutOfBoundsException\n\t */\n\tAssignmentPathSegment getSegment(int index);\n\n\tAssignmentPathSegment first();\n\n\tboolean isEmpty();\n\n\tint size();\n\n//\tEvaluationOrder getEvaluationOrder();\n\n\tAssignmentPathSegment last();\n\n\t// beforeLast(0) means last()\n\t// beforeLast(1) means one before last()\n\tAssignmentPathSegment beforeLast(int n);\n\n\tint countTargetOccurrences(ObjectType target);\n\n\t/**\n\t * Returns a \"user understandable\" part of this path. I.e. only those objects that are of \"order 1\" above the focal object.\n\t * E.g. from chain of\n\t *\n\t * jack =(a)=> Engineer =(i)=> Employee =(a)=> PersonMetarole =(i2)=> Person =(i)=> Entity\n\t *\n\t * the result would be\n\t *\n\t * Engineer -> Employee -> Person -> Entity\n\t *\n\t * TODO find a better name\n\t */\n\t@NotNull\n\tList<ObjectType> getFirstOrderChain();\n\t\n\t/**\n\t * In the context of meta-roles this is the role that the currently-processed inducement \"applies to\".\n\t * I.e. the role that would contain this inducement in case that meta-roles were not used.\n\t * Technically, this is the last element in the \"first order chain\" or roles.\n\t * \n\t * Note: proto- is the opposite of meta-\n\t */\n\tObjectType getProtoRole();\n\n\t/**\n\t * Shallow clone.\n\t */\n\tAssignmentPath clone();\n\n\tAssignmentPath cloneFirst(int n);\n\n\tAssignmentPathType toAssignmentPathType(boolean includeAssignmentsContent);\n\n\tExtensionType collectExtensions(int startAt) throws SchemaException;\n\n\tstatic ExtensionType collectExtensions(AssignmentPathType path, int startAt, ModelService modelService, Task task, OperationResult result)\n\t\t\tthrows CommunicationException, ObjectNotFoundException, SchemaException, SecurityViolationException,\n\t\t\tConfigurationException, ExpressionEvaluationException {\n\t\treturn AssignmentPathUtil.collectExtensions(path, startAt, modelService, task, result);\n\t}\n\t\n\t// Groovy [] operator\n\tdefault AssignmentPathSegment getAt(int index) {\n\t\treturn getSegment(index);\n\t}\n\n\t/**\n\t * Returns true if the path matches specified order constraints. All of them must match.\n\t * Although there are some defaults, it is recommended to specify constraints explicitly.\n\t * Currently not supported on empty paths.\n\t *\n\t * Not all parts of OrderConstraintsType are supported. Namely, resetOrder item has no meaning here.\n\t */\n\tboolean matches(@NotNull List<OrderConstraintsType> orderConstraints);\n\n\t/**\n\t * Preliminary (limited) implementation. To be used to compare paths pointing to the same target object. Use with care.\n\t */\n\tboolean equivalent(AssignmentPath other);\n}",
"@Override\n public void onNext(JSONObject jsonObject) {\n }",
"private LinkedList<Cell> findAugmentedPath(int row, LinkedList<Cell> head){\n LinkedList<Cell> resultPoints = new LinkedList<>();\n for (int j = 0; j < cols; j++) {\n if(j != chosenInRow[row] && source[row][j] == 0) {\n int chosenRowForJ = chosenInCol[j];\n\n if(head.contains(new Cell(chosenRowForJ, j)))\n continue;\n\n resultPoints.add(new Cell(row, j));\n if(chosenRowForJ < 0)\n return resultPoints;\n\n resultPoints.add(new Cell(chosenRowForJ, j));\n head.addAll(resultPoints);\n\n LinkedList<Cell> tail = findAugmentedPath(chosenRowForJ, head);\n if(tail.isEmpty()) {\n resultPoints.remove(resultPoints.getLast());\n resultPoints.remove(resultPoints.getLast());\n continue;\n }\n resultPoints.addAll(tail);\n return resultPoints;\n }\n }\n return resultPoints;\n }",
"public SoDetail \ngetDetail(SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int index;\n\n // Test for default case, corresponding to tail of path\n if (node == null)\n index = ( SoFullPath.cast ( path)).getLength() - 1;\n\n else\n index = getNodeIndex(node);\n\n return details.operator_square_bracket(index);\n}",
"public interface BdObjectGraph\r\n{\r\n // Object Graph is a tree representation of BD object.\r\n // From root node to sub child node to finally leaf object graph shows the location of object.\r\n // for example \r\n //root=station,\r\n //station has 3 clusters=Nodes\r\n // Clusters has many objects for example file objects,schedule objects \r\n // then sub-node=file object,schedule object \r\n //Each node has resource description allocator,for example if i want to get file object in clsuter1\r\n //in station1 then resource description allocator of Big Dinosaur gives me \r\n //stationname,clustername,filename as a query \r\n //the syntax for query has to be decided in what format\r\n // may be station:cluster:where:filename=\"big dinosaur u will rule \"\r\n //Challenges:On what interval of time the BdObjectGraph has to be persist or it is stored in file system or create object\r\n //in runtime \r\n//////////////////////////////////\r\n //May be representing tree in file system or in object \r\n \r\n //for Example Example 1\r\n // Bd has different types of object graph on the basis of object type\r\n // which tree as object graph to search is determined on the basis of query syntax\r\n // for example\r\n // Station:Abcbankclientstation(in sense it represent one machine virtually but is a collection of many physical clusters or virtual clusters)\r\n // this will search station tree object with key as Abcbankclientstation.It goes on traversing on tree until it gets Abcbankclientstation and gets space object allcoated for this client in sense of cluster \r\n\r\n //for Example Example 2\r\n //Now after transversing cluster object with allocated space is retirved then again i need to retirve file object from that cluster\r\n //then again the query is \r\n //Station:Abcbankclientstation:insurancestore:abishkar.txt\r\n //now again file object graph tree is traversed until i get abishkar.txt and goes on recusrsively\r\n //or \r\n //Station:Abcbankclientstation:insurancestore:insuranceObject\r\n //insurancestore has large no of insuranceObject kept as tree,so again insurancestore is traversed until\r\n //insuranceObject is retirved and goes on recusrsively \r\n \r\n \r\n //Object graph is continuously updated ot inserted by another program in continuous basis on the basis of tree type object\r\n \r\n}",
"public static org.json.JSONObject m5902a(org.json.JSONObject r1, java.lang.String r2, org.json.JSONObject r3) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)\n\tat jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)\n\tat jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)\n\tat jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)\n\tat jadx.core.ProcessClass.process(ProcessClass.java:34)\n\tat jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:282)\n\tat jadx.api.JavaClass.decompile(JavaClass.java:62)\n\tat jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:200)\n\tat jadx.api.JadxDecompiler$$Lambda$8/509891820.run(Unknown Source)\n*/\n /*\n r0 = r1.has(r2);\t Catch:{ JSONException -> 0x0013 }\n if (r0 == 0) goto L_0x0011;\t Catch:{ JSONException -> 0x0013 }\n L_0x0006:\n r0 = r1.isNull(r2);\t Catch:{ JSONException -> 0x0013 }\n if (r0 != 0) goto L_0x0011;\t Catch:{ JSONException -> 0x0013 }\n L_0x000c:\n r1 = r1.getJSONObject(r2);\t Catch:{ JSONException -> 0x0013 }\n goto L_0x0012;\n L_0x0011:\n r1 = 0;\n L_0x0012:\n return r1;\n L_0x0013:\n return r3;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.cuvora.carinfo.helpers.i.a(org.json.JSONObject, java.lang.String, org.json.JSONObject):org.json.JSONObject\");\n }",
"public Node findInOrderSuccessor() {\n\n return null;\n }",
"public E next()\n {\n removeLevelIfEmpty();\n if (noLevelsExist()) {\n return null;\n }\n return popNextObject();\n }",
"public ServiceInstanceInner deserializeInstanceData(String lastPathSeg, byte[] data)\n/* */ {\n/* 138 */ return null;\n/* */ }",
"@Override\n\tpublic PathIterator getPathIterator(AffineTransform arg0) {\n\t\treturn null;\n\t}",
"public static boolean object_path(PsiBuilder builder_, int level_) {\n if (!recursion_guard_(builder_, level_, \"object_path\")) return false;\n boolean result_ = false;\n boolean pinned_ = false;\n Marker marker_ = enter_section_(builder_, level_, _NONE_, \"<object path>\");\n result_ = object_path_0(builder_, level_ + 1);\n result_ = result_ && object_path_1(builder_, level_ + 1);\n pinned_ = result_; // pin = 2\n result_ = result_ && consumeToken(builder_, OBJECT_PATH_ENTITY);\n exit_section_(builder_, level_, marker_, OBJECT_PATH, result_, pinned_, null);\n return result_ || pinned_;\n }",
"int updatePath(int curr, int end, int cost) {\n SegmentTree currSTree = heavySegTrees.get(treeUp[curr].sid);\n if (currSTree.rootDepth <= depth[end]) {\n // Don't need to go all the way; only update partial\n // System.out.printf(\"Updating from %d to %d on sid %d\\n\", depth[currSTree.tailNode] - depth[curr], currSTree.size + depth[currSTree.rootNode] - depth[end] - 1, treeUp[curr].sid);\n currSTree.update(currSTree.tailDepth - depth[curr], currSTree.size + currSTree.rootDepth - depth[end] - 1, cost);\n return -1;\n } else {\n // Go to the next segment tree\n currSTree.update(currSTree.tailDepth - depth[curr], currSTree.size - 1, cost);\n return currSTree.rootNode;\n }\n }",
"public T caseACLineSegment(ACLineSegment object) {\n\t\treturn null;\n\t}",
"@Override\n public boolean contains(E obj) {\n Node<E> currentNode = head;\n if (isEmpty())\n return false;\n else if (obj.compareTo(peekFirst()) == 0)\n return true;\n else if (obj.compareTo(peekLast()) == 0)\n return true;\n else {\n while (true) {\n if (obj.compareTo(currentNode.data) == 0) {\n return true;\n } else if (currentNode.next == null)\n return false;\n else\n currentNode = currentNode.next;\n }\n }\n }",
"private LinkedList<Node> reconstructPath(Map<Node, Node> cameFrom, Node current){\n LinkedList<Node> bestPath = new LinkedList<>();\n bestPath.add(current);\n\n while(cameFrom.containsKey(current)){\n current = cameFrom.get(current);\n bestPath.add(current);\n }\n return bestPath;\n }",
"public void traverseIncludeSelf(INext<T> next){\n if(next==null){\n return;\n }\n traverse(this,next,true);\n }",
"private Route append(Map<QualifiedName, PathParamDescriptor> pathParamDescriptors, String path) throws MalformedRouteException\n {\n if (path.length() == 0 || path.charAt(0) != '/')\n {\n throw new MalformedRouteException();\n }\n\n //\n int pos = path.length();\n int level = 0;\n List<Integer> start = new ArrayList<Integer>();\n List<Integer> end = new ArrayList<Integer>();\n for (int i = 1;i < path.length();i++)\n {\n char c = path.charAt(i);\n if (c == '{')\n {\n if (level++ == 0)\n {\n start.add(i);\n }\n }\n else if (c == '}')\n {\n if (--level == 0)\n {\n end.add(i);\n }\n }\n else if (c == '/')\n {\n if (level == 0)\n {\n pos = i;\n break;\n }\n }\n }\n\n //\n Route next;\n if (start.isEmpty())\n {\n String segment = path.substring(1, pos);\n SegmentRoute route = new SegmentRoute(router, segment);\n add(route);\n next = route;\n }\n else\n {\n if (start.size() == end.size())\n {\n PatternBuilder builder = new PatternBuilder();\n builder.expr(\"^\").expr('/');\n List<String> chunks = new ArrayList<String>();\n List<PathParam> parameterPatterns = new ArrayList<PathParam>();\n\n //\n int previous = 1;\n for (int i = 0;i < start.size();i++)\n {\n builder.litteral(path, previous, start.get(i));\n chunks.add(path.substring(previous, start.get(i)));\n String parameterName = path.substring(start.get(i) + 1, end.get(i));\n\n //\n QualifiedName parameterQName = QualifiedName.parse(parameterName);\n\n // Now get path param metadata\n PathParamDescriptor parameterDescriptor = pathParamDescriptors.get(parameterQName);\n\n //\n PathParam param;\n if (parameterDescriptor != null)\n {\n param = PathParam.create(parameterDescriptor, router);\n }\n else\n {\n param = PathParam.create(parameterQName, router);\n }\n\n // Append routing regex to the route regex surrounded by a non capturing regex\n // to isolate routingRegex like a|b or a(.)b\n builder.expr(\"(?:\").expr(param.routingRegex).expr(\")\");\n\n // Add the path param with the rendering regex\n parameterPatterns.add(param);\n previous = end.get(i) + 1;\n }\n\n //\n builder.litteral(path, previous, pos);\n\n // We want to satisfy one of the following conditions\n // - the next char after the matched expression is '/'\n // - the expression matched until the end\n // - the match expression is the '/' expression\n builder.expr(\"(?:(?<=^/)|(?=/)|$)\");\n\n //\n chunks.add(path.substring(previous, pos));\n PatternRoute route = new PatternRoute(router, router.compile(builder.build()), parameterPatterns, chunks);\n\n // Wire\n add(route);\n\n //\n next = route;\n }\n else\n {\n throw new UnsupportedOperationException(\"Report error\");\n }\n }\n\n //\n if (pos < path.length())\n {\n return next.append(pathParamDescriptors, path.substring(pos));\n }\n else\n {\n return next;\n }\n }",
"public T put(T content, final String...pathName)\r\n throws BadRootNameException\r\n {\r\n String rname = pathName[0];\r\n\r\n if( head != null ) {\r\n if( head.getName() == null ) {\r\n // tree head is the only node,\r\n // that can have no name\r\n if( rname != null ) {\r\n throw new BadRootNameException(\"root name should be null\");\r\n }\r\n }\r\n else {\r\n if( head.getName().equals( rname ) ) {\r\n if( pathName.length == 1 ) {\r\n //Set head !\r\n T prev = head.getData();\r\n head.setData( content );\r\n return prev;\r\n }\r\n }\r\n else {\r\n // Not in this tree !\r\n throw new BadRootNameException(\r\n String.format(\"Found '%s' expected '%s'\", rname, head.getName() )\r\n );\r\n }\r\n }\r\n }\r\n else {\r\n // No head\r\n head = new DefaultNamedTreeNode<T>(rname, null);\r\n\r\n if( pathName.length == 1 ) {\r\n //Set head !\r\n T prev = head.getData();\r\n head.setData( content );\r\n return prev;\r\n }\r\n }\r\n\r\n DefaultNamedTreeNode<T> n = head;\r\n\r\n // Deal with path to node (but node final node)\r\n for(int i=1;i<pathName.length - 1;i++) {\r\n DefaultNamedTreeNode<T> next = lookup(n, pathName[i]);\r\n\r\n if( next != null ) {\r\n // Node found.\r\n n = next;\r\n }\r\n else {\r\n // Node not found.\r\n next = new DefaultNamedTreeNode<T>(pathName[i], n);\r\n\r\n DefaultNamedTreeNode<T> prev = n.getLastChild();\r\n if( prev == null ) {\r\n n.addChild( next );\r\n }\r\n else {\r\n // Add to child list.\r\n prev.setRightNode( next );\r\n }\r\n n = next;\r\n }\r\n }\r\n\r\n // Deal with final node\r\n DefaultNamedTreeNode<T> existNode = lookup(n, pathName[pathName.length-1]);\r\n\r\n if( existNode != null ) {\r\n // Just set datas !\r\n T prev = existNode.getData();\r\n existNode.setData( content );\r\n return prev;\r\n }\r\n else {\r\n DefaultNamedTreeNode<T> fnode = new DefaultNamedTreeNode<T>(pathName[pathName.length-1], n, content);\r\n DefaultNamedTreeNode<T> prev = n.getLastChild();\r\n\r\n if( prev == null ) {\r\n n.addChild( fnode );\r\n }\r\n else {\r\n // Add to child list.\r\n prev.setRightNode( fnode );\r\n }\r\n return null;\r\n }\r\n }",
"private TSTNode<E> deleteNodeRecursion(TSTNode<E> currentNode) {\n \n if(currentNode == null) return null;\n if(currentNode.relatives[TSTNode.EQKID] != null || currentNode.data != null) return null; // can't delete this node if it has a non-null eq kid or data\n\n TSTNode<E> currentParent = currentNode.relatives[TSTNode.PARENT];\n\n // if we've made it this far, then we know the currentNode isn't null, but its data and equal kid are null, so we can delete the current node\n // (before deleting the current node, we'll move any lower nodes higher in the tree)\n boolean lokidNull = currentNode.relatives[TSTNode.LOKID] == null;\n boolean hikidNull = currentNode.relatives[TSTNode.HIKID] == null;\n\n ////////////////////////////////////////////////////////////////////////\n // Add by Cheok. To resolve java.lang.NullPointerException\n // I am not sure this is the correct solution, as I have not gone\n // through this sourc code in detail.\n if (currentParent == null && currentNode == this.rootNode) {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n // Add by Cheok. To resolve java.lang.NullPointerException\n ////////////////////////////////////////////////////////////////////////\n\n // now find out what kind of child current node is\n int childType;\n if(currentParent.relatives[TSTNode.LOKID] == currentNode) {\n childType = TSTNode.LOKID;\n } else if(currentParent.relatives[TSTNode.EQKID] == currentNode) {\n childType = TSTNode.EQKID;\n } else if(currentParent.relatives[TSTNode.HIKID] == currentNode) {\n childType = TSTNode.HIKID;\n } else {\n // if this executes, then current node is root node\n rootNode = null;\n return null;\n }\n\n if(lokidNull && hikidNull) {\n // if we make it to here, all three kids are null and we can just delete this node\n currentParent.relatives[childType] = null;\n return currentParent;\n }\n\n // if we make it this far, we know that EQKID is null, and either HIKID or LOKID is null, or both HIKID and LOKID are NON-null\n if(lokidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.HIKID];\n currentNode.relatives[TSTNode.HIKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n if(hikidNull) {\n currentParent.relatives[childType] = currentNode.relatives[TSTNode.LOKID];\n currentNode.relatives[TSTNode.LOKID].relatives[TSTNode.PARENT] = currentParent;\n return currentParent;\n }\n\n int deltaHi = currentNode.relatives[TSTNode.HIKID].splitchar - currentNode.splitchar;\n int deltaLo = currentNode.splitchar - currentNode.relatives[TSTNode.LOKID].splitchar;\n int movingKid;\n TSTNode<E> targetNode;\n \n // if deltaHi is equal to deltaLo, then choose one of them at random, and make it \"further away\" from the current node's splitchar\n if(deltaHi == deltaLo) {\n if(Math.random() < 0.5) {\n deltaHi++;\n } else {\n deltaLo++;\n }\n }\n\n\tif(deltaHi > deltaLo) {\n movingKid = TSTNode.HIKID;\n targetNode = currentNode.relatives[TSTNode.LOKID];\n } else {\n movingKid = TSTNode.LOKID;\n targetNode = currentNode.relatives[TSTNode.HIKID];\n }\n\n while(targetNode.relatives[movingKid] != null) targetNode = targetNode.relatives[movingKid];\n \n // now targetNode.relatives[movingKid] is null, and we can put the moving kid into it.\n targetNode.relatives[movingKid] = currentNode.relatives[movingKid];\n\n // now we need to put the target node where the current node used to be\n currentParent.relatives[childType] = targetNode;\n targetNode.relatives[TSTNode.PARENT] = currentParent;\n\n if(!lokidNull) currentNode.relatives[TSTNode.LOKID] = null;\n if(!hikidNull) currentNode.relatives[TSTNode.HIKID] = null;\n\n // note that the statements above ensure currentNode is completely dereferenced, and so it will be garbage collected\n return currentParent;\n }",
"public T caseNavigationCallExp(NavigationCallExp object) {\r\n return null;\r\n }",
"public static JsonElement getElementByPath(JsonObject root, List<String> list, JsonElement[] parent){\n JsonElement ret = root;\n int i = 0;\n String s;\n try{\n do{\n if(i == list.size()){\n return ret;\n }\n \n s = list.get(i++);\n if(parent != null){\n parent[0] = ret;\n } \n ret = ((JsonObject)ret).get(s); \n \n if(ret == null || ret.isJsonNull()){\n return null;\n }\n else if(ret.isJsonPrimitive()){\n if(i < (list.size() - 1)){\n return null;\n }\n else{\n s = list.get(i);\n String str = ret.getAsString();\n if(s.equals(str)){\n return ret;\n }\n else{\n return null;\n }\n }\n }\n else if (ret.isJsonArray()){\n // tao lap duong dan con\n List<String> l = new ArrayList<>();\n int j;\n for(j = i; j < list.size(); j++){\n l.add(list.get(j));\n }\n \n // tim kiem bat ky doi tuong con nao thao man\n JsonArray arr = (JsonArray)ret;\n boolean bFound = false; \n for(j = 0; j < arr.size(); j++){\n ret = arr.get(j); \n ret = getElementByPath((JsonObject)ret, l, parent);\n if(ret != null){\n bFound = true;\n break; \n }\n }\n \n if(!bFound){\n ret = null;\n }\n return ret;\n }\n } \n while(true);\n }\n catch(Exception ex){\n return null;\n }\n }",
"public T caseGraphicalNode(GraphicalNode object) {\n\t\treturn null;\n\t}",
"protected void recursiveInitialize(List<JoinPath> joinPaths, Object rootObj) throws OgnlException\n {\n\n Map<String, Object> joinPathMap = new HashMap<String, Object>();\n Map<String, Object> flatIndex = new HashMap<String, Object>();\n HashMap parentMap = new HashMap();\n parentMap.put(\"alias\",\"this\");\n parentMap.put(\"joinType\", JoinType.LEFT_JOIN);\n joinPathMap.put(\"this\", parentMap);\n flatIndex.put(\"this\", parentMap);\n\n for (JoinPath joinPath : joinPaths)\n {\n if(StringUtils.isBlank(joinPath.alias))\n {\n //kalo kosong lewati\n/*\n String[] pathArray = joinPath.path.split(\"[.]\");\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = pathArray[pathArray.length - 1];\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n*/\n }\n else\n {\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = joinPath.alias;\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n }\n }\n for (JoinPath joinPath : joinPaths)\n {\n String[] pathArray = joinPath.path.split(\"[.]\");\n if(pathArray.length>1)\n {\n //gabung alias ke pathnya\n //cari parent\n Map mapParent = (Map) flatIndex.get(pathArray[0]);\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[1]);\n }\n mapParent.put(pathArray[1], mapChild);\n }\n else\n {\n //gabung alias ke pathnya\n //cari parent -- this\n Map mapParent = (Map) flatIndex.get(\"this\");\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[0]);\n }\n mapParent.put(pathArray[0], mapChild);\n }\n }\n if(cleanUp((Map<String, Object>) joinPathMap.get(\"this\")))\n {\n if (Collection.class.isAssignableFrom(rootObj.getClass()))\n {\n for (Object rootObjIter : ((Collection) rootObj))\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObjIter, true);\n }\n }\n else\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObj, false);\n }\n }\n }",
"@Override\n public void nullstill() {\n Node<T> curr= hode;\n while (curr!=null){\n Node<T> p= curr.neste;\n curr.forrige=curr.neste= null;\n curr.verdi= null;\n curr= p;\n }\n hode= hale= null;\n endringer++;\n antall=0;\n }",
"private void advanceObjectSummary()\n {\n while (objectSummaryIterator.hasNext() || result.isTruncated() || prefixesIterator.hasNext()) {\n while (objectSummaryIterator.hasNext()) {\n currentObjectSummary = objectSummaryIterator.next();\n // skips directories and empty objects\n if (!isDirectoryPlaceholder(currentObjectSummary) && currentObjectSummary.getSize() > 0) {\n return;\n }\n }\n\n // Exhausted \"objectSummaryIterator\" without finding a non-placeholder.\n if (result.isTruncated()) {\n fetchNextBatch();\n } else if (prefixesIterator.hasNext()) {\n prepareNextRequest();\n fetchNextBatch();\n }\n }\n\n // Truly nothing left to read.\n currentObjectSummary = null;\n }",
"@Nullable\n private static Step previousStepHelper(@Nullable Step initialStep, @Nullable Node current,\n AtomicBoolean hasFoundInitial) {\n if (current == null) {\n return null;\n }\n\n if (current.step != null) {\n if (hasFoundInitial.get() && current.isLeaf()) {\n return current.step;\n }\n\n if (current.step.equals(initialStep)) {\n hasFoundInitial.set(true);\n }\n }\n\n if (current.children != null) {\n for (Node child : current.children.reverse()) {\n Step found = previousStepHelper(initialStep, child, hasFoundInitial);\n if (found != null) {\n return found;\n }\n }\n }\n\n return null;\n }",
"@Override\n\tpublic JSONObject update(JSONObject obj) {\n\t\treturn null;\n\t}",
"private Path createPath(AStarNode start, AStarNode end) {\n Path path = new Path();\n AStarNode ptr = end;\n while (!ptr.equals(start)) {\n path.addFirst(ptr);\n ptr = ptr.getPrevious();\n }\n path.addFirst(start);\n\n return path;\n }",
"private Stack path(Graph graph, GraphNode start, GraphNode end) throws GraphException {\n\t\tGraph g = graph;\n\t\tGraphNode b = start;\n\t\tGraphNode e = end;\n\t\tGraphNode temp;\n\t\tStack p;\n\n\t\t// mark the beginning point and push it to the stack.\n\t\tb.setMark(true);\n\t\tedgeStack.push(b);\n\n\t\t// check if the starting and end point are equal.\n\t\tif (b == e) {\n\t\t\treturn edgeStack;\n\t\t}\n\t\t// iterates until it reaches the end point\n\t\telse {\n\t\t\t// initializes edges to the edges incident on node b\n\t\t\tIterator<GraphEdge> edges = graph.incidentEdges(b);\n\n\t\t\t// iterates until it reaches the end of nodes\n\t\t\twhile (edges.hasNext()) {\n\t\t\t\ttemp = edges.next().secondEndpoint();\n\n\t\t\t\t// checks if the second point of the edge has been discovered\n\t\t\t\tif (temp.getMark() == false ) {\n\t\t\t\t\tp = path(g, temp, e);\n\n\t\t\t\t\t// if the path ends return null\n\t\t\t\t\tif (p != null) {\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tedgeStack.pop();\n\t\t}\n\t\treturn null;\n\t}",
"private void inOrderTraversal(StringBuilder sb) {\n if (left != null) {\n left.inOrderTraversal(sb);\n }\n\n sb.append(data + \" \");\n\n\n if (right != null) {\n right.inOrderTraversal(sb);\n }\n }",
"@Override\r\n public int getDepth() {\r\n final int len = getPath().length();\r\n if (len == 0 || len == 1 && getPath().charAt(0) == SEPARATOR_CHAR) {\r\n return 0;\r\n }\r\n int depth = 1;\r\n for (int pos = 0; pos > -1 && pos < len; depth++) {\r\n pos = getPath().indexOf(SEPARATOR_CHAR, pos + 1);\r\n }\r\n return depth;\r\n }",
"@Test\n public void an_array_path_followed_by_object_followed_by_array_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.drivers[0].extensions.homePhones[1]\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n 99999,pathConfiguration);\n Integer result = parse(output).read(path);\n assertThat(result).isEqualTo(99999);\n }",
"public List<?> getTreePath(Object object)\n {\n LinkedList<Object> result = new LinkedList<Object>();\n result.addFirst(object);\n while ((object = getParent(object)) != null)\n {\n result.addFirst(object);\n }\n \n return result;\n }",
"PathSegments getPath();",
"public T caseFinalNode(FinalNode object) {\n\t\treturn null;\n\t}",
"private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t\t\t parent = node.getParent();\r\n\t\t }\r\n\t\t return parent;\t \r\n\t\t}",
"private Node<TokenAttributes> findFirst(Node<TokenAttributes> current_node) {\n if (current_node.getParent() != null && current_node.getParent().getChildren().size() == 1) {\n return findFirst(current_node.getParent());\n }\n if (current_node.getParent() == null) {\n return current_node;\n }\n return current_node;\n }",
"protected JsonObject(String objStr, int startIndex, boolean delayed) throws JsonParseException\n\t{\n\t\tsuper(objStr, startIndex, delayed, ParserUtil.OBJECT_OPEN, ParserUtil.OBJECT_CLOSE);\n\t}",
"public static String unescapePointer(String jsonPathElement) {\n try {\n jsonPathElement = URLDecoder.decode(jsonPathElement, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n //\n }\n // Unescape the JSON Pointer segment using the algorithm described in RFC 6901, section 4:\n // https://tools.ietf.org/html/rfc6901#section-4\n // First transform any occurrence of the sequence '~1' to '/'\n jsonPathElement = jsonPathElement.replaceAll(\"~1\", \"/\");\n // Then transforming any occurrence of the sequence '~0' to '~'.\n return jsonPathElement.replaceAll(\"~0\", \"~\");\n }"
] | [
"0.5908995",
"0.5316464",
"0.51628315",
"0.50787586",
"0.4944887",
"0.49430212",
"0.48828438",
"0.48706037",
"0.48594216",
"0.48391905",
"0.4836923",
"0.48066473",
"0.47714004",
"0.4713687",
"0.47041184",
"0.46492296",
"0.46276414",
"0.4620729",
"0.46201873",
"0.45899272",
"0.45875928",
"0.45813885",
"0.45782253",
"0.45668218",
"0.45605066",
"0.45599905",
"0.4538427",
"0.45021963",
"0.45003015",
"0.44824895",
"0.4479675",
"0.44670093",
"0.44663364",
"0.44579908",
"0.44568527",
"0.443743",
"0.44353148",
"0.44346374",
"0.4426836",
"0.44170883",
"0.4416969",
"0.44057143",
"0.44035074",
"0.44029635",
"0.44000104",
"0.43890795",
"0.4373185",
"0.43649566",
"0.43597412",
"0.43530354",
"0.43527195",
"0.43457165",
"0.43446666",
"0.43441564",
"0.4342079",
"0.43389195",
"0.43322477",
"0.4329841",
"0.43287888",
"0.43107763",
"0.4310373",
"0.429965",
"0.42974395",
"0.4295362",
"0.4285313",
"0.42814702",
"0.4260061",
"0.42589286",
"0.4247836",
"0.4247102",
"0.42458144",
"0.42353654",
"0.42302114",
"0.42290232",
"0.42151397",
"0.42141038",
"0.42133236",
"0.42109534",
"0.4204757",
"0.4198024",
"0.41972116",
"0.41961345",
"0.4194947",
"0.41896617",
"0.41872737",
"0.41815588",
"0.41812885",
"0.41764957",
"0.4174382",
"0.4169546",
"0.41694272",
"0.41646215",
"0.41599816",
"0.41584572",
"0.41573474",
"0.4155572",
"0.414571",
"0.41454023",
"0.41432792",
"0.4136954"
] | 0.50703424 | 4 |
Degenerate case of using with "empty" path; ok if ObjectNode | @Override
public ArrayNode withArray(JsonPointer ptr,
OverwriteMode overwriteMode, boolean preferIndex)
{
if (ptr.matches()) {
if (this instanceof ArrayNode) {
return (ArrayNode) this;
}
_reportWrongNodeType("Can only call `withArray()` with empty JSON Pointer on `ArrayNode`, not %s",
ClassUtil.nameOf(getClass()));
}
// Otherwise check recursively
ArrayNode n = _withArray(ptr, ptr, overwriteMode, preferIndex);
if (n == null) {
_reportWrongNodeType("Cannot replace context node (of type %s) using `withArray()` with JSON Pointer '%s'",
ClassUtil.nameOf(getClass()), ptr);
}
return n;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T casePathLiteral(PathLiteral object)\n {\n return null;\n }",
"default Empty getEmptyObject() {\n return null;\n }",
"public ObjectNode resolvePaths();",
"private static boolean empty(Object object) {\n\t\treturn false;\n\t}",
"public T caseFromClassOrOuterQueryPath(FromClassOrOuterQueryPath object)\n {\n return null;\n }",
"@Test(expected=NullPointerException.class)\n\tpublic void constructPathTest1(){ \n\t\tNodeList n=xmlDocument.getElementsByTagName(null);\n\t\tManipulator.constructPath(n.item(0));\n\t}",
"@Override\r\n public String getPath(boolean arg0) {\n return null;\r\n }",
"public T caseFieldPath(FieldPath object)\n {\n return null;\n }",
"private ObjectNode ProcessObject(RDFNode node){\n if(node.isLiteral()){\n //handle literal\n return TransformUtils.GenerateLiteralJsonObject(mapper, node.asLiteral(), null);\n }\n else {\n //else handle resource\n return ProcessResource(node.asResource());\n }\n }",
"@Test\n public void a_hierarchical_non_existent_path_can_be_created_and_value_set() {\n\n String path = \"$.shipment.extensionFields.carrier\";\n JsonPath compiledPath = JsonPath.compile(path);\n Object output = compiledPath.set(pathConfiguration.jsonProvider().parse(inputObject),\n \"Alpha Transports\",pathConfiguration);\n String result = parse(output).read(path);\n assertThat(result).matches(\"Alpha Transports\");\n\n }",
"public static boolean object_path(PsiBuilder builder_, int level_) {\n if (!recursion_guard_(builder_, level_, \"object_path\")) return false;\n boolean result_ = false;\n boolean pinned_ = false;\n Marker marker_ = enter_section_(builder_, level_, _NONE_, \"<object path>\");\n result_ = object_path_0(builder_, level_ + 1);\n result_ = result_ && object_path_1(builder_, level_ + 1);\n pinned_ = result_; // pin = 2\n result_ = result_ && consumeToken(builder_, OBJECT_PATH_ENTITY);\n exit_section_(builder_, level_, marker_, OBJECT_PATH, result_, pinned_, null);\n return result_ || pinned_;\n }",
"public void makeEmpty()\n {\n root = nil;\n }",
"@Override\r\n public String getPath() {\n return null;\r\n }",
"public T caseRoot(Root object) {\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Object getObjectNameByPath(String path) throws Exception {\n\t\treturn null;\n\t}",
"@Test\n public void allowedEmptyLeaf() throws Exception {\n Query query = Query.parse(\"/allow-empty-leaf\");\n doAllowedEmptyTest(query);\n }",
"@Test\n public void test4() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.setName((String) null);\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"public T caseGraphicalNode(GraphicalNode object) {\n\t\treturn null;\n\t}",
"@Override\n public String visit(ObjectCreationExpr n, Object arg) {\n return null;\n }",
"@Override\n public boolean isMissingNode() { return false; }",
"public boolean empty() {\n if(root==EXT_NODE) {\r\n \treturn true;\r\n }\r\n return false;\r\n }",
"@Test\n public void testResolveName_againstEmptyPath() {\n assertPathEquals(\"foo\", pathService.emptyPath().resolve(Name.simple(\"foo\")));\n }",
"@Test\n public void testDefaultRoot() {\n assertEquals(ClassModel.getObjectClass(), node.getModel());\n assertEquals(1, node.size());\n assertEquals(0, treeHash.size());\n }",
"public static PathAnchor none() {\n return None.INSTANCE;\n }",
"@Override\n public abstract Object getEmptyValue(DeserializationContext ctxt) throws JsonMappingException;",
"public ObjectBinaryTree() {\n root = null;\n }",
"public void testGetObjectSpecificationWithEmptyKey() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(\"\", \"identifier\");\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n // ok\r\n }\r\n }",
"@Override\n public boolean isEmpty() {\n return root == null;\n }",
"public T caseInitialNode(InitialNode object) {\n\t\treturn null;\n\t}",
"public void makeEmpty() {\n root = null;\n }",
"private ObjectNode ProcessResource(Resource res){\n if (res.isURIResource()){\n return ProcessUri(res);\n }\n else if (res.isAnon()){\n //handle blank node\n String anonId = res.getId().toString();\n\n ObjectNode json_object = mapper.createObjectNode();\n json_object.put(ArangoAttributes.TYPE, RdfObjectTypes.BLANK_NODE);\n json_object.put(ArangoAttributes.VALUE, anonId);\n\n return json_object;\n }\n return null;\n }",
"@Override\n public boolean equals(\n Object object\n ){\n \tif(this == object) {\n \t\treturn true;\n \t}\n \tif(object instanceof Path) {\n \t\tPath that = (Path) object;\n \t\tif(this.size == that.size) {\n \t\t\tif(this.size == 0) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\tif(this.base.equals(that.base)) {\n \t\t\t return \n \t\t\t this.parent == that.parent ||\n \t\t\t this.parent.equals(that.parent);\n \t\t\t}\n \t\t}\n \t}\n\t\treturn false;\n }",
"public void makeEmpty( )\r\n\t{\r\n\t\troot = null;\r\n\t}",
"@Override\n\tpublic Object visit(SimpleNode node, Object data) {\n\t\treturn null;\n\t}",
"@Override\n public boolean isEmpty() {\n return (that.rootNode == null);\n }",
"public boolean isEmpty( Object object ){\n if( object == null ){\n return true;\n }\n return false;\n }",
"@Override\n protected JsonNode _at(JsonPointer ptr) {\n return null;\n }",
"@Override\r\n public String getPath() {\n return null;\r\n }",
"@Test(expected=NullPointerException.class)\n\tpublic void constructPathTest2(){ \n\t\tNodeList n=xmlDocument.getElementsByTagName(\"c\");\n\t\tManipulator.constructPath(n.item(0));\n\t}",
"protected <T> T emptyToNull(T obj) {\r\n if (isEmpty(obj)) {\r\n return null;\r\n } else {\r\n return obj;\r\n }\r\n }",
"private RequestNodePath() {\n }",
"@Override\n public void visit(NoOpNode noOpNode) {\n }",
"public void makeEmpty() {\r\n\t\troot = null;\r\n\t}",
"public T casePropertyCallExplicitPathExpCS(PropertyCallExplicitPathExpCS object) {\r\n return null;\r\n }",
"@Override\n\tpublic ArrayList<Edge<Object>> getPath(String startNode, String endNode) {\n\t\treturn null;\n\t}",
"public T caseDocumentRoot(DocumentRoot object) {\n\t\treturn null;\n\t}",
"public T caseDocumentRoot(DocumentRoot object) {\n\t\treturn null;\n\t}",
"public void makeEmpty() {\n\t\troot = null;\n\t}",
"public T caseExecutableNode(ExecutableNode object) {\n\t\treturn null;\n\t}",
"public T caseExprIsEmpty(ExprIsEmpty object)\n {\n return null;\n }",
"boolean isEmpty(){\r\n\t\t\r\n\t\treturn root == null;\r\n\t}",
"private boolean isEmpty()\r\n\t{\r\n\t\treturn getRoot() == null;\r\n\t}",
"public T caseNode(Node object) {\n\t\treturn null;\n\t}",
"public T caseNode(Node object) {\n\t\treturn null;\n\t}",
"public void testGetObjectSpecificationWithNullIdentifier() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n root.addChild(createObject(\"key\", TYPE_NUMBER));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification object = specificationFactory.getObjectSpecification(\"key\", null);\r\n\r\n assertEquals(\"SpecType should be complex.\", ObjectSpecification.COMPLEX_SPECIFICATION,\r\n object.getSpecType());\r\n assertNull(\"Identifier should be null.\", object.getIdentifier());\r\n assertEquals(\"Type should be 'B'.\", TYPE_NUMBER, object.getType());\r\n }",
"protected abstract T _createEmpty(DeserializationContext ctxt);",
"public void testGetObjectSpecificationWithNullKey() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(null, \"identifier\");\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n // ok\r\n }\r\n }",
"public void testGetObjectSpecificationWithNotFoundNullIdentifier() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(\"key\", null);\r\n fail(\"UnknownReferenceException is expected.\");\r\n } catch (UnknownReferenceException e) {\r\n // ok\r\n }\r\n }",
"@Override\n\tpublic PathIterator getPathIterator(AffineTransform arg0) {\n\t\treturn null;\n\t}",
"public interface PathNodeMember extends PathNode {\n}",
"@Override\n\tpublic boolean isEmpty() {\n\t\tmodCount = root.numChildren();\n\t\treturn (modCount == 0);\n\t}",
"public boolean isEmpty()\n {\n return root == nil;\n }",
"public boolean isEmpty()\n {\n return root == nil;\n }",
"@Override\n public String visit(InstanceOfExpr n, Object arg) {\n return null;\n }",
"public T caseTypePathNameSimpleCS(TypePathNameSimpleCS object) {\r\n return null;\r\n }",
"@Override\n public R visit(PropertyListNotEmpty n, A argu) {\n R _ret = null;\n n.verb.accept(this, argu);\n n.objectList.accept(this, argu);\n n.nodeListOptional.accept(this, argu);\n return _ret;\n }",
"public T caseProcPath(ProcPath object) {\n\t\treturn null;\n\t}",
"@Override\n\tprotected Object handleGetObject(String arg0) {\n\t\treturn null;\n\t}",
"public SNode(object obj)\r\n {\r\n\t\r\n\toop=obj;\r\n }",
"@Test\n public void test0() throws Throwable {\n Object object0 = new Object();\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem(object0);\n defaultMenuItem0.getName();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"@Test\n public void testDeleteNodeIfNoChildren_hasNoChildrenShouldDelete() throws Exception {\n final String basePath = \"/testDeleteNodeIfNoChildren_hasNoChildrenShouldDelete\";\n\n try (final CuratorFramework curator = createCurator()) {\n // Create basePath\n curator\n .create()\n .creatingParentsIfNeeded()\n .forPath(basePath);\n\n // Now create our helper\n final CuratorHelper curatorHelper = new CuratorHelper(curator, new HashMap<>());\n\n // Call our method\n curatorHelper.deleteNodeIfNoChildren(basePath);\n\n // Validate is gone\n final Stat result = curator\n .checkExists()\n .forPath(basePath);\n assertNull(result, \"base path should be removed\");\n }\n }",
"@Override\n\t\tpublic String getPathInfo() {\n\t\t\treturn null;\n\t\t}",
"public void visitACONST_NULL(ACONST_NULL o){\n\t\t// Nothing needs to be done here.\n\t}",
"public boolean isEmpty( )\r\n\t{\r\n\t\treturn root == null;\r\n\t}",
"@Override\n\tprotected String getPathSeparator() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn firstNode.equals(null);\n\t}",
"protected boolean isEmpty(Object obj) {\r\n return (obj == null || obj instanceof String\r\n && ((String) obj).trim().length() == 0);\r\n }",
"public T caseTypePathNameNestedCS(TypePathNameNestedCS object) {\r\n return null;\r\n }",
"public boolean empty() {\n\t\treturn (this.root == null); // to be replaced by student code\n\t}",
"@Override\n public boolean isObject() {\n return false;\n }",
"@Override\n public final void addWhenEmpty(final ET object) throws ConcurrentModificationException, UnsupportedOperationException {\n concurrencyCheck();\n emptyCheck();\n final Link<ET> newLink = new Link<>(object, null, null);\n newLink.left = newLink;\n newLink.right = newLink;\n list.voidLink.left = newLink;\n list.voidLink.right = newLink;\n pos++;\n expectedModCount++;\n list.size++;\n list.modCount++;\n }",
"@Test(timeout = 4000)\n public void test051() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.putOpt((String) null, (Object) null);\n Object object0 = JSONObject.NULL;\n assertNotNull(object0);\n }",
"public static boolean IsEmpty(Object o)\n {\n \treturn\n\t o == null ||\n\t o instanceof String && ((String)o).length() == 0 ||\n\t o.getClass().isArray() && Array.getLength(o) == 0 ||\n\t o instanceof Collection && ((Collection)o).size() == 0 ||\n\t o instanceof Map && ((Map)o).size() == 0 ||\n\t o instanceof SparseArray && ((SparseArray)o).size() == 0;\n }",
"public T caseRelNotEq(RelNotEq object)\n {\n return null;\n }",
"AstroArg empty();",
"@Test\n public void test5() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getContained();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"public interface JsonPath {\n\n JsonPath parent();\n\n Optional<JsonObject> getJsonObject(JsonObject jsonObject);\n\n Optional<JsonArray> getJsonArray(JsonObject jsonObject);\n\n static JsonPath root() {\n return new JsonPathImpl(ImmutableList.of());\n }\n\n boolean isRoot();\n\n JsonPath concat(JsonObjectPathSpecImpl jsonObjectPathSpec);\n\n JsonPath concat(JsonArrayPathSpecImpl jsonArrayPathSpec);\n\n JsonPath concat(JsonPath jsonPath);\n\n List<PathSpec> parts();\n\n JsonPath subpath(int start, int end);\n\n int size();\n\n static JsonPath parse(final String pathStr) {\n\n Objects.requireNonNull(pathStr);\n\n ImmutableList.Builder<PathSpec> listBuilder = ImmutableList.builder();\n\n String[] split = pathStr.split(\"\\\\.\");\n for (int i = 0; i < split.length; i++) {\n String strPart = split[i];\n\n if (strPart.isEmpty()) {\n continue;\n }\n\n int start = strPart.indexOf('[');\n\n if (start > 0) {\n int end = strPart.indexOf(']');\n\n listBuilder.add(\n new JsonArrayPathSpecImpl(\n strPart.substring(0, start),\n Integer.parseInt(strPart.substring(start + 1, end))\n )\n );\n continue;\n }\n\n listBuilder.add(\n new JsonObjectPathSpecImpl(\n strPart\n )\n );\n }\n return new JsonPathImpl(\n listBuilder.build()\n );\n }\n\n static void main(String[] asdf) {\n\n String[] ss = {};\n JsonPath parse = JsonPath.parse(\"departments[0].department.department.employee.departments[0].name\");\n System.out.println(\"path: [\" + parse + \"] size: \" + parse.size());\n }\n}",
"public boolean isEmpty()\r\n {\r\n return root == null;\r\n }",
"@Test\n public void test8() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.toString();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"public void testIsEmpty() {\r\n assertTrue(tree.isEmpty());\r\n tree.insert(\"apple\");\r\n assertFalse(tree.isEmpty());\r\n }",
"boolean isEmpty(){\n return root == null;\n }",
"@Override\n\tpublic String getRealPath(String arg0) {\n\t\treturn null;\n\t}",
"protected static String getObjectPath(URI resource) {\n String objectPath = resource.getPath().isEmpty() ? \"/\" : resource.getPath();\n return String.format(\"%s%s\", resource.getAuthority(),\n objectPath.charAt(0) == '/' ? objectPath : \"/\" + objectPath);\n }",
"public void setAsEmpty(){\n\t\tnodeStatus = Status.empty;\n\t\tunitNum=-1;\n\t}",
"boolean getRecursiveNull();",
"public String toString() { return root == null ? \"nil\" : root.toString(); }",
"@Test\n\tpublic void takingNullNodeTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeNode(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}",
"@Override\n\tpublic Object visit(ASTCondEmpty node, Object data) {\n\t\tSystem.out.print(\"empty (\");\n\t\tnode.jjtGetChild(0).jjtAccept(this, data);\n\t\tSystem.out.print(\")\");\n\t\treturn null;\n\t}",
"void startVisitingObject(Object node);",
"@Test\n public void test7() throws Throwable {\n DefaultMenuItem defaultMenuItem0 = new DefaultMenuItem((Object) null);\n defaultMenuItem0.getParent();\n assertEquals(true, defaultMenuItem0.isLeaf());\n }",
"public boolean isEmpty() {\n\t\treturn root == null;\n\t}"
] | [
"0.6478406",
"0.60627204",
"0.6040414",
"0.59772",
"0.58936",
"0.5740941",
"0.5693909",
"0.56832784",
"0.56765443",
"0.56354547",
"0.55835015",
"0.5574747",
"0.5561825",
"0.55591387",
"0.55580527",
"0.55414355",
"0.553356",
"0.5525713",
"0.54929155",
"0.5473387",
"0.54647267",
"0.5463061",
"0.54484075",
"0.5447883",
"0.5428939",
"0.5406127",
"0.5403154",
"0.539078",
"0.5373577",
"0.5369433",
"0.53467715",
"0.5337249",
"0.53318405",
"0.5329603",
"0.53231806",
"0.53221214",
"0.53119606",
"0.53066397",
"0.53045833",
"0.5296669",
"0.52812004",
"0.52713436",
"0.5267163",
"0.52669483",
"0.5250735",
"0.5233851",
"0.5233851",
"0.5231463",
"0.5227117",
"0.52161914",
"0.5212646",
"0.52122617",
"0.5211517",
"0.5211517",
"0.5205356",
"0.5204119",
"0.52039164",
"0.51988417",
"0.5196145",
"0.519115",
"0.5180435",
"0.51773936",
"0.51773936",
"0.5170807",
"0.51468974",
"0.5139097",
"0.51341546",
"0.51331186",
"0.5128595",
"0.512394",
"0.5119998",
"0.5119525",
"0.5114543",
"0.5109448",
"0.50993866",
"0.5093916",
"0.5089297",
"0.5081968",
"0.5081556",
"0.5081554",
"0.5081145",
"0.5078353",
"0.50765413",
"0.5075171",
"0.5074447",
"0.50727195",
"0.5068305",
"0.5065698",
"0.5064534",
"0.5064384",
"0.50617814",
"0.5056442",
"0.5049029",
"0.5043184",
"0.50423473",
"0.50361705",
"0.50285757",
"0.5028162",
"0.5019302",
"0.5018173",
"0.5016111"
] | 0.0 | -1 |
Similar logic to "_withObject()" but the default implementation used for noncontainer behavior so it'll simply return `null` | protected ArrayNode _withArray(JsonPointer origPtr,
JsonPointer currentPtr,
OverwriteMode overwriteMode, boolean preferIndex)
{
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T caseContainer(Container object) {\n\t\treturn null;\n\t}",
"@Override\n public Object getObject()\n {\n return null;\n }",
"public T caseGraphicalContainer(GraphicalContainer object) {\n\t\treturn null;\n\t}",
"public T caseNotExists(NotExists object) {\n\t\treturn null;\n\t}",
"public T caseMappingContainer(MappingContainer object) {\n\t\treturn null;\n\t}",
"protected ObjectNode _withObject(JsonPointer origPtr,\n JsonPointer currentPtr,\n OverwriteMode overwriteMode, boolean preferIndex)\n {\n return null;\n }",
"public T caseContainable(Containable object) {\n\t\treturn null;\n\t}",
"public Object getObject() {\n return getObject(null);\n }",
"public T caseAnnotationContainer(AnnotationContainer object)\n {\n return null;\n }",
"protected abstract Object convertNonNull(Object o);",
"protected <T> T emptyToNull(T obj) {\r\n if (isEmpty(obj)) {\r\n return null;\r\n } else {\r\n return obj;\r\n }\r\n }",
"public T caseRef(Ref object) {\r\n\t\treturn null;\r\n\t}",
"public T caseExists(Exists object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T merge(T obj) throws Exception {\n\t\treturn null;\n\t}",
"public T caseSimple(Simple object) {\n\t\treturn null;\n\t}",
"public User orElseThrow(Object object) {\n\t\treturn null;\n\t}",
"public Optional<T> create(T obj) {\n\t\tif (null == obj) {\n\t\t\treturn Optional.empty();\n\t\t}\n\n\t\t// if Object has an id\n\t\tif (null != obj.getId()) {\n\n\t\t\t// return value if key already exists, otherwise empty\n\t\t\tif (map.containsKey(obj.getId())) {\n\t\t\t\treturn Optional.of(map.get(obj.getId()));\n\t\t\t} else {\n\t\t\t\treturn Optional.empty();\n\t\t\t}\n\n\t\t}\n\n\t\t// generate id\n\t\tint aId = id.getAndIncrement();\n\n\t\tobj.setId(aId);\n\t\tmap.put(aId, obj);\n\n\t\treturn Optional.of(obj);\n\n\t}",
"public T caseIdentifiedObject(IdentifiedObject object) {\n\t\treturn null;\n\t}",
"public T caseScopedElement(ScopedElement object) {\r\n\t\treturn null;\r\n\t}",
"public default T unwrap( Tagged<T> obj ){ return obj.unwrap(); }",
"public T caseReUseAble(ReUseAble object) {\r\n\t\treturn null;\r\n\t}",
"Builder customObject(Object object) {\n customObjects\n .ifPresentOrElse(store -> store.putInstance(object), () -> {\n ClassToInstanceStore<Object> ctis = new ClassToInstanceStore<>();\n ctis.putInstance(object);\n customObjects = Optional.of(ctis);\n });\n\n return this;\n }",
"@Override\n\tpublic NativeObject javaMethodBaseWithObjectRet() {\n\t\treturn null;\n\t}",
"public T caseBox(Box object) {\r\n\t\treturn null;\r\n\t}",
"public T caseRoot(Root object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Object getObject(Object key) {\n\t\treturn null;\r\n\t}",
"public T caseRegistry(Registry object) {\n\t\treturn null;\n\t}",
"public abstract Object getUnderlyingObject();",
"public T caseExistence(Existence object) {\n\t\treturn null;\n\t}",
"ObjectValue createObjectValue();",
"public Object getObject();",
"public T caseReuse(Reuse object) {\r\n\t\treturn null;\r\n\t}",
"public T caseDiv(Div object)\n {\n return null;\n }",
"Object getObject();",
"Object getObject();",
"Object getObject();",
"Object getObject();",
"public T getObject()\n\t{\n\t\treturn object;\n\t}",
"public Object obj()\n\t{\n\t\treturn object;\n\t}",
"public T defaultCase(EObject object) {\r\n\t\treturn null;\r\n\t}",
"public T get() {\n return object;\n }",
"@Override\r\n public T defaultCase(EObject object)\r\n {\r\n return null;\r\n }",
"@Override\r\n public T defaultCase(EObject object)\r\n {\r\n return null;\r\n }",
"ObjectLiteral createObjectLiteral();",
"public T caseHasOther(HasOther object) {\n\t\treturn null;\n\t}",
"@NotNull\r\n Meta wrap(Object o);",
"@Override\r\n\tpublic T defaultCase(EObject object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic T defaultCase(EObject object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic T defaultCase(EObject object) {\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic T defaultCase(EObject object) {\r\n\t\treturn null;\r\n\t}",
"public T caseElement(Element object)\n {\n return null;\n }",
"public void add(RealObject o) throws NullPointerException;",
"public T defaultCase(EObject object)\n {\n return null;\n }",
"public T defaultCase(EObject object)\n {\n return null;\n }",
"public Object getObject() ;",
"public T caseItem(Item object) {\n\t\treturn null;\n\t}",
"public default Tagged<T> wrap( T object ){\n\t\treturn new Tagged<T>(object);\n\t}",
"public T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"public T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"public T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"public T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"public T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"public T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"public T caseHole(Hole object)\n {\n return null;\n }",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public Object attach(Object object)\n{\n\treturn object;\n}",
"public T caseEpk(Epk object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object)\n\t{\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic Ngo insert(Ngo obj) {\n\t\treturn null;\r\n\t}",
"public T caseEquipmentContainer(EquipmentContainer object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T defaultCase(EObject object) {\n\t\treturn null;\n\t}",
"@Override\n public T defaultCase(EObject object)\n {\n return null;\n }",
"@Override\n public T defaultCase(EObject object)\n {\n return null;\n }",
"@Override\n public T defaultCase(EObject object)\n {\n return null;\n }",
"@Override\n public T defaultCase(EObject object)\n {\n return null;\n }",
"@Override\n public T defaultCase(EObject object)\n {\n return null;\n }",
"@Override\n public T defaultCase(EObject object)\n {\n return null;\n }",
"public T caseMeta(Meta object) {\n\t\treturn null;\n\t}",
"public T caseMeta(Meta object) {\n\t\treturn null;\n\t}",
"public static <T> T m23272a(T t, Object obj) {\n if (t != null) {\n return t;\n }\n throw new NullPointerException(String.valueOf(obj));\n }",
"public T caseConnectivityNodeContainer(ConnectivityNodeContainer object) {\n\t\treturn null;\n\t}",
"public T caseReUsableRef(ReUsableRef object) {\r\n\t\treturn null;\r\n\t}",
"public T caseAddTo(AddTo object) {\r\n\t\treturn null;\r\n\t}",
"public T caseGraphicalElement(GraphicalElement object) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic T get(String obj) {\n\t\treturn null;\n\t}"
] | [
"0.6561908",
"0.63076836",
"0.629413",
"0.62147135",
"0.6041468",
"0.5995894",
"0.59780717",
"0.59335226",
"0.593179",
"0.58973294",
"0.58672297",
"0.58557504",
"0.5853042",
"0.5834305",
"0.58342224",
"0.5825293",
"0.5819409",
"0.5771858",
"0.57700044",
"0.5738513",
"0.5722477",
"0.5722175",
"0.57112795",
"0.57092965",
"0.5699433",
"0.56979465",
"0.5695314",
"0.5688625",
"0.56710714",
"0.56703573",
"0.5660897",
"0.5655356",
"0.5655337",
"0.56539524",
"0.56539524",
"0.56539524",
"0.56539524",
"0.56499374",
"0.56385654",
"0.56296164",
"0.56200314",
"0.5619068",
"0.5619068",
"0.56146806",
"0.56145144",
"0.56125003",
"0.56110966",
"0.56110966",
"0.56110966",
"0.56110966",
"0.5601089",
"0.5600253",
"0.5597492",
"0.5597492",
"0.5597471",
"0.55898994",
"0.5587251",
"0.558534",
"0.558534",
"0.558534",
"0.558534",
"0.558534",
"0.558534",
"0.55843717",
"0.5582909",
"0.5582909",
"0.5582909",
"0.55819494",
"0.55683106",
"0.55648565",
"0.556188",
"0.5554703",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55421025",
"0.55403125",
"0.55403125",
"0.55403125",
"0.55403125",
"0.55403125",
"0.55403125",
"0.55238396",
"0.55238396",
"0.552315",
"0.5520779",
"0.5516261",
"0.5516054",
"0.5501905",
"0.54981387"
] | 0.0 | -1 |
/ / JacksonSerializable Method called to serialize node instances using given generator. | @Override
public abstract void serialize(JsonGenerator jgen, SerializerProvider ctxt)
throws JacksonException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\tserializeInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"protected void writePrefix(JsonGenerator generator, Object object)\n/* */ throws IOException\n/* */ {}",
"public void serialize(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartArray();\n\t\tfor (TData item0 : this.data) {\n\t\t\tJsonpUtils.serialize(item0, generator, tDataSerializer, mapper);\n\n\t\t}\n\t\tgenerator.writeEnd();\n\n\t}",
"protected JsonGenerator _createGenerator(Writer out, IOContext ctxt)\n/* */ throws IOException\n/* */ {\n/* 1361 */ WriterBasedJsonGenerator gen = new WriterBasedJsonGenerator(ctxt, this._generatorFeatures, this._objectCodec, out);\n/* */ \n/* 1363 */ if (this._characterEscapes != null) {\n/* 1364 */ gen.setCharacterEscapes(this._characterEscapes);\n/* */ }\n/* 1366 */ SerializableString rootSep = this._rootValueSeparator;\n/* 1367 */ if (rootSep != DEFAULT_ROOT_VALUE_SEPARATOR) {\n/* 1368 */ gen.setRootValueSeparator(rootSep);\n/* */ }\n/* 1370 */ return gen;\n/* */ }",
"void serialize(OutputStream output, Object graph);",
"private void doSerialize(T value, JsonGenerator generator, SerializerProvider provider, TypeSerializer typeSerializer) throws IOException {\n JsonFactory factory = generator.getCodec().getFactory();\n ByteArrayOutputStream buffer = new ByteArrayOutputStream(4096);\n JsonGenerator bufferGenerator = factory.createGenerator(buffer);\n try {\n if (typeSerializer != null)\n delegate.serializeWithType(value, bufferGenerator, provider, typeSerializer);\n else\n delegate.serialize(value, bufferGenerator, provider);\n } finally {\n bufferGenerator.close();\n }\n\n ObjectNode modelData = factory.createParser(buffer.toByteArray()).readValueAsTree();\n\n V targetVersion = versionResolutionStrategy.getSerializeToVersion(modelData);\n if (targetVersion == null) {\n targetVersion = versionsDescription.getCurrentVersion();\n }\n\n VersionConverter<V> converter = versionedConverterRepository.get((Class) jsonVersioned.converterClass());\n if (converter != null && targetVersion.compareTo(versionsDescription.getCurrentVersion()) < 0) {\n converter.convertDown(modelData, versionsDescription.getCurrentVersion(), targetVersion, JsonNodeFactory.instance);\n }\n\n // write node\n generator.writeTree(modelData);\n }",
"public JsonGenerator createGenerator(OutputStream out)\n/* */ throws IOException\n/* */ {\n/* 1110 */ return createGenerator(out, JsonEncoding.UTF8);\n/* */ }",
"protected void writeSuffix(JsonGenerator generator, Object object)\n/* */ throws IOException\n/* */ {}",
"public void serialize(Object value, JsonGenerator jsonGenerator,\n\t\t\tSerializerProvider serializerProvider) throws IOException,\n\t\t\tJsonProcessingException {\n\t\tif (value != null) {\n\t\t\tjsonGenerator.writeString(value.toString());\n\t\t}\n\t}",
"protected abstract void serializeNodeBody(final Sequence result, final HttpResponse response, final Map<SerializationProperty, String> serializationProperties) throws RestXqServiceException;",
"@Override\n public String toString() {\n return InternalNodeSerializer.toString(this);\n }",
"@Override\n public void serialize(final MastershipData mastershipData,\n final JsonGenerator jsonGenerator,\n final SerializerProvider serializerProvider)\n throws IOException {\n\n //\n // TODO: For now, the JSON format of the serialized output should\n // be same as the JSON format of the corresponding class Mastership\n // (if such class exists).\n // In the future, we will use a single serializer.\n //\n\n jsonGenerator.writeStartObject();\n jsonGenerator.writeStringField(TopologyElement.TYPE, mastershipData.getType());\n jsonGenerator.writeStringField(\"dpid\",\n mastershipData.getDpid().toString());\n jsonGenerator.writeStringField(\"onosInstanceId\",\n mastershipData.getOnosInstanceId().toString());\n jsonGenerator.writeStringField(\"role\",\n mastershipData.getRole().name());\n jsonGenerator.writeObjectFieldStart(\"stringAttributes\");\n for (Entry<String, String> entry : mastershipData.getAllStringAttributes().entrySet()) {\n jsonGenerator.writeStringField(entry.getKey(), entry.getValue());\n }\n jsonGenerator.writeEndObject(); // stringAttributes\n jsonGenerator.writeEndObject();\n }",
"@Deprecated\n/* */ public JsonGenerator createJsonGenerator(OutputStream out)\n/* */ throws IOException\n/* */ {\n/* 1247 */ return createGenerator(out, JsonEncoding.UTF8);\n/* */ }",
"public JsonGenerator createGenerator(DataOutput out)\n/* */ throws IOException\n/* */ {\n/* 1181 */ return createGenerator(_createDataOutputWrapper(out), JsonEncoding.UTF8);\n/* */ }",
"@Deprecated\n/* */ public JsonGenerator createJsonGenerator(OutputStream out, JsonEncoding enc)\n/* */ throws IOException\n/* */ {\n/* 1214 */ return createGenerator(out, enc);\n/* */ }",
"@Override\n public void serialize(MyDoctor doctor, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException, JsonProcessingException {\n jsonGenerator.writeStartObject();\n jsonGenerator.writeStringField(\"id\", doctor.getId());\n jsonGenerator.writeStringField(\"lastName\", doctor.getLastName());\n jsonGenerator.writeStringField(\"firstName\", doctor.getFirstName());\n jsonGenerator.writeStringField(\"speciality\", doctor.getSpeciality());\n jsonGenerator.writeStringField(\"address\", doctor.getAddress());\n jsonGenerator.writeNumberField(\"morningStartHour\", doctor.getMorningStartHour());\n jsonGenerator.writeNumberField(\"morningEndHour\", doctor.getMorningEndHour());\n jsonGenerator.writeNumberField(\"afternoonStartHour\", doctor.getAfternoonStartHour());\n jsonGenerator.writeNumberField(\"afternoonEndHour\", doctor.getAfternoonEndHour());\n jsonGenerator.writeNumberField(\"appointmentLast\", doctor.getAppointmentLast());\n jsonGenerator.writeEndObject();\n }",
"@Override\n public void serializeAsElement(Object object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws Exception {\n JsonSerializer<Object> jsonSerializer;\n Object object2 = this._accessorMethod == null ? this._field.get(object) : this._accessorMethod.invoke(object, new Object[0]);\n if (object2 == null) {\n if (this._nullSerializer == null) {\n jsonGenerator.writeNull();\n return;\n }\n this._nullSerializer.serialize(null, jsonGenerator, serializerProvider);\n return;\n }\n JsonSerializer<Object> jsonSerializer2 = jsonSerializer = this._serializer;\n if (jsonSerializer == null) {\n Class class_ = object2.getClass();\n PropertySerializerMap propertySerializerMap = this._dynamicSerializers;\n jsonSerializer2 = jsonSerializer = propertySerializerMap.serializerFor(class_);\n if (jsonSerializer == null) {\n jsonSerializer2 = this._findAndAddDynamic(propertySerializerMap, class_, serializerProvider);\n }\n }\n if (this._suppressableValue != null) {\n if (MARKER_FOR_EMPTY == this._suppressableValue) {\n if (jsonSerializer2.isEmpty(object2)) {\n this.serializeAsPlaceholder(object, jsonGenerator, serializerProvider);\n return;\n }\n } else if (this._suppressableValue.equals(object2)) {\n this.serializeAsPlaceholder(object, jsonGenerator, serializerProvider);\n return;\n }\n }\n if (object2 == object && this._handleSelfReference(object, jsonGenerator, serializerProvider, jsonSerializer2)) return;\n {\n if (this._typeSerializer == null) {\n jsonSerializer2.serialize(object2, jsonGenerator, serializerProvider);\n return;\n }\n }\n jsonSerializer2.serializeWithType(object2, jsonGenerator, serializerProvider, this._typeSerializer);\n }",
"public static void writeObject(JsonGenerator jsonGenerator, Object object) throws IOException {\n\n if (object == null) {\n jsonGenerator.writeNull();\n return;\n }\n\n if (object instanceof String) {\n jsonGenerator.writeString((String) object);\n return;\n }\n\n if (object instanceof Short) {\n jsonGenerator.writeNumber((Short) object);\n return;\n }\n\n if (object instanceof Integer) {\n jsonGenerator.writeNumber((Integer) object);\n return;\n }\n\n if (object instanceof Long) {\n jsonGenerator.writeNumber((Long) object);\n return;\n }\n\n if (object instanceof BigDecimal) {\n jsonGenerator.writeNumber((BigDecimal) object);\n return;\n }\n\n if (object instanceof Float) {\n jsonGenerator.writeNumber((Float) object); // Not GC-free!\n return;\n }\n\n if (object instanceof Double) {\n jsonGenerator.writeNumber((Double) object); // Not GC-free!\n return;\n }\n\n if (object instanceof byte[]) {\n jsonGenerator.writeBinary((byte[]) object);\n return;\n }\n\n jsonGenerator.writeObject(object);\n\n }",
"@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}",
"@Deprecated\n/* */ public JsonGenerator createJsonGenerator(Writer out)\n/* */ throws IOException\n/* */ {\n/* 1234 */ return createGenerator(out);\n/* */ }",
"public JsonGenerator createGenerator(DataOutput out, JsonEncoding enc)\n/* */ throws IOException\n/* */ {\n/* 1169 */ return createGenerator(_createDataOutputWrapper(out), enc);\n/* */ }",
"@Override\n public void serialize( SecurityIdentifier value, JsonGenerator gen, SerializerProvider serializers )\n throws IOException, JsonProcessingException {\n gen.writeString( value.toString() );\n }",
"@Override\r\n\tpublic void serializar() {\n\r\n\t}",
"public void example2(OutputStream out) {\r\n \r\n Json.createGenerator(out)\r\n .writeStartObject()\r\n .write(\"firstName\", \"John\")\r\n .write(\"lastName\", \"Smith\")\r\n .write(\"age\", 28)\r\n .writeStartArray(\"phoneNumber\")\r\n .writeStartObject()\r\n .write(\"type\", \"home\")\r\n .write(\"number\", \"212 555-1234\")\r\n .writeEnd()\r\n .writeStartObject()\r\n .write(\"type\", \"fax\")\r\n .write(\"number\", \"646 555-4567\")\r\n .writeEnd()\r\n .writeEnd()\r\n .writeEnd()\r\n .close();\r\n }",
"public JsonElement serialize(NodeCollection nodeCollection, Type type,\n JsonSerializationContext jsonSerializationContext) {\n final Gson nodeBuilder = new GsonBuilder()\n .registerTypeAdapter(Segment.class, new NodeSerializer())\n .registerTypeAdapter(Bubble.class, new NodeSerializer()).create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"status\", new JsonPrimitive(\"success\"));\n JsonArray nodes = new JsonArray();\n nodeCollection.values().stream()\n .map(nodeBuilder::toJsonTree)\n .forEach(nodes::add);\n jsonObject.add(\"nodes\", nodes);\n List<JsonObject> edges = new ArrayList<>();\n for (Node node : nodeCollection.values()) {\n for (Node link : node.getLinks()) {\n JsonObject edge = new JsonObject();\n edge.add(\"x1\", new JsonPrimitive(node.getX()));\n edge.add(\"y1\", new JsonPrimitive(node.getY()));\n edge.add(\"x2\", new JsonPrimitive(link.getX()));\n edge.add(\"y2\", new JsonPrimitive(link.getY()));\n List<Subject> subjects = new ArrayList<>(node.getSubjects());\n subjects.retainAll(link.getSubjects());\n edge.add(\"gens\", new JsonPrimitive(subjects.size()));\n JsonArray jsonGenomes = new JsonArray();\n subjects.stream().map(Subject::getNameId).distinct().forEach(jsonGenomes::add);\n edge.add(\"genomes\", jsonGenomes);\n JsonArray jsonLineages = new JsonArray();\n subjects.stream().map(Subject::getLineage).distinct().forEach(jsonLineages::add);\n edge.add(\"lineages\", jsonLineages);\n edges.add(edge);\n }\n }\n Collections.sort(edges, (t1, t2) -> Integer.compare(t1.get(\"gens\").getAsInt(),\n t2.get(\"gens\").getAsInt()));\n JsonArray jsonArray = new JsonArray();\n edges.stream().forEach(jsonArray::add);\n jsonObject.add(\"edges\", jsonArray);\n return jsonObject;\n }",
"Object writeReplace() {\n return NodeSerialization.from(this);\n }",
"public void example3(OutputStream out) {\r\n \r\n Json.createGenerator(out)\r\n .writeStartObject()\r\n .write(\"firstName\", \"John\")\r\n .write(\"lastName\", \"Smith\")\r\n .write(\"age\", 28)\r\n .writeStartObject(\"address\")\r\n .write(\"streetAddress\", \"21 2nd Street\")\r\n .write(\"city\", \"New York\")\r\n .write(\"state\", \"NY\")\r\n .write(\"postalCode\", \"10021\")\r\n .writeEnd()\r\n .writeStartArray(\"phoneNumber\")\r\n .writeStartObject()\r\n .write(\"type\", \"home\")\r\n .write(\"number\", \"212 555-1234\")\r\n .writeEnd()\r\n .writeStartObject()\r\n .write(\"type\", \"fax\")\r\n .write(\"number\", \"646 555-4567\")\r\n .writeEnd()\r\n .writeEnd()\r\n .writeEnd()\r\n .close();\r\n }",
"@Override\r\n\tpublic void serialize(Articles articles, JsonGenerator writer,\r\n\t\t\tSerializerProvider provider) throws IOException,\r\n\t\t\tJsonProcessingException {\n\t\twriter.writeStartObject();\r\n writer.writeFieldName(\"articles\");\r\n writer.writeStartArray();\r\n for (ArticleItem item : articles)\r\n {\r\n writer.writeStartObject();\r\n writer.writeStringField(\"title\", item.getTitle());\r\n writer.writeStringField(\"description\", item.getDescription());\r\n writer.writeStringField(\"url\", item.getUrl());\r\n writer.writeStringField(\"picurl\", item.getPicUrl());\r\n writer.writeEndObject();\r\n }\r\n writer.writeEndArray();\r\n writer.writeEndObject();\r\n\t}",
"@Override\n public void serialize(Ingredient value, JsonGenerator gen, SerializerProvider provider) throws IOException {\n gen.writeFieldName(value.getName());\n }",
"public void writeObject( DataOutput out ) throws IOException {\n boolean sgIO = node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO;\n out.writeBoolean( sgIO );\n out.writeInt( symbol.nodeID );\n\n\n int nodeClassID = control.getNodeClassID( node );\n\n out.writeShort( nodeClassID );\n\n if (nodeClassID==-1)\n out.writeUTF( nodeClassName );\n\n writeConstructorParams( out );\n\n if (sgIO) {\n ByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\t DataOutputStream tmpOut = new DataOutputStream( byteStream );\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).writeSceneGraphObject( tmpOut );\n\t tmpOut.close();\n\t out.writeInt( byteStream.size() );\n\t out.write( byteStream.toByteArray() );\n }\n\n writeUserData( out );\n writeString(node.getName(), out);\n\n writeCapabilities( out );\n }",
"public JsonGenerator createGenerator(OutputStream out, JsonEncoding enc)\n/* */ throws IOException\n/* */ {\n/* 1092 */ IOContext ctxt = _createContext(out, false);\n/* 1093 */ ctxt.setEncoding(enc);\n/* 1094 */ if (enc == JsonEncoding.UTF8) {\n/* 1095 */ return _createUTF8Generator(_decorate(out, ctxt), ctxt);\n/* */ }\n/* 1097 */ Writer w = _createWriter(out, enc, ctxt);\n/* 1098 */ return _createGenerator(_decorate(w, ctxt), ctxt);\n/* */ }",
"public interface InstanceSerializer {\n\n /**\n * Serialize instance into the <tt>SerializerWrapperObject</tt>\n *\n * @param submission submission information.\n * @param instance instance to serialize.\n * @param serializerRequestWrapper object to write into.\n * @param defaultEncoding use this encoding in case user did not provide one.\n */\n void serialize(Submission submission, Node instance, SerializerRequestWrapper serializerRequestWrapper, \n String defaultEncoding) throws Exception;\n\n}",
"public WriterBasedJsonGenerator(IOContext ctxt, int features, com.fasterxml.jackson.core.ObjectCodec codec, Writer w)\n/* */ {\n/* 87 */ super(ctxt, features, codec);\n/* 88 */ this._writer = w;\n/* 89 */ this._outputBuffer = ctxt.allocConcatBuffer();\n/* 90 */ this._outputEnd = this._outputBuffer.length;\n/* */ }",
"void writeObject(OutputSerializer out) throws java.io.IOException;",
"public void serialize() {\n\t\t\n\t}",
"public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}",
"@Override\n public abstract void serializeWithType(JsonGenerator jgen, SerializerProvider ctxt,\n TypeSerializer typeSer)\n throws JacksonException;",
"public void serialize( final SerializerOutputStream out )\n throws SerializationException\n {\n out.writeByte( (byte) 1 ); // version\n out.writeString( name );\n if( properties != null && properties.size() > 0 )\n {\n out.writeInt( properties.size() );\n for( final Enumeration i = properties.keys(); i.hasMoreElements(); )\n {\n final String name = (String) i.nextElement();\n final ScriptingClass clazz = (ScriptingClass)\n properties.get( name );\n out.writeString( name );\n out.writeString( clazz.getName() );\n }\n }\n else\n {\n out.writeInt( 0 );\n }\n if( methods != null && methods.size() > 0 )\n {\n out.writeInt( methods.size() );\n for( final Enumeration i = methods.keys(); i.hasMoreElements(); )\n {\n final String name = (String) i.nextElement();\n final Method method = (Method) methods.get( name );\n out.writeString( name );\n method.serialize( out );\n }\n }\n else\n {\n out.writeInt( 0 );\n }\n if( ancestors != null && ancestors.size() > 0 )\n {\n final int size = ancestors.size();\n out.writeInt( size );\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n out.writeString( clazz.getName() );\n }\n }\n else\n {\n out.writeInt( 0 );\n }\n }",
"public void toJsonp(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\ttoJsonpInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void toJsonp(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\ttoJsonpInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void toJsonp(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\ttoJsonpInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"public void toJsonp(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartObject();\n\t\ttoJsonpInternal(generator, mapper);\n\t\tgenerator.writeEnd();\n\t}",
"void serialize(Submission submission, Node instance, SerializerRequestWrapper serializerRequestWrapper, \n String defaultEncoding) throws Exception;",
"@Override\n public void serializeObject(Object o, int hashCode, String destDir) {\n // throw new NotImplementedException();\n }",
"public void example1(OutputStream out) {\r\n \r\n Json.createGenerator(out)\r\n .writeStartObject()\r\n .write(\"firstName\", \"John\")\r\n .write(\"lastName\", \"Smith\")\r\n .write(\"age\", 25)\r\n .writeEnd()\r\n .close();\r\n }",
"protected JsonGenerator _createUTF8Generator(OutputStream out, IOContext ctxt)\n/* */ throws IOException\n/* */ {\n/* 1384 */ UTF8JsonGenerator gen = new UTF8JsonGenerator(ctxt, this._generatorFeatures, this._objectCodec, out);\n/* */ \n/* 1386 */ if (this._characterEscapes != null) {\n/* 1387 */ gen.setCharacterEscapes(this._characterEscapes);\n/* */ }\n/* 1389 */ SerializableString rootSep = this._rootValueSeparator;\n/* 1390 */ if (rootSep != DEFAULT_ROOT_VALUE_SEPARATOR) {\n/* 1391 */ gen.setRootValueSeparator(rootSep);\n/* */ }\n/* 1393 */ return gen;\n/* */ }",
"public abstract JsonElement serialize();",
"private void writeObject (ObjectOutputStream out) throws IOException {\n\t\tout.writeInt (CURRENT_SERIAL_VERSION);\n\t\tout.writeObject(inputPipe);\n\t\tout.writeObject(outputPipe);\n\t\tout.writeObject(sumLatticeFactory);\n\t\tout.writeObject(maxLatticeFactory);\n\t}",
"public void toJsonp(JsonGenerator generator, JsonpMapper mapper) {\n\t\tgenerator.writeStartArray();\n\t\tfor (TemplateItem item0 : this.value) {\n\t\t\titem0.toJsonp(generator, mapper);\n\n\t\t}\n\t\tgenerator.writeEnd();\n\n\t}",
"public void serializeClosure(OWLGraphWrapper g) throws IOException {\n\t\tObjectOutputStream out = new ObjectOutputStream(stream);\n\t\tfor (OWLObject obj : g.getAllOWLObjects()) {\n\t\t\tg.getOutgoingEdgesClosure(obj);\n\t\t}\n\t\tout.writeObject(g.inferredEdgeBySource);\n\t}",
"protected void writeCodeGenMarker(Class<? extends SourceGenerator> generator) {\n\t\tm_writer.append(\"@\")\r\n\t\t.append(IClassR.CodeGen)\r\n\t\t.append(\"(\\\"\")\r\n\t\t.append(generator.getSimpleName())\r\n\t\t.append(\"\\\")\");\r\n\t}",
"private JsonWriter(JsonGenerator jgen, JsonView result, Match currentMatch,\n String currentPath, Stack<String> path, JsonViewSerializer.AccessibleProperty referringField, SerializerProvider serializerProvider) {\n this.jgen = jgen;\n this.result = result;\n this.currentMatch = currentMatch;\n this.currentPath = currentPath;\n this.referringField = referringField;\n this.path = path;\n this.serializerProvider = serializerProvider;\n }",
"@Override\n public void serialize(DateTime value, JsonGenerator gen, SerializerProvider arg2)\n throws IOException, JsonProcessingException {\n \t\n \tif ( value != null ){\n \t\tgen.writeNumber( value.toDate().getTime() );\n \t}else {\n \t\tgen.writeNumber( 0L );\t\n \t}\n }",
"private JsonNode toJson() {\n ObjectMapper mapper = new ObjectMapper();\n ObjectNode root = mapper.createObjectNode();\n root.put(\"packages\", jsonPackages(mapper));\n root.put(\"cycleSegments\", jsonCycleSegments(mapper, catalog.getCycleSegments()));\n root.put(\"summary\", jsonSummary(mapper));\n return root;\n }",
"private void writeContext(final JsonGenerator generator) throws IOException {\n Map<String, String> context = GecContext.get();\n if (!context.isEmpty()) {\n generator.writeFieldName(\"context\");\n generator.writeStartObject();\n for (Map.Entry<String, String> entry : context.entrySet()) {\n generator.writeStringField(entry.getKey(), entry.getValue());\n }\n generator.writeEndObject();\n }\n }",
"public String toString() {\n StringBuilder s = new StringBuilder(\"{\");\n\n Node<T> next;\n if (start != null) {\n next = start;\n s.append(next);\n next = next.next;\n while (next != null) {\n s.append(\", \" + next);\n next = next.next;\n }\n }\n s.append(\"}\");\n return s.toString();\n }",
"@Override\n\tpublic void generate() {\n\t\tJavaObject object = new JavaObject(objectType);\n\n\t\t// Fields\n\t\taddFields(object);\n\n\t\t// Empty constructor\n\t\taddEmptyConstructor(object);\n\n\t\t// Types constructor\n\t\taddTypesConstructor(object);\n\n\t\t// Clone constructor\n\t\taddCloneConstructor(object);\n\n\t\t// Setters\n\t\taddSetters(object);\n\n\t\t// Build!\n\t\taddBuild(object);\n\n\t\t// Done!\n\t\twrite(object);\n\t}",
"public boolean registerNode(Node node, OutputStream out, boolean isRequestedRegistration) throws IOException;",
"@Override\n\tpublic JsonElement serialize(BigInteger src, Type typeOfSrc, JsonSerializationContext context) {\n\t\t return new JsonPrimitive(src.toString());\n\t}",
"@Override\n public void write(JsonGenerator writer, Document source) {\n\n List<?> trainNumbers = source.get(TRAIN_NUMBERS, List.class);\n writeArray(writer, TRAIN_NUMBERS, trainNumbers,\n t -> writeObject(writer, t, trainNumber -> writeField(writer, TRAIN_NUMBER_REF, (String) trainNumber)));\n\n // set journeyParts\n List<?> journeyParts = source.get(JOURNEY_PARTS, List.class);\n writeArray(writer, JOURNEY_PARTS, journeyParts, t -> writeObject(writer, t, o -> {\n if (o instanceof Document) {\n Document journeyPart = (Document) o;\n writeStringField(writer, JOURNEY_PART_REF, journeyPart);\n writeStringField(writer, TRAIN_NUMBER_REF, journeyPart);\n }\n }));\n\n }",
"public void writeList(JsonGenerator jsonOut, List<? extends Instance> data) throws IOException {\n\t\tjsonOut.writeStartArray();\n\t\tfor(Instance instance : data) {\n\t\t\tinstanceHandlerDelegate.write(jsonOut, instance);\n\t\t}\n\t\tjsonOut.writeEndArray();\n\t}",
"public JsonGenerator createGenerator(Writer w)\n/* */ throws IOException\n/* */ {\n/* 1129 */ IOContext ctxt = _createContext(w, false);\n/* 1130 */ return _createGenerator(_decorate(w, ctxt), ctxt);\n/* */ }",
"void serialize(OutputStream out) throws IOException {\n trie.serialize(out);\n }",
"@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }",
"public static ObjectNode serializeToJSON(\n final ObjectMapper jom,\n final ReaderBookmarks description) {\n\n NullCheck.notNull(jom, \"Object mapper\");\n NullCheck.notNull(description, \"Description\");\n\n final ObjectNode jo = jom.createObjectNode();\n final ObjectNode by_id = jom.createObjectNode();\n for (final Map.Entry<BookID, ReaderBookLocation> e : description.bookmarks().entrySet()) {\n final BookID book_id = e.getKey();\n final ReaderBookLocation location = e.getValue();\n by_id.set(book_id.value(), ReaderBookLocationJSON.serializeToJSON(jom, location));\n }\n\n jo.set(\"locations-by-book-id\", by_id);\n return jo;\n }",
"public abstract JsonWriter newWriter(OutputStream out);",
"private void writeObject(ObjectOutputStream out) throws IOException {\n Set<PackageIdentifier> successfulPkgs = transitiveSuccessfulPkgs.toSet();\n out.writeInt(successfulPkgs.size());\n for (PackageIdentifier pkg : successfulPkgs) {\n out.writeObject(pkg);\n }\n\n out.writeObject(transitiveUnsuccessfulPkgs);\n // Deliberately do not write out transitiveTargets. There is a lot of those and they drive\n // serialization costs through the roof, both in terms of space and of time.\n // TODO(bazel-team): Deal with this properly once we have efficient serialization of NestedSets.\n out.writeObject(transitiveRootCauses);\n out.writeObject(errorLoadingTarget);\n }",
"@Override\n public void serializeAsField(Object object, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws Exception {\n JsonSerializer<Object> jsonSerializer;\n Object object2 = this._accessorMethod == null ? this._field.get(object) : this._accessorMethod.invoke(object, new Object[0]);\n if (object2 == null) {\n if (this._nullSerializer == null) return;\n {\n jsonGenerator.writeFieldName(this._name);\n this._nullSerializer.serialize(null, jsonGenerator, serializerProvider);\n }\n return;\n }\n JsonSerializer<Object> jsonSerializer2 = jsonSerializer = this._serializer;\n if (jsonSerializer == null) {\n Class class_ = object2.getClass();\n PropertySerializerMap propertySerializerMap = this._dynamicSerializers;\n jsonSerializer2 = jsonSerializer = propertySerializerMap.serializerFor(class_);\n if (jsonSerializer == null) {\n jsonSerializer2 = this._findAndAddDynamic(propertySerializerMap, class_, serializerProvider);\n }\n }\n if (this._suppressableValue != null) {\n if (MARKER_FOR_EMPTY == this._suppressableValue) {\n if (jsonSerializer2.isEmpty(object2)) return;\n } else if (this._suppressableValue.equals(object2)) {\n return;\n }\n }\n if (object2 == object && this._handleSelfReference(object, jsonGenerator, serializerProvider, jsonSerializer2)) return;\n {\n jsonGenerator.writeFieldName(this._name);\n if (this._typeSerializer == null) {\n jsonSerializer2.serialize(object2, jsonGenerator, serializerProvider);\n return;\n }\n }\n jsonSerializer2.serializeWithType(object2, jsonGenerator, serializerProvider, this._typeSerializer);\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-03 14:59:52.264 -0400\", hash_original_method = \"994F669A59E4B3A0EE398298B336F810\", hash_generated_method = \"2BEECC6B96D4108E92CF5063E98986E9\")\n \npublic ProxyOutputStream(OutputStream proxy) {\r\n super(proxy);\r\n // the proxy is stored in a protected superclass variable named 'out'\r\n }",
"public abstract <T> SerializationStream writeObject(T t);",
"@Override\n public void serialize(T value, JsonGenerator gen, SerializerProvider serializers) throws IOException {\n packer.clear();\n packer.packLong(value.id);\n\n MessagePackGenerator mpgen = (MessagePackGenerator) gen;\n mpgen.writeExtensionType(new MessagePackExtensionType(\n NeovimExtensionTypes.getInstance().getTypeIdOf(type),\n packer.toByteArray()\n ));\n }",
"public final void serialize(OutputStream out){\n }",
"public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;",
"@Override\n public void serialize(QuadBackgroundComponent value, JsonGenerator gen, SerializerProvider provider) throws IOException {\n\n gen.writeStartObject();\n gen.writeStringField(\"@class\", \"com.simsilica.lemur.component.QuadBackgroundComponent\");\n gen.writeObjectField(\"color\", value.getColor());\n gen.writeObjectField(\"margin\", value.getMargin());\n gen.writeNumberField(\"zOffset\", value.getZOffset());\n gen.writeBooleanField(\"lit\", value.getMaterial().isLit());\n gen.writeStringField(\"blendMode\", value.getMaterial().getMaterial().getAdditionalRenderState().getBlendMode().toString());\n gen.writeEndObject();\n\n }",
"public Node(){\n outgoing = new ArrayList<>();\n //System.out.println(\"Node created!\");\n }",
"public String genCode() {\n StringBuilder childCode = new StringBuilder();\n for (Node node : this.getChildren()) {\n childCode.append(node.genCode());\n }\n return childCode.toString();\n }",
"public JsonNode toJson() {\r\n return mapper.valueToTree(this);\r\n }",
"ObjectFactoryGenerator objectFactoryGenerator();",
"public void serialize(OutputStream outputStream) throws IOException {\n serializeInternalNode((InternalMNode) this.root, outputStream);\n }",
"public abstract String serialise();",
"void serialize(String fieldName, Object value) throws IOException {\n if (value instanceof Node) {\n serialize(fieldName, singleton((Node)value));\n } else if (value instanceof String) {\n serialize(fieldName, (String)value);\n } else if (value instanceof Boolean) {\n serialize(fieldName, (Boolean)value);\n } else if (value instanceof Integer) {\n serialize(fieldName, (Integer)value);\n } else if (value instanceof Long) {\n serialize(fieldName, (Long)value);\n } else if (value instanceof Float) {\n serialize(fieldName, (Float)value);\n } else if (value instanceof Double) {\n serialize(fieldName, (Double)value);\n } else if (value instanceof List) {\n writeArray(fieldName, (List<String>) value);\n } else {\n throw new IllegalArgumentException(\"Don't know how to serialize \" + value.getClass());\n }\n }",
"public void writeObjectRecurse(ZObjectOutputStream out) throws IOException {\n }",
"@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}",
"@Override\n public final String toString() {\n final StringBuilder nodes = new StringBuilder();\n nodes.append(this.sizeNodes()).append(\" Nodes: {\");\n final StringBuilder edges = new StringBuilder();\n edges.append(this.sizeEdges()).append(\" Edges: {\");\n for (final Node<N> node : this.getNodes()) {\n nodes.append(node.toString()).append(',');\n }\n for (final Edge<N, E> edge : this.getEdges()) {\n edges.append(edge.toString()).append(',');\n }\n final String newLine = System.getProperty(\"line.separator\");\n nodes.append('}').append(newLine).append(edges).append('}').append(newLine);\n return nodes.toString();\n }",
"private static Serializer getSerializer() {\n\t\tConfiguration config = new Configuration();\n\t\tProcessor processor = new Processor(config);\n\t\tSerializer s = processor.newSerializer();\n\t\ts.setOutputProperty(Property.METHOD, \"xml\");\n\t\ts.setOutputProperty(Property.ENCODING, \"utf-8\");\n\t\ts.setOutputProperty(Property.INDENT, \"yes\");\n\t\treturn s;\n\t}",
"void serialize(Object obj, OutputStream stream) throws IOException;",
"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 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 }",
"protected abstract Map<Integer, VersionedSerializer<T>> createVersionedSerializers();",
"@Override\n public Iterator<Node<E>> iterator() {\n return new ArrayList<Node<E>>(graphNodes.values()).iterator();\n }",
"private SortedSet<NodeStation> generateNodeStations() throws GenerationException {\n // create Set of NodeStations\n SortedSet<NodeStation> nodeStations = new TreeSet<>();\n for (ReferenceStation referenceStation : referenceStations) {\n nodeStationGenerator.referenceStation(referenceStation).generate()\n .ifPresent(nodeStations::add);\n }\n return nodeStations;\n }",
"public final void toJSON(final OutputStream out) throws IOException {\n final JsonGenerator jg = JSON_FACTORY.createGenerator(out);\n\n jg.writeStartObject();\n jg.writeFieldName(\"breed\");\n jg.writeStartObject();\n jg.writeStringField(\"fci\", getFci());\n jg.writeStringField(\"bgroup\", getBgroup());\n jg.writeStringField(\"bname\", getBname());\n jg.writeStringField(\"bcount\", getCount());\n jg.writeEndObject();\n jg.writeEndObject();\n jg.flush();\n }"
] | [
"0.6735",
"0.6735",
"0.6735",
"0.6735",
"0.6735",
"0.6735",
"0.6735",
"0.6735",
"0.6735",
"0.60967696",
"0.6057702",
"0.5835663",
"0.581744",
"0.5763962",
"0.5720304",
"0.56443584",
"0.5557583",
"0.5530106",
"0.5507967",
"0.55062956",
"0.5498883",
"0.549824",
"0.5488192",
"0.54448724",
"0.54358727",
"0.54314154",
"0.5402943",
"0.5394319",
"0.5363122",
"0.5324648",
"0.5301239",
"0.52926123",
"0.5279176",
"0.5241394",
"0.5239473",
"0.5230026",
"0.522519",
"0.5210802",
"0.51967937",
"0.5184425",
"0.5179861",
"0.516972",
"0.5161835",
"0.51409394",
"0.5129212",
"0.5108287",
"0.51002985",
"0.51002985",
"0.51002985",
"0.51002985",
"0.50851375",
"0.5083084",
"0.50821644",
"0.507144",
"0.5069054",
"0.5025708",
"0.5022654",
"0.5018301",
"0.4986034",
"0.4983701",
"0.4968454",
"0.4948798",
"0.49417",
"0.491807",
"0.48885292",
"0.48676687",
"0.48570344",
"0.4851455",
"0.4847079",
"0.48456237",
"0.4837551",
"0.48355138",
"0.4830299",
"0.48230875",
"0.4819672",
"0.48119608",
"0.47929117",
"0.47908765",
"0.47753972",
"0.47747916",
"0.4770235",
"0.47627515",
"0.47599027",
"0.47569302",
"0.4754469",
"0.4742958",
"0.47386834",
"0.47329116",
"0.4726994",
"0.47244093",
"0.4714134",
"0.470738",
"0.47047612",
"0.46952635",
"0.468899",
"0.4682943",
"0.46742973",
"0.46648198",
"0.46637025",
"0.46629393"
] | 0.6649352 | 9 |
Type information is needed, even if JsonNode instances are "plain" JSON, since they may be mixed with other types. | @Override
public abstract void serializeWithType(JsonGenerator jgen, SerializerProvider ctxt,
TypeSerializer typeSer)
throws JacksonException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean supportsJsonType() {\n return false;\n }",
"private static JsonNode json2Node(String json) {\n try {\n return mapper.readTree(json);\n } catch (IOException e) {\n throw new IllegalStateException(\"Error mapping JSON: \" + json, e);\n }\n }",
"ValueType getJsonValueType();",
"boolean isAnyTypeReference();",
"public static HateosContentType json(final JsonNodeUnmarshallContext unmarshallContext,\n final JsonNodeMarshallContext marshallContext) {\n return HateosContentTypeJsonNode.with(unmarshallContext,\n marshallContext);\n }",
"short getNodeType(Object node);",
"public abstract boolean isObject(T type);",
"private JsonNode marshall(final JsonNodeMarshallContext context) {\n JsonObject object = JsonNode.object();\n\n final String text = this.text;\n if (null != text) {\n object = object.set(\n TEXT_PROPERTY,\n JsonNode.string(text)\n );\n }\n\n final Optional<SpreadsheetParserToken> token = this.token;\n if (token.isPresent()) {\n object = object.set(TOKEN_PROPERTY, context.marshallWithType(token.get()));\n }\n\n final Optional<Expression> expression = this.expression;\n if (expression.isPresent()) {\n object = object.set(EXPRESSION_PROPERTY, context.marshallWithType(expression.get()));\n }\n\n final Optional<Object> value = this.value;\n if (value.isPresent()) {\n object = object.set(VALUE_PROPERTY, context.marshallWithType(value.get()));\n }\n\n return object;\n }",
"@SuppressWarnings(\"unchecked\")\n @Override\n public <T extends JsonNode> T deepCopy() { return (T) this; }",
"public static void confirmNodeType(JsonNode node, JsonNodeType need_type,\n\t\t\tString node_name, Logger logger) throws JsonFilterException {\n\t\tif (need_type != node.getNodeType()) {\n\t\t\tString err = String.format(\"'%s' must be an %s, it is '%s'\",\n\t\t\t\t\tnode_name, need_type, node.getNodeType());\n\t\t\tif (logger != null) {\n\t\t\t\tlogger.error(err);\n\t\t\t}\n\t\t\tthrow new JsonFilterException(err);\n\t\t}\n\t}",
"void process(JsonNode document);",
"@Override\n public abstract JsonParser.NumberType numberType();",
"@Override\n\tpublic boolean isReadable(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType arg3) {\n\t\treturn arg0 == JSONObject.class && MediaType.APPLICATION_JSON_TYPE.equals(arg3);\n\t}",
"@Override\n\tprotected void preProcessInputData(JsonNode input) {\n\t\t\n\t}",
"private Node loadNode(JsonObject jsonNode) {\n Node returnedNode = null;\r\n\r\n returnedNode = loadStation(jsonNode);\r\n// case JSON_IS_LINE:\r\n// returnedNode = loadLine(jsonNode);\r\n// break;\r\n\r\n\r\n return returnedNode;\r\n }",
"@Override\n public void acceptJsonFormatVisitor(JsonFormatVisitorWrapper visitor, JavaType type) throws JsonMappingException {\n visitor.expectAnyFormat(type);\n }",
"private static <T> T getObjectFromJson(JsonNode dataJson) {\n Object object=null;\n if(!dataJson.has(CLASS_FIELD)) {\n return null;\n }\n /** Determine class of object and return with cast*/\n String classField=dataJson.get(CLASS_FIELD).asText();\n\n /** Lists -> All lists are converted into ArrayLists*/\n if(classField.startsWith(LIST_CLASS)) {\n try {\n String[] listType=classField.split(SEPERATOR);\n if(listType.length<2) {\n return (T) new ArrayList<>();\n }\n Class type=Class.forName(listType[1]);\n String json=dataJson.get(DATA_FIELD).toString();\n List<Object> list=new ArrayList<>();\n ArrayNode array=(ArrayNode) mapper.readTree(json);\n for(JsonNode item : array) {\n Object o=mapper.readValue(item.toString(), type);\n list.add(o);\n }\n return (T) list;\n }\n catch(JsonProcessingException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n /** Single objects*/\n else {\n Class type=null;\n try {\n type=Class.forName(classField);\n /** Read primitive types (String,Integer,...)*/\n if(dataJson.has(PRIMITIVE_FIELD)) {\n object=mapper.readValue(dataJson.get(PRIMITIVE_FIELD).toString(), type);\n }\n else {\n object=mapper.readValue(dataJson.toString(), type);\n }\n return (T) object;\n }\n catch(ClassNotFoundException | JsonProcessingException e) {\n e.printStackTrace();\n }\n }\n return null;\n }",
"public interface JsonConverter {\n\n String toJson(Object o) throws IOException;\n\n String toJsonIgnoreException(Object o);\n\n <T> T fromJson(String json, Class<T> type) throws IOException;\n\n <T> T fromJson(String json, TypeData<T> typeData) throws IOException;\n\n <T> T convert(Object o, TypeData<T> typeData) throws IOException;\n}",
"<T> T parseToObject(Object json, Class<T> classObject);",
"protected Object handleNode(CantoNode node, Object data) {\n //if (!node.isPrimitive()) {\n data = ((AbstractNode) node).childrenAccept(this, data);\n //}\n return data;\n }",
"public interface JsonValue {\n\n /**\n * The enum Value type.\n */\n enum ValueType\n {\n /**\n * Json object value type.\n */\n JSON_OBJECT,\n /**\n * Json array value type.\n */\n JSON_ARRAY,\n /**\n * Json string value type.\n */\n JSON_STRING,\n /**\n * Json number value type.\n */\n JSON_NUMBER,\n /**\n * Json boolean value type.\n */\n JSON_BOOLEAN\n }\n\n /**\n * Gets json value type.\n *\n * @return the json value type\n */\n ValueType getJsonValueType();\n\n}",
"private ObjectNode ProcessObject(RDFNode node){\n if(node.isLiteral()){\n //handle literal\n return TransformUtils.GenerateLiteralJsonObject(mapper, node.asLiteral(), null);\n }\n else {\n //else handle resource\n return ProcessResource(node.asResource());\n }\n }",
"@Override\n\tpublic void visit(JsonExpression arg0) {\n\t\t\n\t}",
"private static String node2Str(JsonNode node) {\n try {\n return jsonWriter.writeValueAsString(node);\n } catch (JsonProcessingException e) {\n throw new IllegalStateException(\"Error writing JsonNode as a String: \" + node.asText(), e);\n }\n }",
"@Test\n public void inlineJsonBlob() throws Exception {\n String jsonText = \"[1, 3, 5, 7]\";\n JsonNode originalNode = DefaultObjectMapper.INSTANCE.readTree(jsonText);\n\n // serialize, which basically just copies the JSON text as is\n String retVal = new SynapseHelper().serializeToSynapseType(MOCK_TEMP_DIR, TEST_PROJECT_ID, TEST_RECORD_ID,\n TEST_FIELD_NAME, UploadFieldTypes.INLINE_JSON_BLOB, originalNode);\n\n // parse back into JSON and compare\n JsonNode reparsedNode = DefaultObjectMapper.INSTANCE.readTree(retVal);\n assertTrue(reparsedNode.isArray());\n assertEquals(reparsedNode.size(), 4);\n assertEquals(reparsedNode.get(0).intValue(), 1);\n assertEquals(reparsedNode.get(1).intValue(), 3);\n assertEquals(reparsedNode.get(2).intValue(), 5);\n assertEquals(reparsedNode.get(3).intValue(), 7);\n }",
"T fromJson(Object source);",
"Class<?> getNodeType() {\n return nodeType;\n }",
"@Override\n public JsonParser.NumberType numberType() {\n // most types non-numeric, so:\n return null;\n }",
"NodeType getType();",
"<T> T fromJson(String source, JavaType type);",
"@Test\n public void testNodeDefault() throws Exception, JSONException {\n WebResource r = resource();\n ClientResponse response = r.path(\"ws\").path(\"v1\").path(\"node\").get(ClientResponse.class);\n Assert.assertEquals((((MediaType.APPLICATION_JSON) + \"; \") + (JettyUtils.UTF_8)), response.getType().toString());\n JSONObject json = response.getEntity(JSONObject.class);\n verifyNodeInfo(json);\n }",
"private JsonNode toJson() {\n ObjectMapper mapper = new ObjectMapper();\n ObjectNode root = mapper.createObjectNode();\n root.put(\"packages\", jsonPackages(mapper));\n root.put(\"cycleSegments\", jsonCycleSegments(mapper, catalog.getCycleSegments()));\n root.put(\"summary\", jsonSummary(mapper));\n return root;\n }",
"@Override\n\tpublic void updateNode(JsonObject jsonData) {\n\t\t\n\t}",
"@Override\n \tpublic Object parseJson(JsonNode jsonNode) {\n \t\tif(jsonNode == null || jsonNode.isNull())\n \t\t\treturn null;\n \t\tList<Object> valList = new ArrayList<Object>();\n \t\t\n \t\tfor(int i=0; i< fieldNames.size(); ++i) {\n \t\t\tString key = fieldNames.get( i);\n \t\t\tif( this.convertFromCamelCase) {\n \t\t\t\tkey = FromJsonUDF.ToCamelCase(key);\n \t\t\t}\n \t\t\tJsonNode valNode = jsonNode.get( key);\n \t\t\tInspectorHandle valHandle = handleList.get(i);\n \t\t\t\n \t\t\tObject valObj = valHandle.parseJson(valNode);\n \t\t\tvalList.add( valObj);\n \t\t}\n \t\t\n \t\treturn valList;\n \t}",
"public abstract AbstractNodeType getType();",
"public JsonNode toJson() {\r\n return mapper.valueToTree(this);\r\n }",
"public JSONNode() {\n map = new HashMap<>();\n }",
"@Override\r\n\tpublic void parseJson(JSONObject json) {\n\t\tif(json == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\ttype = getInt(json,d_type);\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private static Order.OrderType nextNodeAsOrderType(Iterator<JsonNode> iterator) {\n if (iterator == null || !iterator.hasNext()) {\n return null;\n }\n return KrakenAdapters.adaptOrderType(KrakenType.fromString(iterator.next().textValue()));\n }",
"@Override\n\tpublic int getNodeType() {\n\t\treturn nodeType;\n\t}",
"public abstract int getNodeType();",
"public abstract JsonElement serialize();",
"public static JsonNode serialize(final Object dataObject) throws Exception {\n\t\treturn serializeInternal(dataObject, false, false, false, false, new ArrayList<>());\n\t}",
"<T> T fromJson(String json, Class<T> type);",
"@Override\n\tpublic void visit(JsonOperator arg0) {\n\t\t\n\t}",
"@Test\n public void testNodeInfoDefault() throws Exception, JSONException {\n WebResource r = resource();\n ClientResponse response = r.path(\"ws\").path(\"v1\").path(\"node\").path(\"info\").get(ClientResponse.class);\n Assert.assertEquals((((MediaType.APPLICATION_JSON) + \"; \") + (JettyUtils.UTF_8)), response.getType().toString());\n JSONObject json = response.getEntity(JSONObject.class);\n verifyNodeInfo(json);\n }",
"boolean isRootNode(T node, Map<Object, T> nodeMap);",
"public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllContentType_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), CONTENTTYPE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}",
"public interface NodeTypeMatcher {\n /**\n * Determines whether two Nodes are eligible for comparison\n * based on their node type.\n */\n boolean canBeCompared(short controlType, short testType);\n }",
"public JsonNode apply(JsonNode json) {\n DocumentContext doc = ctx.parse(json);\n return doc.read(parsed);\n }",
"@Override\r\n\t\tpublic short getNodeType()\r\n\t\t\t{\n\t\t\t\treturn 0;\r\n\t\t\t}",
"<T> T fromJson(String source, Class<T> type);",
"@Override\n public final JsonNode get(int index) { return null; }",
"public native Object parse( Object json );",
"IJvmTypeReferenceProvider getTypeProvider();",
"public abstract Type treeCopyNoTransform();",
"private Class<?> getType(final Object metadata, final ValueNode node) throws ParseException {\n if (node.type != null) {\n return readType(node);\n }\n Class type;\n if (metadata instanceof ReferenceSystemMetadata || metadata instanceof Period || metadata instanceof AbstractTimePosition || metadata instanceof Instant) {\n final Method getter = ReflectionUtilities.getGetterFromName(node.name, metadata.getClass());\n return getter.getReturnType();\n } else {\n type = standard.asTypeMap(metadata.getClass(), KeyNamePolicy.UML_IDENTIFIER, TypeValuePolicy.ELEMENT_TYPE).get(node.name);\n }\n final Class<?> special = specialized.get(type);\n if (special != null) {\n return special;\n }\n return type;\n }",
"public INodeType getNodeType();",
"@Override\n public boolean isObject() {\n return false;\n }",
"public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllMediaType_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), MEDIATYPE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}",
"@JsonProperty(\"data_type\")\n public Term getDataType() {\n return dataType;\n }",
"public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tobj = jsonMapper.readValue(json, classType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"error mapJsonToObject: \" + e.getMessage());\n\t\t}\n\t\treturn obj;\n\t}",
"@Pure\n\tprotected boolean isTypeReference(JvmTypeReference typeReference) {\n\t\treturn (typeReference != null && !typeReference.eIsProxy()\n\t\t\t&& typeReference.getType() != null && !typeReference.getType().eIsProxy());\n\t}",
"public void setNodeType(String nodeType)\n {\n this.nodeType = nodeType;\n }",
"@JsonProperty(\"nodeType\")\n public NodeRole getNodeRole()\n {\n return nodeRole;\n }",
"public static ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllContentType_asNode_(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_as(model, instanceResource, CONTENTTYPE, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}",
"public ASTType getTypeNode() {\n return (ASTType) getChild(0);\n }",
"@NonNull NodeType<?> getType();",
"public interface JsonConverter {\n /** Deserializes a JSON string into a Java object.\n * @param source JSON string.\n * @param type Class type.\n * @param <T> type of class to return.\n * @return A Java object representing the same information as found in the JSON string.\n */\n <T> T fromJson(String source, Class<T> type);\n\n /** Deserializes a JSON string into a Java object.\n * @param source JSON string.\n * @param type JavaType class type.\n * @param <T> type of class to return.\n * @return A Java object representing the same information as found in the JSON string.\n */\n <T> T fromJson(String source, JavaType type);\n\n /** Serializes a Java object into a JSON string.\n * @param source A Java object.\n * @param <T> type of class of the source.\n * @return A JSON string representing the data represented in the Java object.\n */\n <T> String toJson(T source);\n}",
"abstract Object read(@NonNull JsonReader reader) throws IOException;",
"private void updateItem(JsonNode json) {\n }",
"TypeReference getTypeReference();",
"@Override\n public JsonNode visit(JmesPathIdentity jmesPathIdentity, JsonNode input) {\n return input;\n }",
"public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}",
"public abstract void fromJson(JSONObject jsonObject);",
"@Test\r\n public void testGetStructureNode() {\r\n System.out.println(\"getStructureNode\");\r\n ConfigNode<String> configNode = new ConfigNode<>(testLine);\r\n configNode.setStructureNode(\"a\");\r\n assertTrue(configNode.getStructureNode() instanceof String);\r\n }",
"public Node(T data) {this.data = data;}",
"private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}",
"private boolean isNodeTypeAttribute(String attributeName, String attributeValue) {\r\n boolean match = false;\r\n if (!StringUtils.isBlank(attributeName) && !StringUtils.isBlank(attributeValue) && !StringUtils.isBlank(getJsonTypeAttributeName())) {\r\n if (attributeName.equalsIgnoreCase(getJsonTypeAttributeName())) {\r\n if (attributeValue.equalsIgnoreCase(\"boolean\")) {\r\n _current.setType(XML2JSONObject.Type.Boolean);\r\n }\r\n else if (attributeValue.equalsIgnoreCase(\"number\")) {\r\n _current.setType(XML2JSONObject.Type.Number);\r\n }\r\n else if (attributeValue.equalsIgnoreCase(\"array\")) {\r\n _current.setType(XML2JSONObject.Type.Array);\r\n }\r\n match = true;\r\n\r\n }\r\n }\r\n return match;\r\n }",
"public NodeType getNodeType();",
"public ObjectMapper() {\n this.typeConverter = null;\n }",
"public interface Interaction {\n JsonNode create(ObjectNode node);\n}",
"public interface JsonPaser<C> {\n public JsonPaser me();\n\n public C toJson(String json);\n\n public String toJsonString(Object object);\n\n public <T> T toObject(String json, Class<T> type);\n\n public <T> T[] toObjectArray(String json, Class<T> type);\n\n public <T> Collection<T> toObjectList(String json, Class<T> type);\n\n public <T> T toObject(String name, C c, Class<T> type);\n\n public <T> T[] toObjectArray(String name, C c, Class<T> type);\n\n public <T> Collection<T> toObjectList(String name, C c, Class<T> type);\n\n}",
"@Test\n public void readSystemObjectClassPrescription() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Prescription\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Prescription properly\", object.getClass(), actual.getClass());\n }",
"public ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllGeneralEncapsulatedObject_asNode_() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), GENERALENCAPSULATEDOBJECT, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}",
"private void expect(JsonType type) {\n if (peek() != type) {\n throw new JsonException(\n \"Expected to read a \" + type + \" but instead have: \" + peek() + \". \" + input);\n }\n\n // Special map handling. Woo!\n Container top = stack.peekFirst();\n\n if (type == JsonType.NAME) {\n if (top == Container.MAP_NAME) {\n stack.removeFirst();\n stack.addFirst(Container.MAP_VALUE);\n return;\n } else if (top != null) {\n throw new JsonException(\"Unexpected attempt to read name. \" + input);\n }\n\n return; // End of Name handling\n }\n\n // Handle the case where we're reading a value\n if (top == Container.MAP_VALUE) {\n stack.removeFirst();\n stack.addFirst(Container.MAP_NAME);\n }\n }",
"private void asertPresentJSON(String json, String fieldName) throws Exception {\n\n ObjectMapper objectMapper = new ObjectMapper();\n\n try {\n\n JsonNode rootNode = objectMapper.readTree(json);\n String value = rootNode.path(fieldName).asText();\n assertNotNull(\"Expected for field <\" + fieldName + \"> value\", value);\n\n } catch (JsonParseException e) {\n System.out.println(\"Trouble trying to check \" + e.getMessage()); // TODO better message \n throw e;\n }\n\n }",
"TorrentJsonParser getJsonParser();",
"@JsProperty(name = \"type\")\n public native String getType();",
"public short getNodeType();",
"public String treeType();",
"private boolean compatibleNodeTypes(AxiomTreeNode t1, AxiomTreeNode t2) {\n if (!t1.getNodeType().equals(t2.getNodeType())) {\n return false;\n }\n \n switch (t1.getNodeType()) {\n case CARD:\n int label1 = (Integer) t1.getLabel();\n int label2 = (Integer) t2.getLabel();\n return (label1 == label2);\n \t\n case OWLOBJECT:\n OWLObject o1 = (OWLObject) t1.getLabel();\n OWLObject o2 = (OWLObject) t2.getLabel();\n //System.out.println(o1.getClass());\n //System.out.println(o2.getClass());\n //Check for datatypes - then check datatype to see match. Else, return true if compatible.\n if(o1.getClass() == o2.getClass())\n {\n \tif(!o1.getDatatypesInSignature().isEmpty())\n \t{\n \t\t//Need to check if built in first. First check is convenience, datatypes should match\n \t\t//If one is built in, so should other. If neither is built in, this is also a viable match\n \t\t//If not equal and at least one is built in, its not a match.\n \t\tOWLDatatype dt1 = (OWLDatatype) o1.getDatatypesInSignature().toArray()[0];\n \t\t\tOWLDatatype dt2 = (OWLDatatype) o2.getDatatypesInSignature().toArray()[0];\n \t\t\t//System.out.println(\"DT1: \" + dt1);\n \t\t\t//System.out.println(\"DT2: \" + dt2);\n \t\tif(dt1.equals(dt2) && dt1.isBuiltIn())\n \t\t{\t\n \t\t\t//System.out.println(\"Standard state\");\n \t\t\t//System.out.println(o1.equals(o2));\n \t\t\treturn o1.equals(o2);\n \t\t}\n \t\telse if(!dt1.isBuiltIn() && !dt2.isBuiltIn())\n \t\t{\n \t\t\t//System.out.println(\"Unique state\");\n \t\t\treturn true;\n \t\t}\n \t\telse\n \t\t{\n \t\t\t//System.out.println(\"Rejection state\");\n \t\t\treturn false;\n \t\t}\n \n \t}\n \telse\n \t{\n \t\treturn true;\n \t}\n }\n else\n {\n \treturn false;\n }\n }\n return false;\n }",
"boolean isJSON(Response response) {\n return response.getHeaderString(\"Content-Type\").equalsIgnoreCase(MediaType.APPLICATION_JSON);\n }",
"@Override\n\tpublic void VisitInstanceOfNode(BunInstanceOfNode Node) {\n\n\t}",
"void mo28373a(JSONObject jSONObject);",
"public static String getNodeType() {\n\t\treturn NODE_TYPE;\n\t}",
"@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }",
"public Node createNode(Object object, Class<?> type) {\n\t\t\tif (Types.isKindOf(object.getClass(), List.class)) {\n\t\t\t\treturn new ListNode(object, type);\n\t\t\t}\n\t\t\tif (object.getClass().isArray()) {\n\t\t\t\treturn new ArrayNode(object);\n\t\t\t}\n\t\t\treturn new ObjectNode(object);\n\t\t}",
"protected void verificarEstructuraJson(JSONObject node){\n Set<String> keys = node.keySet();\n \n for( String key : keys ){\n if( key.contentEquals(NODE_TYPE_STR) || key.contentEquals(REQUEST_SCOPE_STR) || key.contentEquals(REQUEST_IDENTITY_STR) ||\n key.contentEquals(REQUEST_META_STR) || key.contentEquals(REQUEST_ID_STR) || key.contentEquals(REQUEST_DATA_STR)){ \n }\n else{\n throw new RuntimeException(Mensajes.ERR_SIN_FORMATO_JSON);\n }\n }\n }",
"public abstract jq_Type getDeclaredType();"
] | [
"0.61766267",
"0.60344225",
"0.60070956",
"0.58170563",
"0.5641687",
"0.5629063",
"0.5559229",
"0.55525833",
"0.5538051",
"0.5532872",
"0.5515736",
"0.54861426",
"0.5442761",
"0.5408991",
"0.53894407",
"0.5376166",
"0.5363977",
"0.5331531",
"0.5325475",
"0.52927047",
"0.5267705",
"0.52611095",
"0.52458966",
"0.5228724",
"0.5227311",
"0.52236956",
"0.52094865",
"0.5207155",
"0.51719433",
"0.5159935",
"0.5134569",
"0.5119849",
"0.5115932",
"0.5115337",
"0.51096714",
"0.5105168",
"0.510469",
"0.5102023",
"0.5093707",
"0.50573295",
"0.5056226",
"0.50493324",
"0.5041066",
"0.50334746",
"0.5024129",
"0.5008837",
"0.5003451",
"0.49900565",
"0.49760202",
"0.4959995",
"0.49449322",
"0.49132112",
"0.49094298",
"0.49029723",
"0.49014017",
"0.4893399",
"0.4887158",
"0.48862225",
"0.4878757",
"0.487073",
"0.48706126",
"0.48585296",
"0.4843088",
"0.48425084",
"0.48323843",
"0.48322028",
"0.4830548",
"0.4829896",
"0.481906",
"0.48189452",
"0.48151916",
"0.481499",
"0.48146808",
"0.4814281",
"0.48094013",
"0.48075867",
"0.48043633",
"0.48003793",
"0.47965795",
"0.47920638",
"0.47848725",
"0.478017",
"0.47797668",
"0.47765154",
"0.47761673",
"0.47738773",
"0.47681585",
"0.47666198",
"0.47523722",
"0.47480965",
"0.47428578",
"0.4735477",
"0.47290665",
"0.472871",
"0.47145188",
"0.46995124",
"0.46981287",
"0.4697332",
"0.46960557",
"0.46938315"
] | 0.4755876 | 88 |
/ / Standard method overrides | @Override
public String toString() {
return InternalNodeSerializer.toString(this);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"protected abstract Set method_1559();",
"public void smell() {\n\t\t\n\t}",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\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 buscar() {\n\t\t\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void Tyre() {\n\t\t\r\n\t}",
"public abstract void mo70713b();",
"@Override\r\n\tpublic void Method3() {\n\t\t\r\n\t}",
"@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}",
"@Override\n\tpublic void e() {\n\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"@Override\n\tpublic void yürü() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"@Override\r\n public String toString() {\n return super.toString();\r\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override public int describeContents() { return 0; }",
"public void mo38117a() {\n }",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"@Override\r\n public void salir() {\n }",
"@Override\r\n\tpublic void voar() {\n\t\t\r\n\t}",
"@Override\n public void apply() {\n }",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"@Override\n\tpublic void leti() \n\t{\n\t}",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Override\n public void init() {}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\r\n public String toString() {\n return super.toString();\r\n }"
] | [
"0.70168966",
"0.6896299",
"0.687582",
"0.686345",
"0.6817893",
"0.6791928",
"0.6791928",
"0.6725012",
"0.66094077",
"0.66039443",
"0.66039443",
"0.6592081",
"0.6579161",
"0.65735036",
"0.65640354",
"0.65086067",
"0.65027606",
"0.6458029",
"0.64570034",
"0.6424262",
"0.63724166",
"0.6369928",
"0.6354693",
"0.635317",
"0.6349988",
"0.6342561",
"0.62747693",
"0.62690926",
"0.6265733",
"0.6240179",
"0.6210764",
"0.6194126",
"0.61877036",
"0.61720645",
"0.61645234",
"0.61550677",
"0.6153729",
"0.6140782",
"0.6133471",
"0.61286485",
"0.6112263",
"0.60967886",
"0.60830456",
"0.6075087",
"0.6068108",
"0.60660887",
"0.60456026",
"0.60420233",
"0.60420233",
"0.60420233",
"0.60420233",
"0.60420233",
"0.60420233",
"0.603781",
"0.603781",
"0.6027322",
"0.60199374",
"0.60188675",
"0.5994827",
"0.5970941",
"0.5970089",
"0.596819",
"0.59589565",
"0.59573525",
"0.59572387",
"0.5951681",
"0.5951681",
"0.5945173",
"0.5943761",
"0.5937409",
"0.59314185",
"0.59279203",
"0.59200674",
"0.5919483",
"0.5918231",
"0.5914922",
"0.59115964",
"0.5906352",
"0.58967173",
"0.5867124",
"0.58652943",
"0.5863456",
"0.585276",
"0.58519727",
"0.58503616",
"0.58454",
"0.5844201",
"0.5843852",
"0.58235216",
"0.5822718",
"0.582195",
"0.582184",
"0.5815784",
"0.5815166",
"0.5812187",
"0.58115166",
"0.58012986",
"0.5796696",
"0.5796323",
"0.57956326",
"0.57954186"
] | 0.0 | -1 |
String message = "Hello Spring Boot + JSP"; model.addAttribute("message", message); | @GetMapping({"/", "/index"})
public String index(Model model) {
List<ProductEntity> products = productService.getAllProduct();
model.addAttribute("products", products);
return "index";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GetMapping(\"/\")\n public String showIndex(Model model)\n {\n String myMessage = \"Welcome to Robo Resume!\";\n model.addAttribute(\"welcomemessage\",myMessage);\n return \"index\";\n }",
"@RequestMapping(\"/processFormVersionThree\")\npublic String processFormVersionThree(@RequestParam(\"studentName\")String theName ,Model model )\n{\n\ttheName = theName.toUpperCase();\n\t//create the message\n\tString result = \" I love \" +theName;\n\t// add msg to model\n\tmodel.addAttribute(\"message\",result);\n\n return\"helloworld\";\n \n}",
"@RequestMapping(\"/processFormVersionTwo\")\npublic String letsShoutDude(HttpServletRequest request ,Model model )\n{\n\t// read request parameter from html form\n\tString theName = request.getParameter(\"studentName\");\n\t//convert data to all caps \n\ttheName = theName.toUpperCase();\n\t//create the message\n\tString result = \"YO YO !! \" +theName;\n\t// add msg to model\n\tmodel.addAttribute(\"message\",result);\n\n return\"helloworld\";\n \n}",
"@RequestMapping(\"/processFormVersion2\")\n public String letShoutDude(HttpServletRequest request, Model model)\n {\n //read the request paramether\n String theName=request.getParameter(\"studentName\");\n //convert data to uppercase\n theName=theName.toUpperCase();\n //create message\n String rezult=\"Yo \"+theName+\" !\";\n //add message to the model\n model.addAttribute(\"message\",rezult);\n return \"helloworld\";\n }",
"@RequestMapping(path=\"/hello\", method=RequestMethod.GET)\n\tpublic String hello(Model model){\n\t\tmodel.addAttribute(\"message\", \"Welcome user to this session\");\n\t\tmodel.addAttribute(\"user\", \"Ravi\");\n\t\tSystem.out.println(\"Hello invoked...\");\n\t\treturn \"test\";\n\t}",
"@RequestMapping(\"/\")\n public String mainPage(Model model){\n model.addAttribute(\"messages\", messageService.findAll());\n\n return \"index\";\n }",
"@GetMapping(\"/\")\n public String main(Model model) {\n //set variables to be used in thymeleaf template\n model.addAttribute(\"translated\", translated);\n model.addAttribute(\"msg\", msg);\n model.addAttribute(\"source\", source);\n model.addAttribute(\"company\", company);\n model.addAttribute(\"messages\", tr.findAll());\n return \"index\"; //thymeleaf template name (index -> index.html)\n }",
"@RequestMapping(\"/\")\n\tpublic String doWelcome(Model model) {\n\t\tList<String> welcomeMessage = welcomeService.getWelcomeMessage(\"RJuliart\");\n\t\t\n\t\t//2\n\t\tmodel.addAttribute(\"myWelcomeMessage\", welcomeMessage);\n\t\t\n\t\t//3\n\t\treturn \"welcomeNew\";\n\t}",
"@RequestMapping(\"hello\")\n\tpublic ModelAndView sayHello(){\n\t\treturn new ModelAndView(\"hello\",\"msg\",\"Hello All\");\n\t}",
"@RequestMapping(value = \"hello\", method = {RequestMethod.GET, RequestMethod.POST})\n public String hello(@RequestParam String name, Model model) {\n model.addAttribute(\"greeting\", \"Hello \" + name + \"!\");\n return \"hello\";\n }",
"@RequestMapping(value = \"/about\",method = RequestMethod.GET)\n public String about(Model model){\n model.addAttribute(\"name\", \"Sanjay\");\n model.addAttribute(\"date\", new Date().toString());\n System.out.println(\"Inside about handler..\");\n \n // example\n // String nameString=\"abc\";\n // nameString.toUpperCase();\n\n\n return \"about\";\n }",
"@RequestMapping(\"/login\")\n public String helloWorld(Model model) {\n return \"login\";\n }",
"@GetMapping(\"/\") //na adresie URL localhost:8080/\n public String home(Model model){\n model.addAttribute(\"header_title\", \"BLOG IT\");\n model.addAttribute(\"header_author\", \"mati\");\n\n //miejsce na implementacje\n\n return \"blog\"; //wartoscia zwracana jest nazwa szablony Thymeleaf-> domyslna lokalizacja to resource/templates\n //-> nie dopisujemy rozszerzenia .html lub jakiegokolwiek innego\n}",
"@GetMapping(value = {\"/\", \"/index\", \"\"})\n public String index(Model model) {\n model.addAttribute(\"titulo\", \"Hola Spring\");\n return \"index\";\n }",
"@RequestMapping(value = { \"/\" }, method = RequestMethod.GET)\r\n\tpublic String listUsers(ModelMap model) {\r\n\t\tmodel.addAttribute(\"helloMessage\", \"Spring with java... configuration base template\");\r\n\t\treturn \"index\";\r\n\t}",
"@RequestMapping(value = \"/welcome\")\n public String welcome(Model model){\n model.addAttribute(\"hello\",\"TEST\");//context.getAuthentication().getName());\n return \"welcome\";\n\n }",
"@RequestMapping(\"/processFormVersionThree\")\n public String processFormVersion3(\n @RequestParam(\"studentName\") String theName, Model model)\n {\n theName=theName.toUpperCase();\n //create message\n String rezult=\"Hey my friend from v3 \"+theName+\" !\";\n //add message to the model\n model.addAttribute(\"message\",rezult);\n return \"helloworld\";\n }",
"@RequestMapping(\"/processForm\")\n public String processForm(HttpServletRequest request, Model model) {\n String studentName = request.getParameter(\"studentName\");\n String convertedName = studentName != null ? studentName.toUpperCase() : null;\n String result = \"Yo! \" + convertedName;\n model.addAttribute(\"message\", result);\n\n return \"helloWorld\";\n }",
"@RequestMapping(\"/hello\")\n\tpublic String hello() {\n\t\tSystem.out.println(\"Hello World\");\n\t\treturn \"Hello, Welcome to the auto-configurable world of spring boot\";\n\t}",
"@RequestMapping(\"/showForm\")\npublic String showForm()\n{\nreturn\"helloworld-form\";\t\n}",
"@RequestMapping(\"/processForm\")\npublic String processForm()\n{\nreturn\"helloworld\";\t\n}",
"@RequestMapping(\"/processForm\")\n public String processForm(){\n return \"helloworld\";\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\t\n\t\tAuthor author = new Author();\n\t\tauthor.setFirstName(\"fisseha\");\n\t\tauthor.setLastName(\"chari\");\n\t\treturn \"home\";\n\t}",
"@RequestMapping(\"/\")\n\tpublic String welcome(Map<String, Object> model) {\n\t\treturn \"welcome\";\n\t}",
"@RequestMapping(value = \"/index\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\tlogger.info(\"Welcome home!\");\n\t\tmodel.addAttribute(\"controllerMessage\",\n\t\t\t\t\"This is the message from the controller!\");\n\t\treturn \"index\";\n\t}",
"@RequestMapping({\"/list\", \"/\", \"\"}) // This is the path entered in browser (localhost:8080/products)\n public String listProducts(Model model){\n model.addAttribute(\"products\", productService.listAll());\n \n return \"product/listproducts\"; // This must equal the html file name (listproducts.html)\n }",
"@GetMapping(\"/showNewEmployeeForm\")\n public String showNewEmployeeForm(Model model){\n Employee employee=new Employee();\n model.addAttribute(\"employee\",employee);\n return \"Add_Employee\";\n }",
"@RequestMapping(\"/showForm\")\n public String showForm()\n {\n return \"helloworld-form\";\n }",
"@RequestMapping(\"/\")\n public String home(){\n return \"Hello World\";\n }",
"@GetMapping(\"/hello\")\n public String mainWithParam(\n @RequestParam(name = \"name\", required = false, defaultValue = \"\") String name, Model model) {\n\n model.addAttribute(\"message\", name);\n Client client = new Client();\n model.addAttribute(\"client\", client);\n model.addAttribute(\"listAction\", listAction);\n List<Client> userList = getClients();\n model.addAttribute(\"userList\", userList);\n return \"welcome\"; //view\n }",
"@GetMapping(\"/login\")\n public String showLogin(Model model){\n model.addAttribute(\"user\", new User());\n return \"loginForm\";\n }",
"@GetMapping(\"login\")\n public String loginForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"login_form\";\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String welcome(ModelMap model)\n\t{\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipalUsername());\n\t\treturn \"home\";\n\t}",
"@GetMapping(\"/\")\n public String viewHomePage(Model model){\n model.addAttribute(\"listEmployee\",employeeService.getAllEmployees());\n return \"index\";\n }",
"@RequestMapping(\"/\")\r\n String Adminhome() {\r\n return \"Welcome to Admin Home Page\";\r\n }",
"@RequestMapping(\"/post\")\n public String createPost(Model model) {\n if(!model.containsAttribute(\"message\")){\n model.addAttribute(\"message\", new Message());\n }\n\n return \"form\";\n }",
"@RequestMapping(\"/\")\n\tpublic String main() {\n\t\treturn \"index.jsp\";\n\t}",
"@GetMapping(\"/temp/jsp\")\n public String tempJsp(){\n return \"test\";\n }",
"@GetMapping({ \"/\", \"/welcome\" })\n\tpublic String welcome(Model model) {\t\n\t\t\n\t\tloggedUser = userService.findLoggedUser(); // Access the logged user.\n\n\t\tArrayList<ToDoList> toDoLists = toDoListService.findByUser(loggedUser); // Find logged user specific to do lists.\n\t\t\t\t\n\t\tmodel.addAttribute(\"lists\", toDoLists);\n\t\t\n\t\tmodel.addAttribute(\"toDoListForm\", new ToDoList());\n\t\t\n\t\tmodel.addAttribute(\"toDoListUpdateForm\", new ToDoList());\n\t\t\n return \"welcome\";\n }",
"@RequestMapping(value=\"/kangJsp01.do\", method=RequestMethod.GET)\n\tpublic String kangJsp01(Locale locale, Model model) throws Exception {\n\t\tmodel.addAttribute(\"serverMsg\", \"Hello, 강석!!! (/kangJsp01.do)\");\n\t\treturn \"kang/kangJsp01\";\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Model model, Authentication authentication){\n if(authentication != null) {\n User currUser = customUserDetailsService.findByUsername(authentication.getName());\n model.addAttribute(\"user\", currUser);\n }\n // The string \"Index\" that is returned here is the name of the view\n // (the Index.jsp file) that is in the path /main/webapp/WEB-INF/jsp/\n // If you change \"Index\" to something else, be sure you have a .jsp\n // file that has the same name\n return \"Index\";\n }",
"@RequestMapping(\"/inbox\")\n public String listInbox(Model model) {\n model.addAttribute(\"posts\", educationFeedbackService.listInbox());\n return \"admin/education/listInbox\";\n }",
"@GetMapping(\"/OrderShoe\")\n public String OrderShoe(Model model){\n model.addAttribute(\"appName\", appName);\n return \"orderShoe\";\n }",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Locale locale, Model model)\n {\n System.out.println(\"Home \" + service.getName());\n model.addAttribute(\"name\", service.getName());\n return \"home\";\n }",
"@RequestMapping(\"/\")\n\t@ResponseBody\n\tpublic String home() {\n\t\treturn \"Hi Spring Boot!!\";\n\t}",
"@RequestMapping(\"/\")\n\tString home() {\n\t\treturn \"Hello World!\";\n\t}",
"@Action(\"get:/hello\")\n public View hello() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String currentTime = dateFormat.format(new Date());\n //view.addModel(\"currentTime\", currentTime);\n return new View(\"hello.jsp\").addModel(\"currentTime\", currentTime);\n }",
"@RequestMapping(\"/hello\")\r\n public String greeting(@RequestParam(value=\"name\", defaultValue=\"World\") String name) {\r\n\r\n return name+\" - TEST\";\r\n\r\n }",
"@RequestMapping(\"/addUser\")\n public String addUser(){\n return \"added\";\n }",
"@RequestMapping(\"/sent.html\")\n\tpublic String sent() {\n\t\treturn \"sent.html\";\n\t}",
"@Controller\n/*public class HomeController {\n\t\n\tprivate static final Logger logger = LoggerFactory.getLogger(HomeController.class);\n\t\n\t/**\n\t * Simply selects the home view to render by returning its name.\n\t */\n\t@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\t\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\t\t\n\t\tString formattedDate = dateFormat.format(date);\n\t\t\n\t\tmodel.addAttribute(\"serverTime\", formattedDate );\n\t\t\n\t\treturn \"home\";\n\t}",
"@RequestMapping(method = RequestMethod.GET)\r\n public String home(ModelMap model) throws Exception\r\n {\t\t\r\n return \"Home\";\r\n }",
"@RequestMapping(value=\"/spittles\",method=RequestMethod.GET) \r\n\tpublic String spittles(Model model) {\r\n\t// pierwszy parameter - spittleList to nazwa zmiennej wykorzystywanej w wywolywanym pliku jsp\r\n model.addAttribute(\"spittleList\",spittleRepository.findSpittles(Long.MAX_VALUE, 20));\r\n return \"spittles\";\r\n }",
"@RequestMapping(method = RequestMethod.GET,path=\"/hello-world\")\n\tpublic String helloWorld() {\n\t\treturn \"Hello World\";\n\t}",
"@RequestMapping(\"/productlist/Productdetails/{id}\")\n\n public String Productdetails(@PathVariable String id, Model model) throws IOException{\n\n Product bike = productDao.getProductById(id);\n model.addAttribute(bike);\n\n\n return \"productdetails\";\n }",
"@GetMapping(\"/register\")\n public String showRegister(Model model){\n model.addAttribute(\"user\", new User());\n return \"registerForm\";\n }",
"@RequestMapping(\"/addjob\")\n public String addJob(Model model)\n {\n model.addAttribute(\"aJob\",new Job());\n return \"addjob\";\n }",
"@GetMapping(\"register\")\n public String registerForm(Model model){\n model.addAttribute(\"user\", new User());\n return \"register_form\";\n }",
"@GetMapping(\"/book\")\r\n public String getBooks(Model model){\n\r\n model.addAttribute(\"books\",bookRepository.findAll());\r\n return \"books.html\";\r\n }",
"@RequestMapping(\"/\")\n //Because of rest controller annotation spring renders resulting string directly back to the caller.\n // In this case caller is home method and string is returned.\n public String home(){\n return \"Hello Comma World!\";\n }",
"@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}",
"@GetMapping(\"/message/{name}\")\n public String greeting(@PathVariable String name) {\n return \"Hello \" + name ;\n }",
"@RequestMapping(value=\"/\")\r\npublic ModelAndView homePage(ModelAndView model) throws IOException\r\n{\r\n\tmodel.setViewName(\"home\");\r\n\treturn model;\r\n}",
"@RequestMapping(\"/home\")\r\n\tpublic String home(Model m)\r\n\t{\n\t\t\r\n\t\tString str=\"home\";\r\n\t\tm.addAttribute(\"page\",str);\r\n\t\tList<Todo> list=todoDao.getAll();\r\n\t\t\r\n\t\tm.addAttribute(\"list\",list);\r\n\t\treturn \"home\";\r\n\t}",
"@RequestMapping(value = \"\", method = RequestMethod.GET)\n\tpublic String cout(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\n\t\tString formattedDate = dateFormat.format(date);\n\t\n\t\tmodel.addAttribute(\"serverTime\", formattedDate);\n\t\n\t\treturn \"bootstrap/bootstrap\";\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\tPerson meihuabo = (Person)SpringUtil.getBean(\"meihuabo\");\n\t\tlogger.info(\"person aaa's name is \"+ meihuabo.getName()+\". age is \"+meihuabo.getAge());\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\t\t\n\t\tString formattedDate = dateFormat.format(date);\n\t\t\n\t\tmodel.addAttribute(\"serverTime\", formattedDate );\n\t\t\n\t\treturn \"home\";\n\t}",
"@RequestMapping(method = RequestMethod.GET, path = \"/hello-world\")\t\n\tpublic String helloWorld() {\n\t\t\n\t\treturn \"Hello World\";\n\t}",
"@RequestMapping(\"/hello\")\r\n\t\r\n\t// Should return this method\r\n\t// Returns 'Hi' back\r\n\tpublic String sayHi() {\r\n\t\treturn \"Hi, hope all is well with you and your loved ones. \\n\"\r\n\t\t\t\t+ \"Welcome to DaAztechStudent's 1st RESTful web service!\";\r\n\t}",
"@GetMapping(path = \"create_post\")\n public String create_post(Model model){\n model.addAttribute(\"feed\" , new Feed() );\n return \"create_post\";\n }",
"@GetMapping(path=\"/hello-world\")\n\tpublic String helloWorld() {\n\t\t\n\t\treturn \"<b>Hello World</b>\";\n\t}",
"@RequestMapping(\"/spyrjaNotanda\")\r\n public String spyrjaNotandi () {\r\n \treturn \"demo/hvadaNotandi\";\r\n }",
"@RequestMapping(value=\"/welcomepage\")\r\npublic ModelAndView welcomepage(ModelAndView model)\r\n{ \r\n\tmodel.setViewName(\"usertype\");\r\n\treturn model;\r\n\t}",
"@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }",
"@GetMapping(\"/hello\")\n\tpublic String hello() {\n\t\treturn \"Hello Everyone!!!\";\n\t}",
"@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Locale locale, Model model) {\n\t\tlogger.info(\"Welcome home! The client locale is {}.\", locale);\n\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\n\t\tString formattedDate = dateFormat.format(date);\n\n\t\tmodel.addAttribute(\"name\", \"Mehmet\");\n\t\tmodel.addAttribute(\"userls\", new Data().tblData());\n\n\t\treturn \"home\";\n\t}",
"@RequestMapping({\"\", \"/\", \"/index\"})\n public String getIndexPage() {\n System.out.println(\"Some message to say...1234e\");\n return \"index\";\n }",
"@RequestMapping(\"/testing\")\n public String test(){\n return \"test\";\n }",
"@GetMapping(value = \"/\")\n public String home(Locale locale, Model model) {\n log.info(\"Welcome home! The client locale is {}.\", locale);\n String timeStamp = String.valueOf(System.currentTimeMillis());\n Date date = new Date();\n DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\n String formattedDate = dateFormat.format(date);\n\n model.addAttribute(\"serverTime\", formattedDate);\n model.addAttribute(\"timestamp\", timeStamp);\n\n return \"home\";\n }",
"@RequestMapping(\"/hello\")\n public String insertUser(){\n return null;\n }",
"@RequestMapping(\"/leaveReject\")\npublic String reJect(HttpServletRequest request)\n{\n\trequest.setAttribute(\"rej\", \"SuccessFully Rejected\");\n\t\n\treturn \"buttons.jsp\";\n\n}",
"@RequestMapping(value = { \"/\", \"/welcome**\" }, method = RequestMethod.GET)\n\t// public ModelAndView home(Locale locale, Model model) {\n\tpublic ModelAndView home(Locale locale) {\n\t\t// logger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\tDate date = new Date();\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale);\n\t\tString formattedDate = dateFormat.format(date);\n\t\t// model.addAttribute(\"serverTime\", formattedDate);\n\n\t\tModelAndView model = new ModelAndView();\n\t\tmodel.addObject(\"serverTime\", formattedDate);\n\t\tmodel.addObject(\"title\", \"Spring Security Hello World\");\n\t\tmodel.addObject(\"message\", \"This is welcome page!\");\n\t\tmodel.setViewName(\"home\");\n\t\treturn model;\n\n\t\t// return \"home\";\n\t}",
"@GetMapping(\"/hello\")\n public String hellot(){\n return \"hello!\";\n }",
"@GetMapping(\"/product\")\n public String productList(Model model) {\n List<Product> productList = sportyShoesService.getProductList();\n model.addAttribute(\"productList\", productList);\n model.addAttribute(\"appName\", appName);\n return \"product\";\n }",
"@RequestMapping(value=\"/errors\", method=RequestMethod.GET)\n\tpublic String renderErrorPage(final Model model, final HttpServletRequest request){\n\t\t// get the HttpStatusCode of the request\n\t\tfinal int error_code = getHttpStatusCode(request);\n\t\t//error_message is generated using the error_code\n\t\tfinal String error_message=errorService.generateErrorMessage(error_code);\n\t\t//get the logged in user\n\t\tString loggedInUser = request.getRemoteUser();\n\t\tmodel.addAttribute(\"loggedInUser\", loggedInUser);\n\t\t//error message is added to model\t\n\t\tmodel.addAttribute(\"errorMsg\", error_message);\n\t\t//errorPage jsp\n\t\treturn \"errors/errorPage\";\n\t}",
"@RequestMapping(\"/\")\n String hello(){\n logger.debug(\"Debug message\");\n logger.info(\"Info message\");\n logger.warn(\"Warn message\");\n logger.error(\"Error message\");\n return \"Done\";\n }",
"@GetMapping(value= \"/add\")\n public String add(Model model) {\n\n \tmodel.addAttribute(\"user\",new User());\n \tmodel.addAttribute(\"success\", true);\n\n \treturn \"addUser\";\n }",
"@RequestMapping(value = \"/registration\")\n public String registration(Model model) {\n User user = new User();\n model.addAttribute(\"user\", user);\n return \"user/registration\";\n }",
"@GetMapping(\"/\")\r\npublic String index(Model model) {\n\r\n return \"index\";\r\n}",
"@RequestMapping(\"/\")\n\tpublic String showHome(Model model) {\n\t\tList<Employee> list=employeeService.fetchAllEmployee();\n\t\t//to pass data from ctrl to jsp we use Model Interface\n\t\tmodel.addAttribute(\"list\",list);\n\t\treturn \"index\"; \n\t}",
"@RequestMapping(\"/getUsers\")\r\n\tpublic String getUsers() {\r\n\t\treturn \"Hai Hello How are you\";\r\n\t}",
"@GetMapping(\"/about\")\n public String about() {\n return \"about\";\n }",
"@GetMapping(\"/hi\")\n public String sayHello(){\n return \"Hello\";\n }",
"@Bean\n\tpublic String message() {\n\t\treturn \"Hello, Spring!\";\n\t}",
"@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public String goHome(ModelMap model) {\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n model.addAttribute(\"pagetitle\", \"Pand-Eco\");\n return \"view_landing_page\";\n }",
"@RequestMapping(\"/emailAlert\")\n public String showFrontPage(Map<String, Object> map, Model model,\n @RequestParam(required = false) String message) {\n List<Catageory> catageoryList = new ArrayList<Catageory>();\n map.put(\"EmailAlert\", new EmailAlert());\n model.addAttribute(\"message\", message);\n catageoryList = catageoryService.getAllCatageoryName();\n if (catageoryList != null) {\n model.addAttribute(\"catageory\", catageoryList);\n }\n return \"emailAlert\";\n }",
"@RequestMapping(\"/reportStatus\")\n\tpublic String statusPage(Model model)\n\t{\n\t\tmodel.addAttribute(\"status\",new ReportStatus());\n\t\treturn \"reportStatus\";\n\t}",
"@RequestMapping(value=\"/homepage\")\r\npublic ModelAndView homePage1(ModelAndView model) throws IOException\r\n{\r\n model.setViewName(\"home\");\r\n\treturn model;\r\n}",
"@RequestMapping(\"/welcome\")\n public String ViewAllVegs(Model model)\n {\n List<Vegetable> vegList = vegRepository.findAll();\n\n model.addAttribute(\"vegList\", vegList);\n\n return \"welcome\";\n }",
"@GetMapping(value = \"/hello\",produces = MediaType.TEXT_PLAIN_VALUE)\n public String sayHello(){\n return \"Hello World\";\n }",
"@RequestMapping(value = \"/add\", method = RequestMethod.GET)\n public String addUser(Model model)\n {\n model.addAttribute(\"userDto\", new UserDto());\n return \"login/add\";\n }",
"@GetMapping(\"/patientRegister\")\n public String patientRegister(Model model){\n model.addAttribute(\"patient\", new User());\n model.addAttribute(\"info\", new PatientInfo());\n return \"views/patient/patientRegister\";\n }"
] | [
"0.77862483",
"0.7374049",
"0.731194",
"0.7215302",
"0.7133029",
"0.7046116",
"0.69743335",
"0.69603145",
"0.6802084",
"0.677646",
"0.6765136",
"0.6762342",
"0.6694746",
"0.66935766",
"0.6664354",
"0.6619585",
"0.6572919",
"0.6548284",
"0.6391987",
"0.63644207",
"0.6350267",
"0.6310199",
"0.6266594",
"0.6264501",
"0.62614566",
"0.62415725",
"0.6214745",
"0.62119573",
"0.6200761",
"0.6194213",
"0.61838156",
"0.61554927",
"0.6093613",
"0.60868675",
"0.60722256",
"0.60690284",
"0.60638314",
"0.6061361",
"0.6048175",
"0.60357887",
"0.60194254",
"0.6011777",
"0.60104346",
"0.60020924",
"0.59939814",
"0.5981343",
"0.59762985",
"0.5973224",
"0.5969604",
"0.5958081",
"0.5955696",
"0.59239036",
"0.5922132",
"0.5920995",
"0.59076655",
"0.58942455",
"0.5890387",
"0.586397",
"0.5862491",
"0.58532405",
"0.5844299",
"0.58418715",
"0.58412",
"0.5831712",
"0.5823475",
"0.5814416",
"0.5811661",
"0.5807666",
"0.5802284",
"0.5797785",
"0.57930744",
"0.57875824",
"0.57839733",
"0.57427895",
"0.57254",
"0.57250726",
"0.5720748",
"0.5715706",
"0.57125026",
"0.5706961",
"0.57053894",
"0.57035094",
"0.5703138",
"0.56941295",
"0.5691218",
"0.5689572",
"0.56864303",
"0.56838465",
"0.567929",
"0.5678943",
"0.5672623",
"0.56723064",
"0.56680036",
"0.56613004",
"0.56607974",
"0.5654819",
"0.56537515",
"0.56476986",
"0.56438357",
"0.56390285",
"0.5634032"
] | 0.0 | -1 |
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 Facture)) {
return false;
}
Facture other = (Facture) object;
if ((this.idfacture == null && other.idfacture != null) || (this.idfacture != null && !this.idfacture.equals(other.idfacture))) {
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 }",
"protected abstract String getId();",
"@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}",
"@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public String getId() { return id; }",
"public int getID() {return id;}",
"public int 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 }",
"final protected int getId() {\n\t\treturn id;\n\t}",
"private void clearId() {\n \n id_ = 0;\n }",
"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 }",
"@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }",
"public String getId(){ return id.get(); }",
"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 {\n return id;\n }",
"public int getID(){\n return id;\n }",
"public String getID(){\n return Id;\n }"
] | [
"0.6897641",
"0.68401533",
"0.6705931",
"0.6642445",
"0.6642445",
"0.6592696",
"0.65795624",
"0.65795624",
"0.6575739",
"0.6575739",
"0.6575739",
"0.6575739",
"0.6575739",
"0.6575739",
"0.65632",
"0.65632",
"0.65451044",
"0.65254945",
"0.65165323",
"0.6488194",
"0.6478304",
"0.6428753",
"0.64199257",
"0.64184415",
"0.64028376",
"0.6367728",
"0.6356027",
"0.63533866",
"0.6349327",
"0.63259023",
"0.6320798",
"0.63034177",
"0.6294928",
"0.6294928",
"0.62844133",
"0.627218",
"0.6267752",
"0.6266882",
"0.6263185",
"0.62603945",
"0.62579304",
"0.6252734",
"0.6249472",
"0.6249472",
"0.6245947",
"0.6240073",
"0.6240073",
"0.6233096",
"0.6225137",
"0.62216145",
"0.62213874",
"0.62127703",
"0.62105155",
"0.62028",
"0.62026405",
"0.61942166",
"0.6191342",
"0.6191342",
"0.6191342",
"0.61902106",
"0.61902106",
"0.618589",
"0.6184218",
"0.61763686",
"0.61747795",
"0.6169199",
"0.61677366",
"0.6161801",
"0.6158224",
"0.6158224",
"0.6158224",
"0.6158224",
"0.6158224",
"0.6158224",
"0.6158224",
"0.6157252",
"0.6157252",
"0.6143652",
"0.6135154",
"0.6129813",
"0.6129423",
"0.6107047",
"0.6106326",
"0.6106326",
"0.61050063",
"0.6104086",
"0.61032313",
"0.6101959",
"0.610066",
"0.6095341",
"0.60953254",
"0.6094428",
"0.6094428",
"0.60925853",
"0.6090996",
"0.6077663",
"0.6073627",
"0.6072725",
"0.6071515",
"0.6070871",
"0.6070424"
] | 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");
HttpSession session=request.getSession(true);
if(session.getAttribute("loggedAs")!="buyer"){
request.getRequestDispatcher("accessDenied.jsp").forward(request, response);
}
ObjectSaleFactory factory= ObjectSaleFactory.singleton();
List<ObjectSale> items = factory.getSellingObjectList();
/*Ho settato il parametro objId tramite il metodo getId() nella pagona
*cliente.jsp, usando un url rewriting. Qua banalmente ottengo il link
*clickato dall'utente e lo reindirizzo alla pagina di conferma acquisto*/
Integer objectId;
if (request.getParameter("objId")!=null && !(request.getParameter("objId").isEmpty()))
objectId=Integer.parseInt(request.getParameter("objId"));
else
objectId=-1;
/*non accetto che l'Id sia un valore negativo, nella generazione dell'Id
*ho fatto in modo che non potesse venire generato un numero negativo.
*Non concedo di proseguire anche se la quantità dell'oggetto che si desidera
*acquistare è pari a zero e stampo un messaggio di errore */
if(objectId> -1){
if (factory.getObjectSaleById(objectId).getQuantity()>0 ){
request.setAttribute("objAcquisto", factory.getObjectSaleById(objectId));
request.getRequestDispatcher("riepilogoAcquisto.jsp").forward(request, response);
}else
request.setAttribute("Disponibilità", "insufficiente");
}
/*Questo blocco di codice viene eseguito se il cliente ha clickato sul bottone
*conferma acquisto della pagine riepilogoAcquisto.jsp.
*Ottengo l'id dell'oggetto che si vuole acquistare e controllo se l'acquirente
*ha abbastanza denaro per poterlo comprare, in caso contrario stampo un errore.*/
if(request.getParameter("acquisto") != null && request.getParameter("acquisto").equals("confermato")){
if((Utente)session.getAttribute("Utente")!=null){
Utente u= (Utente)session.getAttribute("Utente");
Integer idAcquisto;
if (request.getParameter("idOggetto")!=null && ! (request.getParameter("idOggetto").isEmpty()))
idAcquisto=Integer.parseInt(request.getParameter("idOggetto"));
else
idAcquisto=-1;
if(idAcquisto!=-1){
if(u.conto.subMoney(factory.getObjectSaleById(idAcquisto).getPrice())==false)
request.setAttribute("Denaro", "notEnough");
else{ //se il denaro è sufficiente a comprare l'oggetto, diminuisco la disponibilità di uno
factory.getObjectSaleById(idAcquisto).buyObject(1);
request.getRequestDispatcher("acquistoConfermato.jsp").forward(request, response);
} }
}
}
//passo la lista con tutti gli oggetti a cliente.jsp,
//dove la stamperò.
request.setAttribute("obj", items);
request.getRequestDispatcher("cliente.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 protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }",
"@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.62125194",
"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.0 | -1 |
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.87637174",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.8732424",
"0.86993426",
"0.86993426",
"0.86993426",
"0.86993426",
"0.86993426",
"0.86993426",
"0.853123",
"0.853123",
"0.85280925",
"0.85280925",
"0.85280925",
"0.85277",
"0.85277",
"0.85277",
"0.85277",
"0.85277",
"0.85277",
"0.8517062",
"0.85123986",
"0.8511423",
"0.85103893",
"0.8496402"
] | 0.0 | -1 |
no public constructor since this is a utility class | @DSComment("Private Method")
@DSBan(DSCat.PRIVATE_METHOD)
@DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:33:59.514 -0500", hash_original_method = "E49204FD271E895B10D86A1AFEA21B04", hash_generated_method = "59B3C6A592AE63BEE2BC1CC1723B36DF")
private Settings() {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Util() { }",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Utils() {}",
"private Util() {\n }",
"private OMUtil() { }",
"private Util()\n {\n // Empty default ctor, defined to override access scope.\n }",
"private Utils() {\n\t}",
"private Utils() {\n\t}",
"private Util() {\n }",
"private Util() {\n }",
"private Utils()\n {\n // Private constructor to prevent instantiation\n }",
"public Utils() {}",
"private JacobUtils() {}",
"private CollectionUtils() {\n\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"private Utility() {\n throw new IllegalAccessError();\n }",
"private MApi() {}",
"private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}",
"private Utility() {\n\t}",
"private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }",
"private BuilderUtils() {}",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private Utils() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"private WolUtil() {\n }",
"private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }",
"private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }",
"private ProcessorUtils() { }",
"Reproducible newInstance();",
"private FunctionUtils() {\n }",
"private IOUtilities() {\n }",
"private SnapshotUtils() {\r\n\t}",
"private stendhal() {\n\t}",
"private XhtmlUtils()\n\t{\n\t}",
"private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}",
"protected CombinatoricsUtils() {\n super();\n }",
"private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}",
"private JsonUtils() {\n\t\tsuper();\n\t}",
"private Helper() {\r\n // empty\r\n }",
"public ObjectUtils() {\n super();\n }",
"private ReportGenerationUtil() {\n\t\t\n\t}",
"private XMLUtils()\r\n\t{\r\n\t}",
"private CheckingTools() {\r\n super();\r\n }",
"private ClassUtil() {}",
"private TMCourse() {\n\t}",
"private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }",
"protected VboUtil() {\n }",
"public Utils() {\n }",
"private XMLUtil() {\n\t}",
"private CreateDateUtils()\r\n\t{\r\n\t}",
"private RunUtils() {\n }",
"private StringUtilities() {\n // nothing to do\n }",
"private GeoUtil()\n\t{\n\t}",
"private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}",
"private BufferUtil() {\n\n }",
"private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}",
"private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }",
"private J2EEUtils() {\n }",
"private FaceConversionUtil() {\n\n\t}",
"private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}",
"private InstanceUtil() {\n }",
"private JsonUtils() { }",
"private RdfFormatUtils() {\n }",
"private ContentUtil() {\n // do nothing\n }",
"private VlcUtils()\n {\n \n }",
"private CommonMethods() {\n }",
"private ClassifierUtils() {\n throw new AssertionError();\n }",
"private DataProviderUtils() {\n }",
"private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }",
"private DrillCalciteWrapperUtility() {\n }",
"private ExplorerFileSystemUtils() {\n // no op\n }",
"private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }",
"private AlgorithmTools() {}",
"private XMLUtils() {\n }",
"private Marinator() {\n }",
"private Marinator() {\n }",
"private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }",
"private FileUtility() {\r\n\t}",
"private Instantiation(){}",
"private UtilsCache() {\n\t\tsuper();\n\t}",
"public Pitonyak_09_02() {\r\n }",
"private FileUtil() {\n \t\tsuper();\n \t}",
"private AsciiUtils() {\r\n\t}",
"private ValidationUtils() {}",
"private ByteTools(){}",
"Constructor() {\r\n\t\t \r\n\t }",
"private DiagnosticMessageUtilities()\n {\n }",
"private NetUtils() {\r\n\t}",
"private XmlUtil() {\n }",
"private WAPIHelper() { }",
"protected HadoopUtils() { }",
"public ResourceUtils() {\r\n //stub\r\n }",
"private Converter()\n\t{\n\t\tsuper();\n\t}",
"private BeanUtils() {\n\t\t\n\t}",
"private RestUtil() {\n\t}"
] | [
"0.7818003",
"0.75750947",
"0.75750947",
"0.75750947",
"0.75750947",
"0.7331765",
"0.7298454",
"0.72963846",
"0.7279852",
"0.7279852",
"0.72413075",
"0.72413075",
"0.7240452",
"0.7177998",
"0.7174111",
"0.71646845",
"0.71638644",
"0.71582115",
"0.7136315",
"0.7132916",
"0.7100306",
"0.7042153",
"0.7036577",
"0.701451",
"0.701451",
"0.701451",
"0.701451",
"0.701451",
"0.6980163",
"0.69714236",
"0.6963153",
"0.6911275",
"0.6890497",
"0.68804425",
"0.6879913",
"0.68598735",
"0.6855626",
"0.6853825",
"0.68530947",
"0.684233",
"0.68293387",
"0.6827255",
"0.6820058",
"0.68112123",
"0.68100494",
"0.68039805",
"0.68006206",
"0.6798495",
"0.6796112",
"0.6789504",
"0.6781945",
"0.6774975",
"0.6772843",
"0.67687696",
"0.67672145",
"0.67564726",
"0.67555374",
"0.67366594",
"0.67267346",
"0.67166036",
"0.6702217",
"0.66994274",
"0.6687731",
"0.66792476",
"0.6675672",
"0.6672347",
"0.66605604",
"0.6659558",
"0.66404486",
"0.66403365",
"0.663236",
"0.66302645",
"0.6625141",
"0.6615362",
"0.6613534",
"0.6612091",
"0.6611459",
"0.66072196",
"0.6602331",
"0.6601324",
"0.6601259",
"0.6601259",
"0.65994245",
"0.6596453",
"0.6592658",
"0.6588757",
"0.6587506",
"0.6584035",
"0.65836114",
"0.65772915",
"0.656707",
"0.6553179",
"0.65508544",
"0.6544159",
"0.654169",
"0.653539",
"0.6525484",
"0.65154946",
"0.6513793",
"0.6513421",
"0.6510068"
] | 0.0 | -1 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.